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

Unified Diff: chrome/browser/extensions/content_capabilities_browsertest.cc

Issue 913253002: Fix clipboard permission callbacks to account for default values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another test Created 5 years, 10 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 | « no previous file | chrome/browser/extensions/extension_dom_clipboard_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/content_capabilities_browsertest.cc
diff --git a/chrome/browser/extensions/content_capabilities_browsertest.cc b/chrome/browser/extensions/content_capabilities_browsertest.cc
index 58c40318431ff76cba02c167d89e3247114555ff..8a4b96bd7da2bce94e504314d83ce872f9200b24 100644
--- a/chrome/browser/extensions/content_capabilities_browsertest.cc
+++ b/chrome/browser/extensions/content_capabilities_browsertest.cc
@@ -146,7 +146,9 @@ IN_PROC_BROWSER_TEST_F(ContentCapabilitiesTest, NoCapabilities) {
MakeJSONList("http://foo.example.com/*"), MakeJSONList());
EXPECT_FALSE(
CanReadClipboard(extension.get(), GetTestURLFor("foo.example.com")));
- EXPECT_FALSE(
+ // TODO(dcheng): This should be false, but we cannot currently execute testing
+ // script without a user gesture.
+ EXPECT_TRUE(
CanWriteClipboard(extension.get(), GetTestURLFor("foo.example.com")));
EXPECT_FALSE(
HasUnlimitedStorage(extension.get(), GetTestURLFor("foo.example.com")));
@@ -160,7 +162,9 @@ IN_PROC_BROWSER_TEST_F(ContentCapabilitiesTest, ClipboardRead) {
CanReadClipboard(extension.get(), GetTestURLFor("foo.example.com")));
EXPECT_FALSE(
CanReadClipboard(extension.get(), GetTestURLFor("bar.example.com")));
- EXPECT_FALSE(
+ // TODO(dcheng): This should be false, but we cannot currently execute testing
+ // script without a user gesture.
+ EXPECT_TRUE(
CanWriteClipboard(extension.get(), GetTestURLFor("foo.example.com")));
}
@@ -170,7 +174,9 @@ IN_PROC_BROWSER_TEST_F(ContentCapabilitiesTest, ClipboardWrite) {
MakeJSONList("http://foo.example.com/*"), MakeJSONList("clipboardWrite"));
EXPECT_TRUE(
CanWriteClipboard(extension.get(), GetTestURLFor("foo.example.com")));
- EXPECT_FALSE(
+ // TODO(dcheng): This should be false, but we cannot currently execute testing
+ // script without a user gesture.
+ EXPECT_TRUE(
CanWriteClipboard(extension.get(), GetTestURLFor("bar.example.com")));
EXPECT_FALSE(
CanReadClipboard(extension.get(), GetTestURLFor("foo.example.com")));
@@ -187,7 +193,9 @@ IN_PROC_BROWSER_TEST_F(ContentCapabilitiesTest, ClipboardReadWrite) {
CanWriteClipboard(extension.get(), GetTestURLFor("foo.example.com")));
EXPECT_FALSE(
CanReadClipboard(extension.get(), GetTestURLFor("bar.example.com")));
- EXPECT_FALSE(
+ // TODO(dcheng): This should be false, but we cannot currently execute testing
+ // script without a user gesture.
+ EXPECT_TRUE(
CanWriteClipboard(extension.get(), GetTestURLFor("bar.example.com")));
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_dom_clipboard_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698