summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html')
-rw-r--r--chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html54
1 files changed, 1 insertions, 53 deletions
diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html b/chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html
index 70f35d8..d4ad155 100644
--- a/chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html
+++ b/chrome/test/data/extensions/api_test/webnavigation/test_getFrame.html
@@ -1,53 +1 @@
-<script>
-var URL = chrome.extension.getURL("getFrame/a.html");
-var tabId = -1;
-var processId = -1;
-
-chrome.test.runTests([
- function testGetFrame() {
- chrome.tabs.create({"url": "about:blank"}, function(tab) {
- tabId = tab.id;
- var done = chrome.test.listenForever(
- chrome.webNavigation.onCommitted,
- function (details) {
- if (details.tabId != tabId)
- return;
- if (details.url != URL)
- return;
- processId = details.processId;
- chrome.webNavigation.getFrame(
- {tabId: tabId, frameId: 0, processId: processId},
- function(details) {
- chrome.test.assertEq({errorOccurred: false, url: URL},
- details);
- done();
- });
- });
- chrome.tabs.update(tabId, {url: URL});
- });
- },
-
- function testGetInvalidFrame() {
- chrome.webNavigation.getFrame(
- {tabId: tabId, frameId: 1, processId: processId},
- function (details) {
- chrome.test.assertEq(null, details);
- chrome.test.succeed();
- });
- },
-
- function testGetAllFrames() {
- chrome.webNavigation.getAllFrames(
- {tabId: tabId},
- function (details) {
- chrome.test.assertEq(
- [{errorOccurred: false,
- frameId: 0,
- processId: processId,
- url: URL}],
- details);
- chrome.test.succeed();
- });
- }
-]);
-</script>
+<script src="test_getFrame.js"></script>