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

Unified Diff: chrome/test/data/extensions/api_test/clipboard/set_image_data/main.js

Issue 2379573008: Add SetImageData api to chrome.clipboard. (Closed)
Patch Set: Address code review comments and add test cases. Created 4 years 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/api_test/clipboard/set_image_data/main.js
diff --git a/chrome/test/data/extensions/api_test/clipboard/set_image_data/main.js b/chrome/test/data/extensions/api_test/clipboard/set_image_data/main.js
new file mode 100644
index 0000000000000000000000000000000000000000..747d5b856c395b8e8b9604005ea9c5d720ec0323
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/clipboard/set_image_data/main.js
@@ -0,0 +1,21 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
Devlin 2016/12/09 15:23:48 no (c) (all files)
jennyz 2016/12/14 01:15:36 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var clipDataChangedCount = 0;
+
+chrome.app.runtime.onLaunched.addListener(function(launchData) {
+ console.log('onLaunched');
Devlin 2016/12/09 15:23:49 remove debugging logs
jennyz 2016/12/14 01:15:36 Done.
+ chrome.app.window.create('app_main.html',
+ { 'width': 500,
+ 'height': 500 },
Devlin 2016/12/09 15:23:50 Please follow JS style here. Also, if you don't d
jennyz 2016/12/14 01:15:36 Done.
+ function(window) {
+ });
+});
+
+chrome.clipboard.onClipboardDataChanged.addListener(function() {
+ clipDataChangedCount++;
+ console.log('onClipboardDataChanged ' + clipDataChangedCount);
+ chrome.test.sendMessage("clipboard data changed " + clipDataChangedCount);
+});
+

Powered by Google App Engine
This is Rietveld 408576698