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

Unified Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 335583004: Added a test that currently is able to print to pdf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed how the test saved the pdf Created 6 years, 6 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/browser/resources/print_preview/native_layer.js
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js
index efdd55b36073695ca5a34c475a299e408e7ea0a9..5040f3b3c9b1475fab2139e3bc36acbb80165e24 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -46,6 +46,7 @@ cr.define('print_preview', function() {
global['onPrivetCapabilitiesSet'] =
this.onPrivetCapabilitiesSet_.bind(this);
global['onPrivetPrintFailed'] = this.onPrivetPrintFailed_.bind(this);
+ global['onClickStuff'] = this.onClickStuff_.bind(this);
};
/**
@@ -77,7 +78,8 @@ cr.define('print_preview', function() {
PRIVET_PRINTER_CHANGED: 'print_preview.NativeLayer.PRIVET_PRINTER_CHANGED',
PRIVET_CAPABILITIES_SET:
'print_preview.NativeLayer.PRIVET_CAPABILITIES_SET',
- PRIVET_PRINT_FAILED: 'print_preview.NativeLayer.PRIVET_PRINT_FAILED'
+ PRIVET_PRINT_FAILED: 'print_preview.NativeLayer.PRIVET_PRINT_FAILED',
+ CLICK_STUFF: 'print_preview.NativeLayer.CLICK_STUFF'
};
/**
@@ -672,6 +674,15 @@ cr.define('print_preview', function() {
new Event(NativeLayer.EventType.PRIVET_PRINT_FAILED);
privetPrintFailedEvent.httpError = http_error;
this.dispatchEvent(privetPrintFailedEvent);
+ },
+
+ /**
+ * Function call from browsertest to start clicking certain buttons
+ */
+ onClickStuff_: function() {
+ var clickStuffEvent =
+ new Event(NativeLayer.EventType.CLICK_STUFF);
+ this.dispatchEvent(clickStuffEvent);
}
};

Powered by Google App Engine
This is Rietveld 408576698