Commit 344da448 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[quickview] Test: Put expected value first in chrome.tests.assertEq

Chrome style and makes debugging assert failures easier. No change in
behavior.

Bug: 1064855
Change-Id: Ib3833eeead4499dfc7edd197eb335a1722b32d97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434121Reviewed-by: default avatarAustin Tankiang <austinct@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811141}
parent b8368dd1
...@@ -1305,7 +1305,7 @@ ...@@ -1305,7 +1305,7 @@
const size = await getQuickViewMetadataBoxField(appId, 'Dimensions'); const size = await getQuickViewMetadataBoxField(appId, 'Dimensions');
chrome.test.assertEq('378 x 272', size); chrome.test.assertEq('378 x 272', size);
const model = await getQuickViewMetadataBoxField(appId, 'Device model'); const model = await getQuickViewMetadataBoxField(appId, 'Device model');
chrome.test.assertEq(model, 'FinePix S5000'); chrome.test.assertEq('FinePix S5000', model);
const film = await getQuickViewMetadataBoxField(appId, 'Device settings'); const film = await getQuickViewMetadataBoxField(appId, 'Device settings');
chrome.test.assertEq('f/2.8 0.004 5.7mm ISO200', film); chrome.test.assertEq('f/2.8 0.004 5.7mm ISO200', film);
}; };
...@@ -1355,7 +1355,7 @@ ...@@ -1355,7 +1355,7 @@
const size = await getQuickViewMetadataBoxField(appId, 'Dimensions'); const size = await getQuickViewMetadataBoxField(appId, 'Dimensions');
chrome.test.assertEq('4608 x 3456', size); chrome.test.assertEq('4608 x 3456', size);
const model = await getQuickViewMetadataBoxField(appId, 'Device model'); const model = await getQuickViewMetadataBoxField(appId, 'Device model');
chrome.test.assertEq(model, 'E-M1'); chrome.test.assertEq('E-M1', model);
const film = await getQuickViewMetadataBoxField(appId, 'Device settings'); const film = await getQuickViewMetadataBoxField(appId, 'Device settings');
chrome.test.assertEq('f/8 0.002 12mm ISO200', film); chrome.test.assertEq('f/8 0.002 12mm ISO200', film);
}; };
...@@ -2364,7 +2364,7 @@ ...@@ -2364,7 +2364,7 @@
const result = await sendTestMessage( const result = await sendTestMessage(
{name: 'dispatchTabKey', shift: query.shift || false}); {name: 'dispatchTabKey', shift: query.shift || false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2402,7 +2402,7 @@ ...@@ -2402,7 +2402,7 @@
const result = await sendTestMessage( const result = await sendTestMessage(
{name: 'dispatchTabKey', shift: query.shift || false}); {name: 'dispatchTabKey', shift: query.shift || false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2439,7 +2439,7 @@ ...@@ -2439,7 +2439,7 @@
const result = await sendTestMessage( const result = await sendTestMessage(
{name: 'dispatchTabKey', shift: query.shift || false}); {name: 'dispatchTabKey', shift: query.shift || false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2475,7 +2475,7 @@ ...@@ -2475,7 +2475,7 @@
const result = await sendTestMessage( const result = await sendTestMessage(
{name: 'dispatchTabKey', shift: query.shift || false}); {name: 'dispatchTabKey', shift: query.shift || false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2491,7 +2491,7 @@ ...@@ -2491,7 +2491,7 @@
const result = const result =
await sendTestMessage({name: 'dispatchTabKey', shift: false}); await sendTestMessage({name: 'dispatchTabKey', shift: false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2531,7 +2531,7 @@ ...@@ -2531,7 +2531,7 @@
const result = await sendTestMessage( const result = await sendTestMessage(
{name: 'dispatchTabKey', shift: query.shift || false}); {name: 'dispatchTabKey', shift: query.shift || false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2547,7 +2547,7 @@ ...@@ -2547,7 +2547,7 @@
const result = const result =
await sendTestMessage({name: 'dispatchTabKey', shift: false}); await sendTestMessage({name: 'dispatchTabKey', shift: false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -2595,7 +2595,7 @@ ...@@ -2595,7 +2595,7 @@
const result = await sendTestMessage( const result = await sendTestMessage(
{name: 'dispatchTabKey', shift: query.shift || false}); {name: 'dispatchTabKey', shift: query.shift || false});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
// Note: Allow 500ms between key events to filter out the focus // Note: Allow 500ms between key events to filter out the focus
// traversal problems noted in crbug.com/907380#c10. // traversal problems noted in crbug.com/907380#c10.
...@@ -3076,7 +3076,7 @@ ...@@ -3076,7 +3076,7 @@
await repeatUntil(async () => { await repeatUntil(async () => {
const result = await sendTestMessage({name: 'dispatchTabKey'}); const result = await sendTestMessage({name: 'dispatchTabKey'});
chrome.test.assertEq( chrome.test.assertEq(
result, 'tabKeyDispatched', 'Tab key dispatch failure'); 'tabKeyDispatched', result, 'Tab key dispatch failure');
const element = const element =
await remoteCall.callRemoteTestUtil('getActiveElement', appId, []); await remoteCall.callRemoteTestUtil('getActiveElement', appId, []);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment