Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/as-object/svg-object-contentWindow-query.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/as-object/svg-object-contentWindow-query.html b/third_party/WebKit/LayoutTests/svg/as-object/svg-object-contentWindow-query.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..36379ccd26cfabb38aa48a31e5252047917b020d |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/as-object/svg-object-contentWindow-query.html |
| @@ -0,0 +1,19 @@ |
| +<!DOCTYPE html> |
| +<meta charset="utf-8"> |
| +<title>Test</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<body onload="on_load()"> |
| +<object id="obj" type="image/svg+xml" data="resources/svg-object-contentWindow.svg"></object> |
| +<script> |
| + var t1 = async_test("Test content window"); |
|
Yuki
2016/06/16 12:24:23
Why do you need to test asynchronously?
Shanmuga Pandi
2016/06/17 10:37:31
This test need to be executed as async_test, else
|
| + function on_load () { |
|
Yuki
2016/06/16 12:24:23
I'd recommend to follow this style guide for JavaS
Shanmuga Pandi
2016/06/17 10:37:31
Done.
|
| + t1.step(function() { |
| + var contentWindow = document.getElementById('obj').contentWindow; |
| + assert_equals(contentWindow.TEST, true, "content window and attributes should be accessible"); |
|
Yuki
2016/06/16 12:24:23
Better to compare with an unique string so that we
Shanmuga Pandi
2016/06/17 10:37:31
Done.
Yuki
2016/06/20 04:24:15
Seems not done. You're still comparing with |true
|
| + }); |
| + t1.done() |
| + } |
| +</script> |
| +</body> |
| + |