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

Unified Diff: chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.js

Issue 7488011: Update the tracked URL of a frame if it changes during a navigation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.js
diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.js b/chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.js
new file mode 100644
index 0000000000000000000000000000000000000000..96502ce26f226aeb01815f14e4feb1b5ae0160f4
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.js
@@ -0,0 +1,48 @@
+// Copyright (c) 2011 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.
+
+function runTests() {
+ var getURL = chrome.extension.getURL;
+ var URL_LOAD = "http://www.a.com:PORT/files/extensions/api_test/webnavigation/serverRedirect/a.html";
+ var URL_LOAD_REDIRECT = "http://www.a.com:PORT/server-redirect?" + URL_LOAD;
+ chrome.tabs.create({"url": "about:blank"}, function(tab) {
+ var tabId = tab.id;
+ chrome.test.getConfig(function(config) {
+ var fixPort = function(url) {
+ return url.replace(/PORT/g, config.testServer.port);
+ };
+ URL_LOAD_REDIRECT = fixPort(URL_LOAD_REDIRECT);
+ URL_LOAD = fixPort(URL_LOAD);
+ chrome.test.runTests([
+ // Navigates to a page that redirects (on the server side) to a.html.
+ function serverRedirect() {
+ expect([
+ [ "onBeforeNavigate",
+ { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: URL_LOAD_REDIRECT }],
+ [ "onCommitted",
+ { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ transitionQualifiers: [],
+ transitionType: "link",
+ url: URL_LOAD }],
+ [ "onDOMContentLoaded",
+ { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: URL_LOAD }],
+ [ "onCompleted",
+ { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: URL_LOAD }]]);
+ chrome.tabs.update(tabId, { url: URL_LOAD_REDIRECT });
+ },
+ ]);
+ });
+ });
+}
« no previous file with comments | « chrome/test/data/extensions/api_test/webnavigation/test_serverRedirect.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698