Remove test workaround now that original issue is fixed
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2016 00:47:12 +0000 (00:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2016 00:47:12 +0000 (00:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164255

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-31
Reviewed by Saam Barati.

* inspector/debugger/resources/log-pause-location.js:
(TestPage.registerInitializer.window.logResolvedBreakpointLinesWithContext):
(TestPage.registerInitializer.window.logLinesWithContext):
(TestPage.registerInitializer.String.prototype.myPadStart): Deleted.
Use the real String.prototype.padStart now that it is fixed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@208204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/inspector/debugger/resources/log-pause-location.js

index 2e737700e53b4c3ba898665cc5c2e28fe3221b33..a34d6d90810a8785154e5d6eb167ae57ba5094ab 100644 (file)
@@ -1,3 +1,16 @@
+2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Remove test workaround now that original issue is fixed
+        https://bugs.webkit.org/show_bug.cgi?id=164255
+
+        Reviewed by Saam Barati.
+
+        * inspector/debugger/resources/log-pause-location.js:
+        (TestPage.registerInitializer.window.logResolvedBreakpointLinesWithContext):
+        (TestPage.registerInitializer.window.logLinesWithContext):
+        (TestPage.registerInitializer.String.prototype.myPadStart): Deleted.
+        Use the real String.prototype.padStart now that it is fixed.
+
 2016-10-31  Ryosuke Niwa  <rniwa@webkit.org>
 
         Enable custom elements by default everywhere
index 4bdba0dfd9a9ceffa03197eb5d27c741b6bd5d7e..2b65f7249d96eff7407cb4f6d00a6ed90a8ba32b 100644 (file)
@@ -2,15 +2,6 @@ TestPage.registerInitializer(() => {
     let lines = [];
     let linesSourceCode = null;
 
-    // Switch back to String.prototype.padStart once this is fixed:
-    // FIXME: <https://webkit.org/b/161944> stringProtoFuncRepeatCharacter will return `null` when it should not
-    String.prototype.myPadStart = function(desired) {
-        let length = this.length;
-        if (length >= desired)
-            return this;
-        return " ".repeat(desired - length) + this;
-    };
-
     function insertCaretIntoStringAtIndex(str, index, caret="|") {
         return str.slice(0, index) + caret + str.slice(index);
     }
@@ -98,7 +89,7 @@ TestPage.registerInitializer(() => {
                 lineContent = insertCaretIntoStringAtIndex(lineContent, resolvedLocation.columnNumber, resolvedCaret);
             }
 
-            let number = lineNumber.toString().myPadStart(3);
+            let number = lineNumber.toString().padStart(3);
             InspectorTest.log(`${prefix}${number}    ${lineContent}`);
         }
     }
@@ -118,7 +109,7 @@ TestPage.registerInitializer(() => {
 
             let active = lineNumber === location.lineNumber;
             let prefix = active ? " -> " : "    ";
-            let number = lineNumber.toString().myPadStart(3);
+            let number = lineNumber.toString().padStart(3);
             lineContent = active ? insertCaretIntoStringAtIndex(lineContent, location.columnNumber) : lineContent;
             InspectorTest.log(`${prefix}${number}    ${lineContent}`);
         }