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

Side by Side Diff: chrome/test/data/extensions/api_test/content_scripts/about_blank_srcdoc/content_script.js

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetEffectiveDocumentURL to ScriptContext Created 6 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 if (location.protocol === 'about:') {
6 chrome.runtime.sendMessage('message from ' + location.href);
7 } else if (frameElement && !frameElement.getAttribute('src')) {
8 chrome.runtime.sendMessage('message from about:blank');
9 }
10
11 chrome.runtime.onMessage.addListener(function(message) {
12 if (message === 'open about:blank popup')
13 window.open('about:blank');
14 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698