Title: [114734] trunk
Revision
114734
Author
pfeld...@chromium.org
Date
2012-04-20 03:02:33 -0700 (Fri, 20 Apr 2012)

Log Message

Not reviewed: fixed chromium sanity tests for inspector via assigning last path component
to entire url for parsed urls with invalid specs.

Source/WebCore:

* inspector/front-end/ResourceUtils.js:
(WebInspector.ParsedURL):

Source/WebKit/chromium:

* src/js/Tests.js:
(.TestSuite.prototype._scriptsAreParsed):

LayoutTests:

* http/tests/inspector/debugger-test.js:
(initialize_DebuggerTest):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (114733 => 114734)


--- trunk/LayoutTests/ChangeLog	2012-04-20 09:44:46 UTC (rev 114733)
+++ trunk/LayoutTests/ChangeLog	2012-04-20 10:02:33 UTC (rev 114734)
@@ -1,3 +1,11 @@
+2012-04-20  'Pavel Feldman'  <pfeld...@chromium.org>
+
+        Not reviewed: fixed chromium sanity tests for inspector via assigning last path component
+        to entire url for parsed urls with invalid specs.
+
+        * http/tests/inspector/debugger-test.js:
+        (initialize_DebuggerTest):
+
 2012-04-20  Mikhail Naganov  <mnaga...@chromium.org>
 
         [Chromium] Unreviewed test results update.

Modified: trunk/LayoutTests/http/tests/inspector/debugger-test.js (114733 => 114734)


--- trunk/LayoutTests/http/tests/inspector/debugger-test.js	2012-04-20 09:44:46 UTC (rev 114733)
+++ trunk/LayoutTests/http/tests/inspector/debugger-test.js	2012-04-20 10:02:33 UTC (rev 114734)
@@ -157,7 +157,7 @@
 {
     var uiSourceCodes = panel._presentationModel.uiSourceCodes();
     for (var i = 0; i < uiSourceCodes.length; ++i) {
-        if (uiSourceCodes[i].parsedURL.lastPathComponent === scriptName || uiSourceCodes[i].parsedURL.url ="" scriptName) {
+        if (uiSourceCodes[i].parsedURL.lastPathComponent === scriptName) {
             panel.showUISourceCode(uiSourceCodes[i]);
             var sourceFrame = panel.visibleView;
             if (sourceFrame.loaded)

Modified: trunk/Source/WebCore/ChangeLog (114733 => 114734)


--- trunk/Source/WebCore/ChangeLog	2012-04-20 09:44:46 UTC (rev 114733)
+++ trunk/Source/WebCore/ChangeLog	2012-04-20 10:02:33 UTC (rev 114734)
@@ -1,3 +1,11 @@
+2012-04-20  'Pavel Feldman'  <pfeld...@chromium.org>
+
+        Not reviewed: fixed chromium sanity tests for inspector via assigning last path component
+        to entire url for parsed urls with invalid specs.
+
+        * inspector/front-end/ResourceUtils.js:
+        (WebInspector.ParsedURL):
+
 2012-04-20  Kentaro Hara  <hara...@chromium.org>
 
         Unreviewed, rolling out r114401.

Modified: trunk/Source/WebCore/inspector/front-end/ResourceUtils.js (114733 => 114734)


--- trunk/Source/WebCore/inspector/front-end/ResourceUtils.js	2012-04-20 09:44:46 UTC (rev 114733)
+++ trunk/Source/WebCore/inspector/front-end/ResourceUtils.js	2012-04-20 10:02:33 UTC (rev 114734)
@@ -52,7 +52,14 @@
     // 4 - ?path
     // 5 - ?fragment
     var match = url.match(/^([^:]+):\/\/([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);
-    if (!match) {
+    if (match) {
+        this.isValid = true;
+        this.scheme = match[1].toLowerCase();
+        this.host = match[2];
+        this.port = match[3];
+        this.path = match[4] || "/";
+        this.fragment = match[5];
+    } else {
         if (this == "about:blank") {
             this.isValid = true;
             this.scheme = "about";
@@ -60,16 +67,9 @@
             this.path = "/";
             return;
         }
-        return;
+        this.path = this.url;
     }
 
-    this.isValid = true;
-    this.scheme = match[1].toLowerCase();
-    this.host = match[2];
-    this.port = match[3];
-    this.path = match[4] || "/";
-    this.fragment = match[5];
-
     if (this.path) {
         // First cut the query params.
         var path = this.path;
@@ -84,7 +84,8 @@
         if (lastSlashIndex !== -1) {
             this.folderPathComponents = path.substring(0, lastSlashIndex);
             this.lastPathComponent = path.substring(lastSlashIndex + 1);
-        }
+        } else
+            this.lastPathComponent = path;
     }
 }
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (114733 => 114734)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-20 09:44:46 UTC (rev 114733)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-20 10:02:33 UTC (rev 114734)
@@ -1,3 +1,11 @@
+2012-04-20  'Pavel Feldman'  <pfeld...@chromium.org>
+
+        Not reviewed: fixed chromium sanity tests for inspector via assigning last path component
+        to entire url for parsed urls with invalid specs.
+
+        * src/js/Tests.js:
+        (.TestSuite.prototype._scriptsAreParsed):
+
 2012-04-20  Mark Pilgrim  <pilg...@chromium.org>
 
         [Chromium] Call cacheMetadata directly

Modified: trunk/Source/WebKit/chromium/src/js/Tests.js (114733 => 114734)


--- trunk/Source/WebKit/chromium/src/js/Tests.js	2012-04-20 09:44:46 UTC (rev 114733)
+++ trunk/Source/WebKit/chromium/src/js/Tests.js	2012-04-20 10:02:33 UTC (rev 114734)
@@ -688,7 +688,7 @@
     var missing = expected.slice(0);
     for (var i = 0; i < uiSourceCodes.length; ++i) {
         for (var j = 0; j < missing.length; ++j) {
-            if (uiSourceCodes[i].fileName.search(missing[j]) !== -1) {
+            if (uiSourceCodes[i].parsedURL.lastPathComponent.search(missing[j]) !== -1) {
                 missing.splice(j, 1);
                 break;
             }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to