Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Side by Side Diff: LayoutTests/fast/dom/shadow/css-hostrule-api-expected.txt

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 Test whether CSSHostRule API works correctly or not. 1 Test whether CSSHostRule API works correctly or not.
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 Before inserting a border rule into @host @-rules: 6 Before inserting a border rule into @host @-rules:
7 PASS getComputedStyle(host).borderColor is "rgb(0, 0, 0)" 7 PASS getComputedStyle(host).borderColor is "rgb(0, 0, 0)"
8 PASS hostRule.cssRules.length is 0 8 PASS hostRule.cssRules.length is 0
9 PASS hostRule.type is 1001 9 PASS hostRule.type is 1001
10 After inserting a border rule with an id selector into @host @-rules: 10 After inserting a border rule with an id selector into @host @-rules:
11 PASS getComputedStyle(host).borderColor is "rgb(0, 128, 0)" 11 PASS getComputedStyle(host).borderColor is "rgb(0, 128, 0)"
12 PASS hostRule.cssRules.length is 1 12 PASS hostRule.cssRules.length is 1
13 PASS hostRule.cssText is "@host { \n #host { border-color: green; }\n}" 13 PASS hostRule.cssText is "@host { \n #host { border-color: green; }\n}"
14 PASS hostRule.cssRules[0].cssText is "#host { border-color: green; }" 14 PASS hostRule.cssRules[0].cssText is "#host { border-color: green; }"
15 After inserting a border rule with a tag selector into @host @-rules: 15 After inserting a border rule with a tag selector into @host @-rules:
16 PASS getComputedStyle(host).borderColor is "rgb(0, 128, 0)" 16 PASS getComputedStyle(host).borderColor is "rgb(0, 128, 0)"
17 PASS hostRule.cssRules.length is 2 17 PASS hostRule.cssRules.length is 2
18 PASS hostRule.cssText is "@host { \n #host { border-color: green; }\n div { bo rder-color: blue; }\n}" 18 PASS hostRule.cssText is "@host { \n #host { border-color: green; }\n div { bo rder-color: blue; }\n}"
19 PASS hostRule.cssRules[0].cssText is "#host { border-color: green; }" 19 PASS hostRule.cssRules[0].cssText is "#host { border-color: green; }"
20 PASS hostRule.cssRules[1].cssText is "div { border-color: blue; }" 20 PASS hostRule.cssRules[1].cssText is "div { border-color: blue; }"
21 After deleting the border rule with an id selector from @host @-rules: 21 After deleting the border rule with an id selector from @host @-rules:
22 PASS getComputedStyle(host).borderColor is "rgb(0, 0, 255)" 22 PASS getComputedStyle(host).borderColor is "rgb(0, 0, 255)"
23 PASS hostRule.cssRules.length is 1 23 PASS hostRule.cssRules.length is 1
24 PASS hostRule.cssText is "@host { \n div { border-color: blue; }\n}" 24 PASS hostRule.cssText is "@host { \n div { border-color: blue; }\n}"
25 PASS hostRule.cssRules[0].cssText is "div { border-color: blue; }" 25 PASS hostRule.cssRules[0].cssText is "div { border-color: blue; }"
26 Error cases 26 Error cases
27 PASS hostRule.cssRules.length is 1 27 PASS hostRule.cssRules.length is 1
28 PASS hostRule.insertRule('#host { border-color: green; }') threw exception TypeE rror: Not enough arguments. 28 PASS hostRule.insertRule('#host { border-color: green; }') threw exception TypeE rror: Failed to execute 'insertRule' on 'CSSHostRule': 2 arguments required, but only 1 present..
29 PASS hostRule.cssRules.length is 1 29 PASS hostRule.cssRules.length is 1
30 PASS hostRule.insertRule() threw exception TypeError: Not enough arguments. 30 FAIL hostRule.insertRule() should throw TypeError: Failed to execute 'insertRule ' on 'CSSHostRule': 2 arguments required, but only 1 present.. Threw exception T ypeError: Failed to execute 'insertRule' on 'CSSHostRule': 2 arguments required, but only 0 present..
31 PASS hostRule.cssRules.length is 1 31 PASS hostRule.cssRules.length is 1
32 PASS hostRule.deleteRule() threw exception TypeError: Not enough arguments. 32 PASS hostRule.deleteRule() threw exception TypeError: Failed to execute 'deleteR ule' on 'CSSHostRule': 1 argument required, but only 0 present..
33 PASS hostRule.cssRules.length is 1 33 PASS hostRule.cssRules.length is 1
34 PASS successfullyParsed is true 34 PASS successfullyParsed is true
35 35
36 TEST COMPLETE 36 TEST COMPLETE
37 37
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/shadow/css-hostrule-api.html ('k') | LayoutTests/fast/dom/text-api-arguments.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698