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

Unified Diff: LayoutTests/fast/css/getComputedStyle/computed-style-non-element-parameter.html

Issue 752713002: Make getComputedStyle throw for incorrect first parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: V2 Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css/getComputedStyle/computed-style-non-element-parameter.html
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-non-element-parameter.html b/LayoutTests/fast/css/getComputedStyle/computed-style-non-element-parameter.html
new file mode 100644
index 0000000000000000000000000000000000000000..480ebdccc67808545c79f8612a929d48520bbdd1
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-non-element-parameter.html
@@ -0,0 +1,22 @@
+<div id="result"></div>
+<script>
+ if (window.testRunner)
tkent 2014/11/25 22:59:28 Indent the whole content of <script> is not helpfu
+ testRunner.dumpAsText();
+
+ var noException = true;
+ try {
+ getComputedStyle(null);
+ noException = false;
tkent 2014/11/25 22:59:28 Please import ../../../resources/js-test.js, and u
+ } catch(e) {};
+ try {
+ getComputedStyle(undefined);
+ noException = false;
+ } catch(e) {};
+ var txtNode = document.createTextNode("foo");
+ try {
+ getComputedStyle(txtNode);
+ noException = false;
+ } catch(e) {};
+
+ document.getElementById("result").innerText = noException ? "PASS" : "FAIL"
+</script>

Powered by Google App Engine
This is Rietveld 408576698