| Index: chrome/browser/plugins/plugin_power_saver_browsertest.cc
|
| diff --git a/chrome/browser/plugins/plugin_power_saver_browsertest.cc b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
|
| index 23709a370b96240ee4f78c6c9108b7e36323eba5..bdfe2420bcf11555cedf340da0a7112350106c61 100644
|
| --- a/chrome/browser/plugins/plugin_power_saver_browsertest.cc
|
| +++ b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
|
| @@ -40,9 +40,9 @@ class PluginPowerSaverBrowserTest : virtual public InProcessBrowserTest {
|
| bool IsPluginPeripheral(const char* element_id) {
|
| std::string script = base::StringPrintf(
|
| "var plugin = window.document.getElementById('%s');"
|
| - "function handleEvent() {"
|
| + "function handleEvent(event) {"
|
| " if (event.data.isPeripheral != undefined &&"
|
| - " event.data.source == 'getPeripheralStatusResponse') {"
|
| + " event.data.source == 'getPowerSaverStatusResponse') {"
|
| " window.domAutomationController.send("
|
| " event.data.isPeripheral ? 'peripheral' : 'essential');"
|
| " plugin.removeEventListener('message', handleEvent);"
|
| @@ -55,7 +55,7 @@ class PluginPowerSaverBrowserTest : virtual public InProcessBrowserTest {
|
| " window.domAutomationController.send('peripheral');"
|
| "} else {"
|
| " plugin.addEventListener('message', handleEvent);"
|
| - " plugin.postMessage('getPeripheralStatus');"
|
| + " plugin.postMessage('getPowerSaverStatus');"
|
| "}",
|
| element_id);
|
|
|
| @@ -71,7 +71,7 @@ class PluginPowerSaverBrowserTest : virtual public InProcessBrowserTest {
|
| // status message during:
|
| // - Plugin creation, to handle a plugin freshly created from a poster.
|
| // - Peripheral status change.
|
| - // - In response to the explicit 'getPeripheralStatus' request, in case the
|
| + // - In response to the explicit 'getPowerSaverStatus' request, in case the
|
| // test has missed the above two events.
|
| void SimulateClickAndAwaitMarkedEssential(const char* element_id,
|
| const gfx::Point& point) {
|
| @@ -80,7 +80,7 @@ class PluginPowerSaverBrowserTest : virtual public InProcessBrowserTest {
|
|
|
| std::string script = base::StringPrintf(
|
| "var plugin = window.document.getElementById('%s');"
|
| - "function handleEvent() {"
|
| + "function handleEvent(event) {"
|
| " if (event.data.isPeripheral == false) {"
|
| " window.domAutomationController.send('essential');"
|
| " plugin.removeEventListener('message', handleEvent);"
|
| @@ -92,7 +92,7 @@ class PluginPowerSaverBrowserTest : virtual public InProcessBrowserTest {
|
| "} else {"
|
| " plugin.addEventListener('message', handleEvent);"
|
| " if (plugin.postMessage != undefined) {"
|
| - " plugin.postMessage('getPeripheralStatus');"
|
| + " plugin.postMessage('getPowerSaverStatus');"
|
| " }"
|
| "}",
|
| element_id);
|
|
|