1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5GEN('#if defined(OS_CHROMEOS)');
6
7/**
8 * SetTimeWebUITest tests loading and interacting with the SetTimeUI web UI,
9 * which is normally shown as a dialog.
10 * @constructor
11 * @extends {testing.Test}
12 */
13function SetTimeWebUITest() {}
14
15SetTimeWebUITest.prototype = {
16  __proto__: testing.Test.prototype,
17
18  /**
19   * Browse to set time dialog.
20   * @override
21   */
22  browsePreload: 'chrome://set-time/',
23};
24
25TEST_F('SetTimeWebUITest', 'testChangeTimezone', function() {
26  assertEquals(this.browsePreload, document.location.href);
27
28  var TimeSetter = settime.TimeSetter;
29
30  // Verify timezone.
31  TimeSetter.setTimezone('America/New_York');
32  expectEquals('America/New_York', $('timezone-select').value);
33  TimeSetter.setTimezone('Europe/Moscow');
34  expectEquals('Europe/Moscow', $('timezone-select').value);
35});
36
37GEN('#endif');
38