Index: chrome/test/data/extensions/platform_apps/browser_tag/main.js |
diff --git a/chrome/test/data/extensions/platform_apps/browser_tag/main.js b/chrome/test/data/extensions/platform_apps/browser_tag/main.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..24f774a01e445595824e5b14b4596ec9fb32081a |
--- /dev/null |
+++ b/chrome/test/data/extensions/platform_apps/browser_tag/main.js |
@@ -0,0 +1,26 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+onload = function() { |
+ chrome.test.runTests([ |
+ function browserTag() { |
+ var browserTag = document.querySelector('browser'); |
+ // Since we can't currently inspect the page loaded inside the <browser>, |
+ // the only way we can check that the shim is working is by changing the |
+ // size and seeing if the shim updates the size of the DOM. |
+ chrome.test.assertEq(300, browserTag.offsetWidth); |
+ chrome.test.assertEq(200, browserTag.offsetHeight); |
+ |
+ browserTag.setAttribute('width', 310); |
+ browserTag.setAttribute('height', 210); |
+ |
+ // Timeout is necessary to give the mutation observers a chance to fire. |
+ setTimeout(function() { |
+ chrome.test.assertEq(310, browserTag.offsetWidth); |
+ chrome.test.assertEq(210, browserTag.offsetHeight); |
+ chrome.test.succeed(); |
+ }, 0); |
+ } |
+ ]); |
+}; |