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

Unified Diff: chrome/test/data/extensions/platform_apps/ad_view/change_ad_network/chrometest.js

Issue 147663002: Remove unused EnableAdviewSrcAttribute command line flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove still more tests Created 6 years, 11 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
Index: chrome/test/data/extensions/platform_apps/ad_view/change_ad_network/chrometest.js
diff --git a/chrome/test/data/extensions/platform_apps/ad_view/change_ad_network/chrometest.js b/chrome/test/data/extensions/platform_apps/ad_view/change_ad_network/chrometest.js
deleted file mode 100644
index f29091516f94487d21c0e5ba28aef0045315a8d5..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/platform_apps/ad_view/change_ad_network/chrometest.js
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2013 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.
-
-// This test checks that 1) it is possible change the value of the "ad-network"
-// attribute of an <adview> element and 2) changing the value will reset the
-// "src" attribute.
-
-function onLoadCommit(adview, guestURL) {
- console.log('onLoadCommit("' + adview.getAttribute('ad-network') + '")');
- // First callback: assert and run another callback
- if (adview.getAttribute('ad-network') == 'test') {
- // Check 'src' and 'ad-network' attributes/properties
- chrome.test.assertEq('test', adview.getAttribute('ad-network'));
- chrome.test.assertEq('test', adview['ad-network']);
- chrome.test.assertEq(guestURL, adview.getAttribute('src'));
- chrome.test.assertEq(guestURL, adview.src);
-
- adview['ad-network'] = '';
- // Timeout is necessary to give the mutation observers a chance to fire.
- // http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html
- setTimeout(function() {
- // Check 'src' and 'ad-network' attributes/properties
- chrome.test.assertEq('', adview.getAttribute('ad-network'));
- chrome.test.assertEq('', adview['ad-network']);
- chrome.test.assertEq('', adview.getAttribute('src'));
- chrome.test.assertEq('', adview.src);
-
- // Assigning a new value to raise a 2nd "loadcommit" event
- adview['ad-network'] = 'test2';
- }, 0);
- }
- // Second callback: assert and finish test
- else if (adview.getAttribute('ad-network') == 'test2') {
- // Check 'src' and 'ad-network' attributes/properties
- chrome.test.assertEq('test2', adview.getAttribute('ad-network'));
- chrome.test.assertEq('test2', adview['ad-network']);
- chrome.test.assertEq('', adview.getAttribute('src'));
- chrome.test.assertEq('', adview['src']);
-
- console.log('Test finished correctly.');
- chrome.test.succeed();
- }
-};
-
-function runTests(guestURL) {
- chrome.test.runTests([
- function test() {
- var adview = document.getElementsByTagName('adview')[0];
-
- adview.addEventListener('loadcommit', function(event) {
- onLoadCommit(adview, guestURL);
- });
- adview.setAttribute("src", guestURL);
- }
- ]);
-}
-
-window.onload = function() {
- chrome.test.getConfig(function(config) {
- var guestURL = 'http://localhost:' + config.testServer.port +
- '/extensions/platform_apps/ad_view/ad_network_site/testsdk.html';
- runTests(guestURL);
- });
-}

Powered by Google App Engine
This is Rietveld 408576698