Title: [127241] trunk/LayoutTests
Revision
127241
Author
[email protected]
Date
2012-08-31 02:40:57 -0700 (Fri, 31 Aug 2012)

Log Message

[CSS Exclusions] Exclusions tests should run without errors in standalone browser
https://bugs.webkit.org/show_bug.cgi?id=95369

Patch by Bear Travis <[email protected]> on 2012-08-31
Reviewed by Andreas Kling.

Adding a check to make sure window.internals exists before accessing it.
Without the check, a reference error would occur when trying to run these
tests from the browser (as opposed to the test script).

* fast/exclusions/css-exclusions-disabled.html:
* fast/exclusions/script-tests/parsing-wrap-shape-inside.js:
* fast/exclusions/script-tests/parsing-wrap-shape-outside.js:
* fast/exclusions/script-tests/wrap-flow-parsing.js:
* fast/exclusions/script-tests/wrap-margin-parsing.js:
* fast/exclusions/script-tests/wrap-padding-parsing.js:
* fast/exclusions/script-tests/wrap-parsing.js:
* fast/exclusions/script-tests/wrap-through-parsing.js:
* fast/exclusions/shape-inside/shape-inside-floats-simple.html:
* fast/exclusions/shape-inside/shape-inside-inline-elements.html:
* fast/exclusions/shape-inside/shape-inside-overflow.html:
* fast/exclusions/shape-inside/shape-inside-percentage-auto.html:
* fast/exclusions/shape-inside/shape-inside-text.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (127240 => 127241)


--- trunk/LayoutTests/ChangeLog	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/ChangeLog	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,3 +1,28 @@
+2012-08-31  Bear Travis  <[email protected]>
+
+        [CSS Exclusions] Exclusions tests should run without errors in standalone browser
+        https://bugs.webkit.org/show_bug.cgi?id=95369
+
+        Reviewed by Andreas Kling.
+
+        Adding a check to make sure window.internals exists before accessing it.
+        Without the check, a reference error would occur when trying to run these
+        tests from the browser (as opposed to the test script).
+
+        * fast/exclusions/css-exclusions-disabled.html:
+        * fast/exclusions/script-tests/parsing-wrap-shape-inside.js:
+        * fast/exclusions/script-tests/parsing-wrap-shape-outside.js:
+        * fast/exclusions/script-tests/wrap-flow-parsing.js:
+        * fast/exclusions/script-tests/wrap-margin-parsing.js:
+        * fast/exclusions/script-tests/wrap-padding-parsing.js:
+        * fast/exclusions/script-tests/wrap-parsing.js:
+        * fast/exclusions/script-tests/wrap-through-parsing.js:
+        * fast/exclusions/shape-inside/shape-inside-floats-simple.html:
+        * fast/exclusions/shape-inside/shape-inside-inline-elements.html:
+        * fast/exclusions/shape-inside/shape-inside-overflow.html:
+        * fast/exclusions/shape-inside/shape-inside-percentage-auto.html:
+        * fast/exclusions/shape-inside/shape-inside-text.html:
+
 2012-08-31  Andrey Adaikin  <[email protected]>
 
         [Qt] New inspector/profiler/webgl-profiler-api-changes.html times out

Modified: trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html	2012-08-31 09:40:57 UTC (rev 127241)
@@ -6,7 +6,8 @@
 
 description('Test that parsing of css exclusions related properties can be disabled.');
 
-internals.settings.setCSSExclusionsEnabled(false);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(false);
 
 function testInlineStyle(property, value) {
     var div = document.createElement("div");

Modified: trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Testing the parsing of the -webkit-shape-inside property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function testCSSText(declaration, expected)
 {

Modified: trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Testing the parsing of the -webkit-shape-outside property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function testCSSText(declaration, expected)
 {

Modified: trunk/LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Test parsing of the CSS wrap-flow property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function test(declaration) {
     var div = document.createElement("div");

Modified: trunk/LayoutTests/fast/exclusions/script-tests/wrap-margin-parsing.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/wrap-margin-parsing.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/wrap-margin-parsing.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Test parsing of the CSS wrap-margin property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function test(declaration) {
     var div = document.createElement("div");

Modified: trunk/LayoutTests/fast/exclusions/script-tests/wrap-padding-parsing.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/wrap-padding-parsing.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/wrap-padding-parsing.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Test parsing of the CSS wrap-padding property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function test(declaration) {
     var div = document.createElement("div");

Modified: trunk/LayoutTests/fast/exclusions/script-tests/wrap-parsing.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/wrap-parsing.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/wrap-parsing.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Test parsing of the CSS wrap property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function test(declaration) {
     var div = document.createElement("div");

Modified: trunk/LayoutTests/fast/exclusions/script-tests/wrap-through-parsing.js (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/script-tests/wrap-through-parsing.js	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/script-tests/wrap-through-parsing.js	2012-08-31 09:40:57 UTC (rev 127241)
@@ -1,6 +1,7 @@
 description('Test parsing of the CSS wrap-through property.');
 
-internals.settings.setCSSExclusionsEnabled(true);
+if (window.internals)
+    window.internals.settings.setCSSExclusionsEnabled(true);
 
 function test(declaration) {
     var div = document.createElement("div");

Modified: trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-floats-simple.html (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-floats-simple.html	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-floats-simple.html	2012-08-31 09:40:57 UTC (rev 127241)
@@ -2,7 +2,8 @@
 <html>
 <head>
 <script>
-    internals.settings.setCSSExclusionsEnabled(true);
+    if (window.internals)
+        window.internals.settings.setCSSExclusionsEnabled(true);
 </script>
 <style>
     div {

Modified: trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-inline-elements.html (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-inline-elements.html	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-inline-elements.html	2012-08-31 09:40:57 UTC (rev 127241)
@@ -2,7 +2,8 @@
 <html>
 <head>
 <script>
-    internals.settings.setCSSExclusionsEnabled(true);
+    if (window.internals)
+        window.internals.settings.setCSSExclusionsEnabled(true);
 </script>
 <style>
     #shape-inside {

Modified: trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-overflow.html (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-overflow.html	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-overflow.html	2012-08-31 09:40:57 UTC (rev 127241)
@@ -2,7 +2,8 @@
 <html>
 <head>
 <script>
-    internals.settings.setCSSExclusionsEnabled(true);
+    if (window.internals)
+        window.internals.settings.setCSSExclusionsEnabled(true);
 </script>
 <style>
     #container {

Modified: trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-percentage-auto.html (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-percentage-auto.html	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-percentage-auto.html	2012-08-31 09:40:57 UTC (rev 127241)
@@ -2,7 +2,8 @@
 <html>
 <head>
 <script>
-    internals.settings.setCSSExclusionsEnabled(true);
+    if (window.internals)
+        window.internals.settings.setCSSExclusionsEnabled(true);
 </script>
 <style>
     #shape-inside {

Modified: trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-text.html (127240 => 127241)


--- trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-text.html	2012-08-31 09:35:57 UTC (rev 127240)
+++ trunk/LayoutTests/fast/exclusions/shape-inside/shape-inside-text.html	2012-08-31 09:40:57 UTC (rev 127241)
@@ -2,7 +2,8 @@
 <html>
 <head>
 <script>
-    internals.settings.setCSSExclusionsEnabled(true);
+    if (window.internals)
+        window.internals.settings.setCSSExclusionsEnabled(true);
 </script>
 <style>
     #shape-inside {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to