diff --git a/DEPS b/DEPS index 03b99b0..ed67e40d 100644 --- a/DEPS +++ b/DEPS
@@ -40,7 +40,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': 'fcc4a071d9dff4f3bac0bd55dab8f69a4436d15d', + 'skia_revision': '012bdf8cb526ec27b50cf7bb80ed4041c0cfb864', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -64,7 +64,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '3962d80bde19074227c34f4615b0446f4975a098', + 'pdfium_revision': 'd5a13afe9265463a497db40d8c66a8a736a86bc2', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -96,7 +96,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'c2d7f3a00bd5a59fd099a4959880d3b147dc0d5f', + 'catapult_revision': 'e644f98aab3b814659e8b7dc3aa5f6d15d9167d3', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other.
diff --git a/ash/shell.cc b/ash/shell.cc index 2927d2b..f3f6048f 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -1236,6 +1236,15 @@ // multiple times (e.g. initial login vs. multiprofile add session). if (state == session_manager::SessionState::ACTIVE) { InitializeShelf(); + } + // Recreates keyboard on user profile change, to refresh keyboard + // extensions with the new profile and the extensions call proper IME. + // |LOGGED_IN_NOT_ACTIVE| is needed so that the virtual keyboard works on + // supervised user creation. crbug.com/712873 + // |ACTIVE| is also needed for guest user workflow. + if ((state == session_manager::SessionState::LOGGED_IN_NOT_ACTIVE || + state == session_manager::SessionState::ACTIVE) && + keyboard::IsKeyboardEnabled()) { if (GetAshConfig() != Config::MASH) { // Recreate the keyboard after initial login and after multiprofile login. CreateKeyboard();
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc index 62bf1237..dad834e 100644 --- a/ash/shell_unittest.cc +++ b/ash/shell_unittest.cc
@@ -22,6 +22,7 @@ #include "ash/test/test_session_controller_client.h" #include "ash/wallpaper/wallpaper_widget_controller.h" #include "ash/wm/window_util.h" +#include "base/command_line.h" #include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" @@ -34,6 +35,9 @@ #include "ui/events/test/events_test_utils.h" #include "ui/events/test/test_event_handler.h" #include "ui/gfx/geometry/size.h" +#include "ui/keyboard/keyboard_controller.h" +#include "ui/keyboard/keyboard_switches.h" +#include "ui/keyboard/keyboard_util.h" #include "ui/views/controls/menu/menu_controller.h" #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/widget/widget.h" @@ -485,6 +489,23 @@ aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler); } +// Verifies keyboard is re-created on proper timing. +TEST_F(ShellTest, KeyboardCreation) { + if (Shell::GetAshConfig() == Config::MASH) + return; + base::CommandLine::ForCurrentProcess()->AppendSwitch( + keyboard::switches::kEnableVirtualKeyboard); + + ASSERT_TRUE(keyboard::IsKeyboardEnabled()); + + SessionObserver* shell = Shell::Get(); + EXPECT_FALSE(keyboard::KeyboardController::GetInstance()); + shell->OnSessionStateChanged( + session_manager::SessionState::LOGGED_IN_NOT_ACTIVE); + + EXPECT_TRUE(keyboard::KeyboardController::GetInstance()); +} + // This verifies WindowObservers are removed when a window is destroyed after // the Shell is destroyed. This scenario (aura::Windows being deleted after the // Shell) occurs if someone is holding a reference to an unparented Window, as
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn index 433497e..73e65db 100644 --- a/build/config/gcc/BUILD.gn +++ b/build/config/gcc/BUILD.gn
@@ -29,18 +29,12 @@ # # See http://gcc.gnu.org/wiki/Visibility config("symbol_visibility_hidden") { - # Note that -fvisibility-inlines-hidden is set globally in the compiler - # config since that can almost always be applied. cflags = [ "-fvisibility=hidden" ] # Visibility attribute is not supported on AIX. if (current_os != "aix") { - cflags_cc = [ - # Not exporting C++ inline functions can generally be applied anywhere - # so we do so here. Normal function visibility is controlled by - # //build/config/gcc:symbol_visibility_hidden. - "-fvisibility-inlines-hidden", - ] + cflags_cc = [ "-fvisibility-inlines-hidden" ] + cflags_objcc = cflags_cc } }
diff --git a/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn b/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn index b058c574..a7f1628 100644 --- a/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn +++ b/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
@@ -43,6 +43,8 @@ args += [ "--sdk", mac_sdk_path, + "--include", + rebase_path("../compat/mac", root_build_dir), ] } } @@ -92,6 +94,8 @@ "misc/pdb_structures.h", "misc/random_string.cc", "misc/random_string.h", + "misc/reinterpret_bytes.cc", + "misc/reinterpret_bytes.h", "misc/scoped_forbid_return.cc", "misc/scoped_forbid_return.h", "misc/symbolic_constants_common.h",
diff --git a/cc/surfaces/BUILD.gn b/cc/surfaces/BUILD.gn index 352d636b..b2ca53b 100644 --- a/cc/surfaces/BUILD.gn +++ b/cc/surfaces/BUILD.gn
@@ -60,6 +60,7 @@ "surface.h", "surface_aggregator.cc", "surface_aggregator.h", + "surface_deadline_observer.h", "surface_dependency_deadline.cc", "surface_dependency_deadline.h", "surface_dependency_tracker.cc",
diff --git a/cc/surfaces/surface_deadline_observer.h b/cc/surfaces/surface_deadline_observer.h new file mode 100644 index 0000000..0ffae07 --- /dev/null +++ b/cc/surfaces/surface_deadline_observer.h
@@ -0,0 +1,18 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_SURFACES_SURFACE_DEADLINE_OBSERVER_H_ +#define CC_SURFACES_SURFACE_DEADLINE_OBSERVER_H_ + +namespace cc { + +class SurfaceDeadlineObserver { + public: + // Called when a deadline passes for a set of dependencies. + virtual void OnDeadline() = 0; +}; + +} // namespace cc + +#endif // CC_SURFACES_SURFACE_DEADLINE_OBSERVER_H_
diff --git a/cc/surfaces/surface_dependency_deadline.cc b/cc/surfaces/surface_dependency_deadline.cc index 7bdbefcc..a641efd 100644 --- a/cc/surfaces/surface_dependency_deadline.cc +++ b/cc/surfaces/surface_dependency_deadline.cc
@@ -9,10 +9,8 @@ namespace cc { SurfaceDependencyDeadline::SurfaceDependencyDeadline( - SurfaceDependencyTracker* dependency_tracker, BeginFrameSource* begin_frame_source) - : dependency_tracker_(dependency_tracker), - begin_frame_source_(begin_frame_source) { + : begin_frame_source_(begin_frame_source) { DCHECK(begin_frame_source_); } @@ -42,7 +40,8 @@ return; Cancel(); - dependency_tracker_->OnDeadline(); + for (auto& observer : observer_list_) + observer.OnDeadline(); } const BeginFrameArgs& SurfaceDependencyDeadline::LastUsedBeginFrameArgs()
diff --git a/cc/surfaces/surface_dependency_deadline.h b/cc/surfaces/surface_dependency_deadline.h index f226bd0..b5b52b9 100644 --- a/cc/surfaces/surface_dependency_deadline.h +++ b/cc/surfaces/surface_dependency_deadline.h
@@ -7,19 +7,26 @@ #include "cc/scheduler/begin_frame_source.h" -namespace cc { +#include "cc/surfaces/surface_deadline_observer.h" -class SurfaceDependencyTracker; +namespace cc { class SurfaceDependencyDeadline : public BeginFrameObserver { public: - SurfaceDependencyDeadline(SurfaceDependencyTracker* dependency_tracker, - BeginFrameSource* begin_frame_source); + explicit SurfaceDependencyDeadline(BeginFrameSource* begin_frame_source); ~SurfaceDependencyDeadline() override; void Set(uint32_t number_of_frames_to_deadline); void Cancel(); + void AddObserver(SurfaceDeadlineObserver* obs) { + observer_list_.AddObserver(obs); + } + + void RemoveObserver(SurfaceDeadlineObserver* obs) { + observer_list_.RemoveObserver(obs); + } + bool has_deadline() const { return number_of_frames_to_deadline_.has_value(); } @@ -30,7 +37,7 @@ void OnBeginFrameSourcePausedChanged(bool paused) override; private: - SurfaceDependencyTracker* const dependency_tracker_; + base::ObserverList<SurfaceDeadlineObserver> observer_list_; BeginFrameSource* begin_frame_source_ = nullptr; base::Optional<uint32_t> number_of_frames_to_deadline_;
diff --git a/cc/surfaces/surface_dependency_tracker.cc b/cc/surfaces/surface_dependency_tracker.cc index 7199c90..758a2b0 100644 --- a/cc/surfaces/surface_dependency_tracker.cc +++ b/cc/surfaces/surface_dependency_tracker.cc
@@ -17,10 +17,13 @@ SurfaceDependencyTracker::SurfaceDependencyTracker( SurfaceManager* surface_manager, BeginFrameSource* begin_frame_source) - : surface_manager_(surface_manager), deadline_(this, begin_frame_source) {} + : surface_manager_(surface_manager), deadline_(begin_frame_source) { + deadline_.AddObserver(this); +} SurfaceDependencyTracker::~SurfaceDependencyTracker() { deadline_.Cancel(); + deadline_.RemoveObserver(this); } void SurfaceDependencyTracker::RequestSurfaceResolution(Surface* surface) {
diff --git a/cc/surfaces/surface_dependency_tracker.h b/cc/surfaces/surface_dependency_tracker.h index 45b543c..7ce52df 100644 --- a/cc/surfaces/surface_dependency_tracker.h +++ b/cc/surfaces/surface_dependency_tracker.h
@@ -29,7 +29,8 @@ // TODO(fsamuel): Deadlines should not be global. They should be scoped to a // surface subtree. However, that will not be possible until SurfaceReference // work is complete. -class CC_SURFACES_EXPORT SurfaceDependencyTracker { +class CC_SURFACES_EXPORT SurfaceDependencyTracker + : public SurfaceDeadlineObserver { public: SurfaceDependencyTracker(SurfaceManager* surface_manager, BeginFrameSource* begin_frame_source); @@ -41,7 +42,8 @@ bool has_deadline() const { return deadline_.has_deadline(); } - void OnDeadline(); + // SurfaceDeadlineObserver implementation: + void OnDeadline() override; void OnSurfaceActivated(Surface* surface); void OnSurfaceDependenciesChanged(
diff --git a/cc/surfaces/surface_synchronization_unittest.cc b/cc/surfaces/surface_synchronization_unittest.cc index 9b573261..c9983d75 100644 --- a/cc/surfaces/surface_synchronization_unittest.cc +++ b/cc/surfaces/surface_synchronization_unittest.cc
@@ -45,6 +45,28 @@ } // namespace +class FakeExternalBeginFrameSourceClient + : public FakeExternalBeginFrameSource::Client { + public: + FakeExternalBeginFrameSourceClient() = default; + ~FakeExternalBeginFrameSourceClient() = default; + + bool has_observers() const { return observer_count_ > 0; } + + // FakeExternalBeginFrameSource::Client implementation: + void OnAddObserver(BeginFrameObserver* obs) override { ++observer_count_; } + + void OnRemoveObserver(BeginFrameObserver* obs) override { + DCHECK_GT(observer_count_, 0); + --observer_count_; + } + + private: + int observer_count_ = 0; + + DISALLOW_COPY_AND_ASSIGN(FakeExternalBeginFrameSourceClient); +}; + class SurfaceSynchronizationTest : public testing::Test { public: SurfaceSynchronizationTest() @@ -98,6 +120,12 @@ return begin_frame_source_.get(); } + bool HasDeadline() { + bool has_deadline = dependency_tracker().has_deadline(); + EXPECT_EQ(has_deadline, begin_frame_source_client_.has_observers()); + return has_deadline; + } + FakeSurfaceObserver& surface_observer() { return surface_observer_; } // testing::Test: @@ -106,6 +134,7 @@ begin_frame_source_ = base::MakeUnique<FakeExternalBeginFrameSource>(0.f, false); + begin_frame_source_->SetClient(&begin_frame_source_client_); dependency_tracker_ = base::MakeUnique<SurfaceDependencyTracker>( &surface_manager_, begin_frame_source_.get()); surface_manager_.SetDependencyTracker(dependency_tracker_.get()); @@ -140,6 +169,7 @@ // SurfaceDependencyTracker depends on this BeginFrameSource and so it must // be destroyed AFTER the dependency tracker is destroyed. + begin_frame_source_->SetClient(nullptr); begin_frame_source_.reset(); supports_.clear(); @@ -153,6 +183,7 @@ private: SurfaceManager surface_manager_; FakeSurfaceObserver surface_observer_; + FakeExternalBeginFrameSourceClient begin_frame_source_client_; std::unique_ptr<FakeExternalBeginFrameSource> begin_frame_source_; std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_; std::vector<std::unique_ptr<CompositorFrameSinkSupport>> supports_; @@ -202,7 +233,7 @@ TransferableResourceArray())); // parent_support is blocked on |child_id1| and |child_id2|. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasActiveFrame()); EXPECT_TRUE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), @@ -213,7 +244,7 @@ child_support1().SubmitCompositorFrame(child_id1.local_surface_id(), MakeCompositorFrame()); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasActiveFrame()); EXPECT_TRUE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), @@ -224,7 +255,7 @@ child_support2().SubmitCompositorFrame(child_id2.local_surface_id(), MakeCompositorFrame()); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_TRUE(parent_surface()->HasActiveFrame()); EXPECT_FALSE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), IsEmpty()); @@ -242,7 +273,7 @@ TransferableResourceArray())); // parent_support is blocked on |child_id1|. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasActiveFrame()); EXPECT_TRUE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), @@ -256,7 +287,7 @@ TransferableResourceArray())); // child_support1 should now be blocked on |child_id2|. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(child_surface1()->HasActiveFrame()); EXPECT_TRUE(child_surface1()->HasPendingFrame()); EXPECT_THAT(child_surface1()->blocking_surfaces(), @@ -276,7 +307,7 @@ MakeCompositorFrame(empty_surface_ids(), empty_surface_ids(), TransferableResourceArray())); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); // child_surface1 should now be active. EXPECT_TRUE(child_surface1()->HasActiveFrame()); @@ -307,7 +338,7 @@ TransferableResourceArray())); // parent_support is blocked on |child_id2|. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasActiveFrame()); EXPECT_TRUE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), @@ -319,7 +350,7 @@ MakeCompositorFrame({child_id2}, empty_surface_ids(), TransferableResourceArray())); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(child_surface1()->HasActiveFrame()); EXPECT_TRUE(child_surface1()->HasPendingFrame()); EXPECT_THAT(child_surface1()->blocking_surfaces(), @@ -334,7 +365,7 @@ child_support2().SubmitCompositorFrame(child_id2.local_surface_id(), MakeCompositorFrame()); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); // child_surface1 should now be active. EXPECT_TRUE(child_surface1()->HasActiveFrame()); @@ -360,7 +391,7 @@ TransferableResourceArray())); // parent_support is blocked on |child_id1|. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasActiveFrame()); EXPECT_TRUE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), @@ -372,7 +403,7 @@ TransferableResourceArray())); // child_support1 should now be blocked on |child_id2|. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_FALSE(child_surface1()->HasActiveFrame()); EXPECT_TRUE(child_surface1()->HasPendingFrame()); EXPECT_THAT(child_surface1()->blocking_surfaces(), @@ -388,7 +419,7 @@ for (int i = 0; i < 3; ++i) { begin_frame_source()->TestOnBeginFrame(args); // There is still a looming deadline! Eeek! - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); // parent_support is still blocked on |child_id1|. EXPECT_FALSE(parent_surface()->HasActiveFrame()); @@ -406,7 +437,7 @@ begin_frame_source()->TestOnBeginFrame(args); // The deadline has passed. - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); // parent_surface has been activated. EXPECT_TRUE(parent_surface()->HasActiveFrame()); @@ -432,7 +463,7 @@ MakeCompositorFrame({arbitrary_id}, empty_surface_ids(), TransferableResourceArray())); // The deadline has been set. - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); // support(i) should be blocked on arbitrary_id. EXPECT_FALSE(surface(i)->HasActiveFrame()); @@ -644,7 +675,7 @@ EXPECT_TRUE(parent_surface()->HasActiveFrame()); EXPECT_FALSE(parent_surface()->HasPendingFrame()); EXPECT_THAT(parent_surface()->blocking_surfaces(), IsEmpty()); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); } // This test verifies that if a surface has both a pending and active @@ -1077,7 +1108,7 @@ MakeCompositorFrame({parent_id1}, empty_surface_ids(), TransferableResourceArray())); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); BeginFrameArgs args = CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1); @@ -1085,10 +1116,10 @@ // Advance BeginFrames to trigger a deadline. for (int i = 0; i < 3; ++i) { begin_frame_source()->TestOnBeginFrame(args); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); } begin_frame_source()->TestOnBeginFrame(args); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_TRUE(display_surface()->HasActiveFrame()); EXPECT_FALSE(display_surface()->HasPendingFrame()); @@ -1141,7 +1172,7 @@ MakeCompositorFrame({parent_id1}, {parent_id1}, TransferableResourceArray())); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_TRUE(display_surface()->HasPendingFrame()); EXPECT_FALSE(display_surface()->HasActiveFrame()); @@ -1151,10 +1182,10 @@ CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1); for (int i = 0; i < 3; ++i) { begin_frame_source()->TestOnBeginFrame(args); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); } begin_frame_source()->TestOnBeginFrame(args); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_FALSE(display_surface()->HasPendingFrame()); EXPECT_TRUE(display_surface()->HasActiveFrame()); @@ -1179,10 +1210,10 @@ // should not cause a crash or use-after-free. for (int i = 0; i < 3; ++i) { begin_frame_source()->TestOnBeginFrame(args); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); } begin_frame_source()->TestOnBeginFrame(args); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); } // This test verifies that a CompositorFrame will only blocked on embedded @@ -1204,7 +1235,7 @@ EXPECT_TRUE(display_surface()->HasPendingFrame()); EXPECT_FALSE(display_surface()->HasActiveFrame()); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); // Verify that the display CompositorFrame will only block on |parent_id1| but // not |parent_id2|. @@ -1219,7 +1250,7 @@ parent_support().SubmitCompositorFrame(parent_id1.local_surface_id(), MakeCompositorFrame()); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_FALSE(display_surface()->HasPendingFrame()); EXPECT_TRUE(display_surface()->HasActiveFrame()); EXPECT_THAT(display_surface()->blocking_surfaces(), IsEmpty()); @@ -1239,7 +1270,7 @@ EXPECT_TRUE(display_surface()->HasPendingFrame()); EXPECT_FALSE(display_surface()->HasActiveFrame()); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); // Advance BeginFrames to trigger a deadline. This activates the // CompositorFrame submitted above. @@ -1247,10 +1278,10 @@ CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1); for (int i = 0; i < 3; ++i) { begin_frame_source()->TestOnBeginFrame(args); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); } begin_frame_source()->TestOnBeginFrame(args); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_FALSE(display_surface()->HasPendingFrame()); EXPECT_TRUE(display_surface()->HasActiveFrame()); @@ -1260,7 +1291,7 @@ parent_id1.local_surface_id(), MakeCompositorFrame({child_id1}, empty_surface_ids(), TransferableResourceArray())); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasPendingFrame()); EXPECT_TRUE(parent_surface()->HasActiveFrame()); } @@ -1302,7 +1333,7 @@ parent_id1.local_surface_id(), MakeCompositorFrame({child_id2}, {child_id1}, TransferableResourceArray())); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); EXPECT_TRUE(parent_surface()->HasPendingFrame()); EXPECT_FALSE(parent_surface()->HasActiveFrame()); @@ -1329,10 +1360,10 @@ CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1); for (int i = 0; i < 3; ++i) { begin_frame_source()->TestOnBeginFrame(args); - EXPECT_TRUE(dependency_tracker().has_deadline()); + EXPECT_TRUE(HasDeadline()); } begin_frame_source()->TestOnBeginFrame(args); - EXPECT_FALSE(dependency_tracker().has_deadline()); + EXPECT_FALSE(HasDeadline()); EXPECT_FALSE(parent_surface()->HasPendingFrame()); EXPECT_TRUE(parent_surface()->HasActiveFrame());
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc index 46f7d87c..4713e8b 100644 --- a/cc/tiles/gpu_image_decode_cache.cc +++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -110,6 +110,38 @@ return MipMapUtil::GetSizeForLevel(base_size, mip_level); } +// Draws and scales the provided |draw_image| into the |target_pixmap|. If the +// draw/scale can be done directly, calls directly into SkImage::scalePixels, +// if not, decodes to a compatible temporary pixmap and then converts that into +// the |target_pixmap|. +bool DrawAndScaleImage(const DrawImage& draw_image, SkPixmap* target_pixmap) { + const SkImage* image = draw_image.image().get(); + if (image->dimensions() == target_pixmap->bounds().size() || + target_pixmap->info().colorType() == kN32_SkColorType) { + // If no scaling is occurring, or if the target colortype is already N32, + // just scale directly. + return image->scalePixels(*target_pixmap, + CalculateUploadScaleFilterQuality(draw_image), + SkImage::kDisallow_CachingHint); + } + + // If the target colortype is not N32, it may be impossible to scale + // directly. Instead scale into an N32 pixmap, and convert that into the + // |target_pixmap|. + SkImageInfo decode_info = + target_pixmap->info().makeColorType(kN32_SkColorType); + SkBitmap decode_bitmap; + if (!decode_bitmap.tryAllocPixels(decode_info)) + return false; + SkPixmap decode_pixmap(decode_bitmap.info(), decode_bitmap.getPixels(), + decode_bitmap.rowBytes()); + if (!image->scalePixels(decode_pixmap, + CalculateUploadScaleFilterQuality(draw_image), + SkImage::kDisallow_CachingHint)) + return false; + return decode_pixmap.readPixels(*target_pixmap); +} + } // namespace // static @@ -1117,9 +1149,7 @@ backing_memory->data(), image_info.minRowBytes()); // Note that scalePixels falls back to readPixels if the scale is 1x, so // no need to special case that as an optimization. - if (!draw_image.image()->scalePixels( - image_pixmap, CalculateUploadScaleFilterQuality(draw_image), - SkImage::kDisallow_CachingHint)) { + if (!DrawAndScaleImage(draw_image, &image_pixmap)) { DLOG(ERROR) << "scalePixels failed."; backing_memory->Unlock(); backing_memory.reset();
diff --git a/cc/tiles/gpu_image_decode_cache_unittest.cc b/cc/tiles/gpu_image_decode_cache_unittest.cc index 8599887b..a5ae6730 100644 --- a/cc/tiles/gpu_image_decode_cache_unittest.cc +++ b/cc/tiles/gpu_image_decode_cache_unittest.cc
@@ -8,6 +8,7 @@ #include "cc/test/test_context_provider.h" #include "cc/test/test_tile_task_runner.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkImageGenerator.h" #include "third_party/skia/include/core/SkRefCnt.h" namespace cc { @@ -26,20 +27,39 @@ size_t kGpuMemoryLimitBytes = 96 * 1024 * 1024; class TestGpuImageDecodeCache : public GpuImageDecodeCache { public: - explicit TestGpuImageDecodeCache(ContextProvider* context) + explicit TestGpuImageDecodeCache(ContextProvider* context, + ResourceFormat format) : GpuImageDecodeCache(context, - ResourceFormat::RGBA_8888, + format, kGpuMemoryLimitBytes, kGpuMemoryLimitBytes) {} }; +class TestImageGenerator : public SkImageGenerator { + public: + explicit TestImageGenerator(const SkImageInfo& info) + : SkImageGenerator(info), + image_backing_memory_(info.getSafeSize(info.minRowBytes()), 0), + image_pixmap_(info, image_backing_memory_.data(), info.minRowBytes()) {} + + protected: + bool onGetPixels(const SkImageInfo& info, + void* pixels, + size_t rowBytes, + const Options&) override { + return image_pixmap_.readPixels(info, pixels, rowBytes, 0, 0); + } + + private: + std::vector<uint8_t> image_backing_memory_; + SkPixmap image_pixmap_; +}; + sk_sp<SkImage> CreateImage(int width, int height) { - SkBitmap bitmap; gfx::ColorSpace color_space = gfx::ColorSpace::CreateSRGB(); - bitmap.allocPixels( - SkImageInfo::MakeN32Premul(width, height, color_space.ToSkColorSpace())); - bitmap.eraseColor(0); - return SkImage::MakeFromBitmap(bitmap); + std::unique_ptr<TestImageGenerator> generator(new TestImageGenerator( + SkImageInfo::MakeN32Premul(width, height, color_space.ToSkColorSpace()))); + return SkImage::MakeFromGenerator(std::move(generator)); } SkMatrix CreateMatrix(const SkSize& scale, bool is_decomposable) { @@ -54,10 +74,12 @@ return matrix; } -TEST(GpuImageDecodeCacheTest, GetTaskForImageSameImage) { +using GpuImageDecodeCacheTest = ::testing::TestWithParam<ResourceFormat>; + +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageSameImage) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); sk_sp<SkImage> image = CreateImage(100, 100); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -89,10 +111,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageSmallerScale) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageSmallerScale) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); sk_sp<SkImage> image = CreateImage(100, 100); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -124,10 +146,10 @@ cache.UnrefImage(another_draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageLowerQuality) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageLowerQuality) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); sk_sp<SkImage> image = CreateImage(100, 100); bool is_decomposable = true; SkMatrix matrix = CreateMatrix(SkSize::Make(0.4f, 0.4f), is_decomposable); @@ -157,10 +179,10 @@ cache.UnrefImage(another_draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageDifferentImage) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageDifferentImage) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -198,10 +220,10 @@ cache.UnrefImage(second_draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageLargerScale) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageLargerScale) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -252,10 +274,10 @@ cache.UnrefImage(third_draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageLargerScaleNoReuse) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageLargerScaleNoReuse) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -304,10 +326,10 @@ cache.UnrefImage(third_draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageHigherQuality) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageHigherQuality) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkMatrix matrix = CreateMatrix(SkSize::Make(0.4f, 0.4f), is_decomposable); @@ -344,10 +366,10 @@ cache.UnrefImage(second_draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageAlreadyDecodedAndLocked) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageAlreadyDecodedAndLocked) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -390,10 +412,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageAlreadyDecodedNotLocked) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageAlreadyDecodedNotLocked) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -436,10 +458,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageAlreadyUploaded) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageAlreadyUploaded) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -472,10 +494,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageCanceledGetsNewTask) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageCanceledGetsNewTask) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -520,10 +542,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageCanceledWhileReffedGetsNewTask) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageCanceledWhileReffedGetsNewTask) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -572,10 +594,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, NoTaskForImageAlreadyFailedDecoding) { +TEST_P(GpuImageDecodeCacheTest, NoTaskForImageAlreadyFailedDecoding) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -606,10 +628,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetDecodedImageForDraw) { +TEST_P(GpuImageDecodeCacheTest, GetDecodedImageForDraw) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -641,10 +663,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetLargeDecodedImageForDraw) { +TEST_P(GpuImageDecodeCacheTest, GetLargeDecodedImageForDraw) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -677,10 +699,10 @@ EXPECT_FALSE(cache.DiscardableIsLockedForTesting(draw_image)); } -TEST(GpuImageDecodeCacheTest, GetDecodedImageForDrawAtRasterDecode) { +TEST_P(GpuImageDecodeCacheTest, GetDecodedImageForDrawAtRasterDecode) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -711,10 +733,10 @@ cache.DrawWithImageFinished(draw_image, decoded_draw_image); } -TEST(GpuImageDecodeCacheTest, GetDecodedImageForDrawLargerScale) { +TEST_P(GpuImageDecodeCacheTest, GetDecodedImageForDrawLargerScale) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -770,10 +792,10 @@ cache.UnrefImage(larger_draw_image); } -TEST(GpuImageDecodeCacheTest, GetDecodedImageForDrawHigherQuality) { +TEST_P(GpuImageDecodeCacheTest, GetDecodedImageForDrawHigherQuality) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkMatrix matrix = CreateMatrix(SkSize::Make(0.5f, 0.5f), is_decomposable); @@ -828,10 +850,10 @@ cache.UnrefImage(higher_quality_draw_image); } -TEST(GpuImageDecodeCacheTest, GetDecodedImageForDrawNegative) { +TEST_P(GpuImageDecodeCacheTest, GetDecodedImageForDrawNegative) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -865,10 +887,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, GetLargeScaledDecodedImageForDraw) { +TEST_P(GpuImageDecodeCacheTest, GetLargeScaledDecodedImageForDraw) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -904,10 +926,10 @@ EXPECT_FALSE(cache.DiscardableIsLockedForTesting(draw_image)); } -TEST(GpuImageDecodeCacheTest, AtRasterUsedDirectlyIfSpaceAllows) { +TEST_P(GpuImageDecodeCacheTest, AtRasterUsedDirectlyIfSpaceAllows) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -949,11 +971,11 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, - GetDecodedImageForDrawAtRasterDecodeMultipleTimes) { +TEST_P(GpuImageDecodeCacheTest, + GetDecodedImageForDrawAtRasterDecodeMultipleTimes) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -984,11 +1006,11 @@ cache.DrawWithImageFinished(draw_image, another_decoded_draw_image); } -TEST(GpuImageDecodeCacheTest, - GetLargeDecodedImageForDrawAtRasterDecodeMultipleTimes) { +TEST_P(GpuImageDecodeCacheTest, + GetLargeDecodedImageForDrawAtRasterDecodeMultipleTimes) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1022,10 +1044,10 @@ EXPECT_FALSE(cache.DiscardableIsLockedForTesting(draw_image)); } -TEST(GpuImageDecodeCacheTest, ZeroSizedImagesAreSkipped) { +TEST_P(GpuImageDecodeCacheTest, ZeroSizedImagesAreSkipped) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1051,10 +1073,10 @@ cache.DrawWithImageFinished(draw_image, decoded_draw_image); } -TEST(GpuImageDecodeCacheTest, NonOverlappingSrcRectImagesAreSkipped) { +TEST_P(GpuImageDecodeCacheTest, NonOverlappingSrcRectImagesAreSkipped) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1081,10 +1103,10 @@ cache.DrawWithImageFinished(draw_image, decoded_draw_image); } -TEST(GpuImageDecodeCacheTest, CanceledTasksDoNotCountAgainstBudget) { +TEST_P(GpuImageDecodeCacheTest, CanceledTasksDoNotCountAgainstBudget) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1111,10 +1133,10 @@ EXPECT_EQ(0u, cache.GetBytesUsedForTesting()); } -TEST(GpuImageDecodeCacheTest, ShouldAggressivelyFreeResources) { +TEST_P(GpuImageDecodeCacheTest, ShouldAggressivelyFreeResources) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1175,10 +1197,10 @@ } } -TEST(GpuImageDecodeCacheTest, OrphanedImagesFreeOnReachingZeroRefs) { +TEST_P(GpuImageDecodeCacheTest, OrphanedImagesFreeOnReachingZeroRefs) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1234,10 +1256,10 @@ cache.GetDrawImageSizeForTesting(second_draw_image)); } -TEST(GpuImageDecodeCacheTest, OrphanedZeroRefImagesImmediatelyDeleted) { +TEST_P(GpuImageDecodeCacheTest, OrphanedZeroRefImagesImmediatelyDeleted) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1286,10 +1308,10 @@ cache.GetDrawImageSizeForTesting(second_draw_image)); } -TEST(GpuImageDecodeCacheTest, QualityCappedAtMedium) { +TEST_P(GpuImageDecodeCacheTest, QualityCappedAtMedium) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); sk_sp<SkImage> image = CreateImage(100, 100); bool is_decomposable = true; SkMatrix matrix = CreateMatrix(SkSize::Make(0.4f, 0.4f), is_decomposable); @@ -1338,10 +1360,10 @@ // Ensure that switching to a mipped version of an image after the initial // cache entry creation doesn't cause a buffer overflow/crash. -TEST(GpuImageDecodeCacheTest, GetDecodedImageForDrawMipUsageChange) { +TEST_P(GpuImageDecodeCacheTest, GetDecodedImageForDrawMipUsageChange) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1379,10 +1401,10 @@ cache.DrawWithImageFinished(draw_image_mips, decoded_draw_image); } -TEST(GpuImageDecodeCacheTest, MemoryStateSuspended) { +TEST_P(GpuImageDecodeCacheTest, MemoryStateSuspended) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); // First Insert an image into our cache. sk_sp<SkImage> image = CreateImage(1, 1); @@ -1450,10 +1472,10 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, OutOfRasterDecodeTask) { +TEST_P(GpuImageDecodeCacheTest, OutOfRasterDecodeTask) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); sk_sp<SkImage> image = CreateImage(1, 1); bool is_decomposable = true; @@ -1477,7 +1499,7 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, ZeroCacheNormalWorkingSet) { +TEST_P(GpuImageDecodeCacheTest, ZeroCacheNormalWorkingSet) { // Setup - Image cache has a normal working set, but zero cache size. auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); @@ -1532,7 +1554,7 @@ cache.UnrefImage(draw_image); } -TEST(GpuImageDecodeCacheTest, SmallCacheNormalWorkingSet) { +TEST_P(GpuImageDecodeCacheTest, SmallCacheNormalWorkingSet) { // Cache will fit one (but not two) 100x100 images. size_t cache_size = 190 * 100 * 4; @@ -1626,10 +1648,10 @@ } } -TEST(GpuImageDecodeCacheTest, ClearCache) { +TEST_P(GpuImageDecodeCacheTest, ClearCache) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1662,10 +1684,10 @@ EXPECT_EQ(cache.GetNumCacheEntriesForTesting(), 0u); } -TEST(GpuImageDecodeCacheTest, ClearCacheInUse) { +TEST_P(GpuImageDecodeCacheTest, ClearCacheInUse) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1700,10 +1722,10 @@ EXPECT_EQ(cache.GetNumCacheEntriesForTesting(), 0u); } -TEST(GpuImageDecodeCacheTest, GetTaskForImageDifferentColorSpace) { +TEST_P(GpuImageDecodeCacheTest, GetTaskForImageDifferentColorSpace) { auto context_provider = TestContextProvider::Create(); context_provider->BindToCurrentThread(); - TestGpuImageDecodeCache cache(context_provider.get()); + TestGpuImageDecodeCache cache(context_provider.get(), GetParam()); bool is_decomposable = true; SkFilterQuality quality = kHigh_SkFilterQuality; @@ -1752,5 +1774,10 @@ cache.UnrefImage(third_draw_image); } +INSTANTIATE_TEST_CASE_P(GpuImageDecodeCacheTests, + GpuImageDecodeCacheTest, + ::testing::Values(ResourceFormat::RGBA_8888, + ResourceFormat::RGBA_4444)); + } // namespace } // namespace cc
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn index 7024bd3..fdc06eb 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -1678,6 +1678,12 @@ ] } + java_cpp_enum("credit_card_javagen") { + sources = [ + "../components/autofill/core/browser/credit_card.h", + ] + } + java_cpp_enum("signin_metrics_enum_javagen") { sources = [ "../components/signin/core/browser/signin_metrics.h",
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index f1f0836..6690f82 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -250,6 +250,7 @@ ":resource_id_javagen", "//chrome:content_setting_javagen", "//chrome:content_settings_type_javagen", + "//chrome:credit_card_javagen", "//chrome:data_use_ui_message_enum_javagen", "//chrome:offline_pages_enum_javagen", "//chrome:page_info_connection_type_javagen",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java index 62ce02e..1e44667 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
@@ -352,7 +352,9 @@ */ public static class CreditCard { // Note that while some of these fields are numbers, they're predominantly read, - // marshaled and compared as strings. To save conversions, we use strings everywhere. + // marshaled and compared as strings. To save conversions, we sometimes use strings. + @CardType + private final int mCardType; private String mGUID; private String mOrigin; private boolean mIsLocal; @@ -371,16 +373,17 @@ public static CreditCard create(String guid, String origin, boolean isLocal, boolean isCached, String name, String number, String obfuscatedNumber, String month, String year, String basicCardIssuerNetwork, int enumeratedIconId, - String billingAddressId, String serverId) { + @CardType int cardType, String billingAddressId, String serverId) { return new CreditCard(guid, origin, isLocal, isCached, name, number, obfuscatedNumber, month, year, basicCardIssuerNetwork, - ResourceId.mapToDrawableId(enumeratedIconId), billingAddressId, serverId); + ResourceId.mapToDrawableId(enumeratedIconId), cardType, billingAddressId, + serverId); } public CreditCard(String guid, String origin, boolean isLocal, boolean isCached, String name, String number, String obfuscatedNumber, String month, String year, - String basicCardIssuerNetwork, int issuerIconDrawableId, String billingAddressId, - String serverId) { + String basicCardIssuerNetwork, int issuerIconDrawableId, @CardType int cardType, + String billingAddressId, String serverId) { mGUID = guid; mOrigin = origin; mIsLocal = isLocal; @@ -392,6 +395,7 @@ mYear = year; mBasicCardIssuerNetwork = basicCardIssuerNetwork; mIssuerIconDrawableId = issuerIconDrawableId; + mCardType = cardType; mBillingAddressId = billingAddressId; mServerId = serverId; } @@ -400,7 +404,7 @@ this("" /* guid */, AutofillAndPaymentsPreferences.SETTINGS_ORIGIN /*origin */, true /* isLocal */, false /* isCached */, "" /* name */, "" /* number */, "" /* obfuscatedNumber */, "" /* month */, "" /* year */, - "" /* basicCardIssuerNetwork */, 0 /* issuerIconDrawableId */, + "" /* basicCardIssuerNetwork */, 0 /* issuerIconDrawableId */, CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */); } @@ -410,7 +414,8 @@ String obfuscatedNumber, String month, String year) { this(guid, origin, true /* isLocal */, false /* isCached */, name, number, obfuscatedNumber, month, year, "" /* basicCardIssuerNetwork */, - 0 /* issuerIconDrawableId */, "" /* billingAddressId */, "" /* serverId */); + 0 /* issuerIconDrawableId */, CardType.UNKNOWN, "" /* billingAddressId */, + "" /* serverId */); } @CalledByNative("CreditCard") @@ -472,6 +477,12 @@ return mIssuerIconDrawableId; } + @CardType + @CalledByNative("CreditCard") + public int getCardType() { + return mCardType; + } + @CalledByNative("CreditCard") public String getBillingAddressId() { return mBillingAddressId;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java index 630e4c9..2f7049c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java
@@ -574,4 +574,9 @@ @Override public void dismissInstrument() {} + + @Override + public int getAdditionalAppTextResourceId() { + return 0; + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java index 6b769b43..643b3a8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentApp.java
@@ -7,11 +7,14 @@ import android.os.Handler; import android.text.TextUtils; +import org.chromium.chrome.R; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.content_public.browser.WebContents; import org.chromium.payments.mojom.BasicCardNetwork; +import org.chromium.payments.mojom.BasicCardType; import org.chromium.payments.mojom.PaymentItem; import org.chromium.payments.mojom.PaymentMethodData; @@ -29,7 +32,11 @@ /** The method name for any type of credit card. */ public static final String BASIC_CARD_METHOD_NAME = "basic-card"; + /** The total number of all possible card types (i.e., credit, debit, prepaid, unknown). */ + private static final int TOTAL_NUMBER_OF_CARD_TYPES = 4; + private final WebContents mWebContents; + private Set<Integer> mBasicCardTypes; /** * Builds a payment app backed by autofill cards. @@ -50,11 +57,13 @@ Set<String> basicCardSupportedNetworks = convertBasicCardToNetworks(methodDataMap.get(BASIC_CARD_METHOD_NAME)); + mBasicCardTypes = convertBasicCardToTypes(methodDataMap.get(BASIC_CARD_METHOD_NAME)); for (int i = 0; i < cards.size(); i++) { CreditCard card = cards.get(i); AutofillProfile billingAddress = TextUtils.isEmpty(card.getBillingAddressId()) - ? null : pdm.getProfile(card.getBillingAddressId()); + ? null + : pdm.getProfile(card.getBillingAddressId()); if (billingAddress != null && AutofillAddress.checkAddressCompletionStatus( @@ -73,9 +82,18 @@ methodName = card.getBasicCardIssuerNetwork(); } - if (methodName != null) { - instruments.add(new AutofillPaymentInstrument( - mWebContents, card, billingAddress, methodName)); + if (methodName != null && mBasicCardTypes.contains(card.getCardType())) { + // Whether this card matches the card type (credit, debit, prepaid) exactly. If the + // merchant requests all card types, then this is always true. If the merchant + // requests only a subset of card types, then this is false for "unknown" card + // types. The "unknown" card types is where Chrome is unable to determine the type + // of card. Cards that don't match the card type exactly cannot be pre-selected in + // the UI. + boolean matchesMerchantCardTypeExactly = card.getCardType() != CardType.UNKNOWN + || mBasicCardTypes.size() == TOTAL_NUMBER_OF_CARD_TYPES; + + instruments.add(new AutofillPaymentInstrument(mWebContents, card, billingAddress, + methodName, matchesMerchantCardTypeExactly)); } } @@ -107,6 +125,29 @@ return result; } + /** + * @return A set of card types (e.g., CardType.DEBIT, CardType.PREPAID) + * accepted by "basic-card" method. + */ + public static Set<Integer> convertBasicCardToTypes(PaymentMethodData data) { + Set<Integer> result = new HashSet<>(); + result.add(CardType.UNKNOWN); + + Map<Integer, Integer> cardTypes = getCardTypes(); + if (data == null || data.supportedTypes == null || data.supportedTypes.length == 0) { + // Merchant website supports all card types. + result.addAll(cardTypes.values()); + } else { + // Merchant website supports some card types. + for (int i = 0; i < data.supportedTypes.length; i++) { + Integer cardType = cardTypes.get(data.supportedTypes[i]); + if (cardType != null) result.add(cardType); + } + } + + return result; + } + private static Map<Integer, String> getNetworks() { Map<Integer, String> networks = new HashMap<>(); networks.put(BasicCardNetwork.AMEX, "amex"); @@ -120,6 +161,14 @@ return networks; } + private static Map<Integer, Integer> getCardTypes() { + Map<Integer, Integer> cardTypes = new HashMap<>(); + cardTypes.put(BasicCardType.CREDIT, CardType.CREDIT); + cardTypes.put(BasicCardType.DEBIT, CardType.DEBIT); + cardTypes.put(BasicCardType.PREPAID, CardType.PREPAID); + return cardTypes; + } + @Override public Set<String> getAppMethodNames() { Set<String> methods = new HashSet<>(getNetworks().values()); @@ -151,4 +200,28 @@ public String getAppIdentifier() { return "Chrome_Autofill_Payment_App"; } + + @Override + public int getAdditionalAppTextResourceId() { + // If the merchant has restricted the accepted card types (credit, debit, prepaid), then the + // list of payment instruments should include a message describing the accepted card types, + // e.g., "Debit cards are accepted" or "Debit and prepaid cards are accepted." + if (mBasicCardTypes == null || mBasicCardTypes.size() == TOTAL_NUMBER_OF_CARD_TYPES) { + return 0; + } + + int credit = mBasicCardTypes.contains(CardType.CREDIT) ? 1 : 0; + int debit = mBasicCardTypes.contains(CardType.DEBIT) ? 1 : 0; + int prepaid = mBasicCardTypes.contains(CardType.PREPAID) ? 1 : 0; + int[][][] resourceIds = new int[2][2][2]; + resourceIds[0][0][0] = 0; + resourceIds[0][0][1] = R.string.payments_prepaid_cards_are_accepted_label; + resourceIds[0][1][0] = R.string.payments_debit_cards_are_accepted_label; + resourceIds[0][1][1] = R.string.payments_debit_prepaid_cards_are_accepted_label; + resourceIds[1][0][0] = R.string.payments_credit_cards_are_accepted_label; + resourceIds[1][0][1] = R.string.payments_credit_prepaid_cards_are_accepted_label; + resourceIds[1][1][0] = R.string.payments_credit_debit_cards_are_accepted_label; + resourceIds[1][1][1] = 0; + return resourceIds[credit][debit][prepaid]; + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java index 80d6156..94465d53 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java
@@ -36,6 +36,7 @@ public class AutofillPaymentInstrument extends PaymentInstrument implements FullCardRequestDelegate, NormalizedAddressRequestDelegate { private final WebContents mWebContents; + private final boolean mIsMatchingMerchantsRequestedCardType; private CreditCard mCard; private String mSecurityCode; @Nullable private AutofillProfile mBillingAddress; @@ -48,19 +49,26 @@ /** * Builds a payment instrument for the given credit card. * - * @param webContents The web contents where PaymentRequest was invoked. - * @param card The autofill card that can be used for payment. - * @param billingAddress The billing address for the card. - * @param methodName The payment method name, e.g., "basic-card", "visa", amex", or null. + * @param webContents The web contents where PaymentRequest was invoked. + * @param card The autofill card that can be used for payment. + * @param billingAddress The billing address for the card. + * @param methodName The payment method name, e.g., "basic-card", "visa", + * amex", or null. + * @param matchesMerchantCardTypeExactly Whether the card type (credit, debit, prepaid) matches + * the type that the merchant has requested exactly. This + * should be false for unknown card types, if the merchant + * cannot accept some card types. */ public AutofillPaymentInstrument(WebContents webContents, CreditCard card, - @Nullable AutofillProfile billingAddress, @Nullable String methodName) { + @Nullable AutofillProfile billingAddress, @Nullable String methodName, + boolean matchesMerchantCardTypeExactly) { super(card.getGUID(), card.getObfuscatedNumber(), card.getName(), null); mWebContents = webContents; mCard = card; mBillingAddress = billingAddress; mIsEditable = true; mMethodName = methodName; + mIsMatchingMerchantsRequestedCardType = matchesMerchantCardTypeExactly; Context context = ChromeActivity.fromWebContents(mWebContents); if (context == null) return; @@ -91,6 +99,27 @@ } @Override + public boolean isExactlyMatchingMerchantRequest() { + return mIsMatchingMerchantsRequestedCardType; + } + + @Override + @Nullable + public String getCountryCode() { + return AutofillAddress.getCountryCode(mBillingAddress); + } + + @Override + public boolean canMakePayment() { + return mHasValidNumberAndName; // Ignore absence of billing address. + } + + @Override + public boolean canPreselect() { + return mIsComplete && mIsMatchingMerchantsRequestedCardType; + } + + @Override public void invokePaymentApp(String unusedRequestId, String unusedMerchantName, String unusedOrigin, String unusedIFrameOrigin, byte[][] unusedCertificateChain, Map<String, PaymentMethodData> unusedMethodDataMap, PaymentItem unusedTotal, @@ -234,14 +263,6 @@ } /** - * @return Whether the card number is valid and name on card is non-empty. Billing address is - * not taken into consideration. - */ - public boolean isValidCard() { - return mHasValidNumberAndName; - } - - /** * Updates the instrument and marks it "complete." Called after the user has edited this * instrument. * @@ -338,11 +359,6 @@ return mCard; } - /** @return The billing address associated with this credit card. */ - public AutofillProfile getBillingAddress() { - return mBillingAddress; - } - @Override public String getPreviewString(String labelSeparator, int maxLength) { StringBuilder previewString = new StringBuilder(getLabel());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java index 281c0fb..8546d4fa 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java
@@ -15,6 +15,7 @@ import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.Callback; import org.chromium.chrome.R; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.CreditCardScanner; import org.chromium.chrome.browser.autofill.PersonalDataManager; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; @@ -89,7 +90,7 @@ /** The dropdown key that triggers the address editor to add a new billing address. */ private static final String BILLING_ADDRESS_ADD_NEW = "add"; - /** The shared preference for the 'save card to device' checkbox status*/ + /** The shared preference for the 'save card to device' checkbox status. */ private static final String CHECK_SAVE_CARD_TO_DEVICE = "check_save_card_to_device"; /** The web contents where the web payments API is invoked. */ @@ -132,6 +133,11 @@ private final Set<String> mAcceptedBasicCardIssuerNetworks; /** + * The accepted card types: CardType.UNKNOWN, CardType.CREDIT, CardType.DEBIT, CardType.PREPAID. + */ + private final Set<Integer> mAcceptedBasicCardTypes; + + /** * The information about the accepted card issuer networks. Used in the editor as a hint to the * user about the valid card issuer networks. This is important to keep in a list, because the * display order matters. @@ -229,6 +235,7 @@ mAcceptedIssuerNetworks = new HashSet<>(); mAcceptedBasicCardIssuerNetworks = new HashSet<>(); + mAcceptedBasicCardTypes = new HashSet<>(); mAcceptedCardIssuerNetworks = new ArrayList<>(); mHandler = new Handler(); @@ -313,6 +320,8 @@ addAcceptedNetwork(network); } } + + mAcceptedBasicCardTypes.addAll(AutofillPaymentApp.convertBasicCardToTypes(data)); } } } @@ -356,7 +365,8 @@ // Ensure that |instrument| and |card| are never null. final AutofillPaymentInstrument instrument = isNewCard ? new AutofillPaymentInstrument(mWebContents, new CreditCard(), - null /* billingAddress */, null /* methodName */) + null /* billingAddress */, null /* methodName */, + false /* matchesMerchantCardTypeExactly */) : toEdit; final CreditCard card = instrument.getCard(); @@ -470,8 +480,7 @@ descriptions.add(mAcceptedCardIssuerNetworks.get(i).description); } mIconHint = EditorFieldModel.createIconList( - mContext.getString(R.string.payments_accepted_cards_label), icons, - descriptions); + mContext.getString(getAcceptedCardsLabelResourceId()), icons, descriptions); } editor.addField(mIconHint); @@ -581,6 +590,22 @@ editor.addField(mYearField); } + private int getAcceptedCardsLabelResourceId() { + int credit = mAcceptedBasicCardTypes.contains(CardType.CREDIT) ? 1 : 0; + int debit = mAcceptedBasicCardTypes.contains(CardType.DEBIT) ? 1 : 0; + int prepaid = mAcceptedBasicCardTypes.contains(CardType.PREPAID) ? 1 : 0; + int[][][] resourceIds = new int[2][2][2]; + resourceIds[0][0][0] = R.string.payments_accepted_cards_label; + resourceIds[0][0][1] = R.string.payments_accepted_prepaid_cards_label; + resourceIds[0][1][0] = R.string.payments_accepted_debit_cards_label; + resourceIds[0][1][1] = R.string.payments_accepted_debit_prepaid_cards_label; + resourceIds[1][0][0] = R.string.payments_accepted_credit_cards_label; + resourceIds[1][0][1] = R.string.payments_accepted_credit_prepaid_cards_label; + resourceIds[1][1][0] = R.string.payments_accepted_credit_debit_cards_label; + resourceIds[1][1][1] = R.string.payments_accepted_cards_label; + return resourceIds[credit][debit][prepaid]; + } + /** Builds the key-value pairs for the month dropdown. */ private static List<DropdownKeyValue> buildMonthDropdownKeyValues(Calendar calendar) { List<DropdownKeyValue> result = new ArrayList<>();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentApp.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentApp.java index 8f729cf..f7c3c8d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentApp.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentApp.java
@@ -79,4 +79,10 @@ * @return The identifier for this payment app. */ String getAppIdentifier(); + + /** + * @return The resource identifier for the additional text that should be displayed to the user + * when selecting a payment instrument from this payment app or 0 if not needed. + */ + int getAdditionalAppTextResourceId(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java index de4c93b..df6d3546 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java
@@ -91,6 +91,34 @@ } /** + * @return Whether the instrument is exactly matching all filters provided by the merchant. For + * example, this can return false for unknown card types, if the merchant requested only debit + * cards. + */ + public boolean isExactlyMatchingMerchantRequest() { + return true; + } + + /** @return The country code (or null if none) associated with this payment instrument. */ + @Nullable + public String getCountryCode() { + return null; + } + + /** + * @return Whether presence of this payment instrument should cause the + * PaymentRequest.canMakePayment() to return true. + */ + public boolean canMakePayment() { + return true; + } + + /** @return Whether this payment instrument can be pre-selected for immediate payment. */ + public boolean canPreselect() { + return true; + } + + /** * Invoke the payment app to retrieve the instrument details. * * The callback will be invoked with the resulting payment details or error.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java index 8803762..d62de3bf 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
@@ -180,7 +180,7 @@ public void addObserver(PaymentRequestImpl observer) { mObservers.add(observer); } - }; + } /** Limit in the number of suggested items in a section. */ public static final int SUGGESTIONS_LIMIT = 4; @@ -197,22 +197,32 @@ }; /** - * Comparator to sort payment apps by maximum frecency score of the contained instruments. Note - * that the first instrument in the list must have the maximum frecency score. + * Sorts the payment instruments by several rules: + * Rule 1: Non-autofill before autofill. + * Rule 2: Complete instruments before incomplete intsruments. + * Rule 3: Exact type matching instruments before non-exact type matching instruments. + * Rule 4: Frequently and recently used instruments before rarely and non-recently used + * instruments. */ - private static final Comparator<List<PaymentInstrument>> APP_FRECENCY_COMPARATOR = - new Comparator<List<PaymentInstrument>>() { - @Override - public int compare(List<PaymentInstrument> a, List<PaymentInstrument> b) { - return compareInstrumentsByFrecency(b.get(0), a.get(0)); - } - }; - - /** Comparator to sort instruments in payment apps by frecency. */ - private static final Comparator<PaymentInstrument> INSTRUMENT_FRECENCY_COMPARATOR = + private static final Comparator<PaymentInstrument> PAYMENT_INSTRUMENT_COMPARATOR = new Comparator<PaymentInstrument>() { @Override public int compare(PaymentInstrument a, PaymentInstrument b) { + // Payment apps (not autofill) first. + int autofill = + (a.isAutofillInstrument() ? 1 : 0) - (b.isAutofillInstrument() ? 1 : 0); + if (autofill != 0) return autofill; + + // Complete cards before cards with missing information. + int completeness = (b.isComplete() ? 1 : 0) - (a.isComplete() ? 1 : 0); + if (completeness != 0) return completeness; + + // Cards with matching type before unknown type cards. + int typeMatch = (b.isExactlyMatchingMerchantRequest() ? 1 : 0) + - (a.isExactlyMatchingMerchantRequest() ? 1 : 0); + if (typeMatch != 0) return typeMatch; + + // More frequently and recently used instruments first. return compareInstrumentsByFrecency(b, a); } }; @@ -311,8 +321,8 @@ private ContactDetailsSection mContactSection; private List<PaymentApp> mApps; private List<PaymentApp> mPendingApps; - private List<List<PaymentInstrument>> mPendingInstruments; - private List<PaymentInstrument> mPendingAutofillInstruments; + private List<PaymentInstrument> mPendingInstruments; + private int mPaymentMethodsSectionAdditionalTextResourceId; private SectionInformation mPaymentMethodsSection; private PaymentRequestUI mUI; private Callback<PaymentInformation> mPaymentInformationCallback; @@ -483,7 +493,8 @@ mShouldSkipShowingPaymentRequestUi = ChromeFeatureList.isEnabled(ChromeFeatureList.WEB_PAYMENTS_SINGLE_APP_UI_SKIP) && mMethodData.size() == 1 && !mRequestShipping && !mRequestPayerName - && !mRequestPayerPhone && !mRequestPayerEmail + && !mRequestPayerPhone + && !mRequestPayerEmail // Only allowing payment apps that own their own UIs. // This excludes AutofillPaymentApp as its UI is rendered inline in // the payment request UI, thus can't be skipped. @@ -692,13 +703,12 @@ mPendingApps = new ArrayList<>(mApps); mPendingInstruments = new ArrayList<>(); - mPendingAutofillInstruments = new ArrayList<>(); Map<PaymentApp, Map<String, PaymentMethodData>> queryApps = new ArrayMap<>(); for (int i = 0; i < mApps.size(); i++) { PaymentApp app = mApps.get(i); - Map<String, PaymentMethodData> appMethods = filterMerchantMethodData(mMethodData, - app.getAppMethodNames()); + Map<String, PaymentMethodData> appMethods = + filterMerchantMethodData(mMethodData, app.getAppMethodNames()); if (appMethods == null || !app.supportsMethodsAndData(appMethods)) { mPendingApps.remove(app); } else { @@ -851,7 +861,8 @@ } /** @return The first modifier that matches the given instrument, or null. */ - @Nullable private PaymentDetailsModifier getModifier(@Nullable PaymentInstrument instrument) { + @Nullable + private PaymentDetailsModifier getModifier(@Nullable PaymentInstrument instrument) { if (mModifiers == null || instrument == null) return null; // Makes a copy to ensure it is modifiable. Set<String> methodNames = new HashSet<>(instrument.getInstrumentMethodNames()); @@ -862,7 +873,7 @@ /** * Converts a list of payment items and returns their parsed representation. * - * @param items The payment items to parse. Can be null. + * @param items The payment items to parse. Can be null. * @return A list of valid line items. */ private List<LineItem> getLineItems(@Nullable PaymentItem[] items) { @@ -884,7 +895,7 @@ /** * Converts a list of shipping options and returns their parsed representation. * - * @param options The raw shipping options to parse. Can be null. + * @param options The raw shipping options to parse. Can be null. * @return The UI representation of the shipping options. */ private SectionInformation getShippingOptions(@Nullable PaymentShippingOption[] options) { @@ -1266,8 +1277,8 @@ PaymentInstrument instrument = (PaymentInstrument) selectedPaymentMethod; mPaymentAppRunning = true; - PaymentOption selectedContact = mContactSection != null ? mContactSection.getSelectedItem() - : null; + PaymentOption selectedContact = + mContactSection != null ? mContactSection.getSelectedItem() : null; mPaymentResponseHelper = new PaymentResponseHelper( selectedShippingAddress, selectedShippingOption, selectedContact, this); @@ -1477,31 +1488,28 @@ if (mClient == null) return; mPendingApps.remove(app); - // Place the instruments into either "autofill" or "non-autofill" list to be displayed when - // all apps have responded. if (instruments != null) { - List<PaymentInstrument> nonAutofillInstruments = new ArrayList<>(); for (int i = 0; i < instruments.size(); i++) { PaymentInstrument instrument = instruments.get(i); - Set<String> instrumentMethodNames = new HashSet<>( - instrument.getInstrumentMethodNames()); + Set<String> instrumentMethodNames = + new HashSet<>(instrument.getInstrumentMethodNames()); instrumentMethodNames.retainAll(mMethodData.keySet()); if (!instrumentMethodNames.isEmpty()) { mHideServerAutofillInstruments |= instrument.isServerAutofillInstrumentReplacement(); - if (instrument.isAutofillInstrument()) { - mPendingAutofillInstruments.add(instrument); - } else { - nonAutofillInstruments.add(instrument); - } + mCanMakePayment |= instrument.canMakePayment(); + mPendingInstruments.add(instrument); } else { instrument.dismissInstrument(); } } - if (!nonAutofillInstruments.isEmpty()) { - Collections.sort(nonAutofillInstruments, INSTRUMENT_FRECENCY_COMPARATOR); - mPendingInstruments.add(nonAutofillInstruments); - } + } + + int additionalTextResourceId = app.getAdditionalAppTextResourceId(); + if (additionalTextResourceId != 0) { + assert mPaymentMethodsSectionAdditionalTextResourceId == 0; + assert app instanceof AutofillPaymentApp; + mPaymentMethodsSectionAdditionalTextResourceId = additionalTextResourceId; } // Some payment apps still have not responded. Continue waiting for them. @@ -1510,61 +1518,41 @@ if (disconnectIfNoPaymentMethodsSupported()) return; if (mHideServerAutofillInstruments) { - List<PaymentInstrument> localAutofillInstruments = new ArrayList<>(); - for (int i = 0; i < mPendingAutofillInstruments.size(); i++) { - if (!mPendingAutofillInstruments.get(i).isServerAutofillInstrument()) { - localAutofillInstruments.add(mPendingAutofillInstruments.get(i)); + List<PaymentInstrument> nonServerAutofillInstruments = new ArrayList<>(); + for (int i = 0; i < mPendingInstruments.size(); i++) { + if (!mPendingInstruments.get(i).isServerAutofillInstrument()) { + nonServerAutofillInstruments.add(mPendingInstruments.get(i)); } } - mPendingAutofillInstruments = localAutofillInstruments; + mPendingInstruments = nonServerAutofillInstruments; } // Load the validation rules for each unique region code in the credit card billing // addresses and check for validity. Set<String> uniqueCountryCodes = new HashSet<>(); - for (int i = 0; i < mPendingAutofillInstruments.size(); ++i) { - assert mPendingAutofillInstruments.get(i) instanceof AutofillPaymentInstrument; - AutofillPaymentInstrument creditCard = - (AutofillPaymentInstrument) mPendingAutofillInstruments.get(i); - - String countryCode = AutofillAddress.getCountryCode(creditCard.getBillingAddress()); - if (!uniqueCountryCodes.contains(countryCode)) { + for (int i = 0; i < mPendingInstruments.size(); ++i) { + @Nullable + String countryCode = mPendingInstruments.get(i).getCountryCode(); + if (countryCode != null && !uniqueCountryCodes.contains(countryCode)) { uniqueCountryCodes.add(countryCode); PersonalDataManager.getInstance().loadRulesForAddressNormalization(countryCode); } - - // If there's a card on file with a valid number and a name, then - // PaymentRequest.canMakePayment() returns true. - mCanMakePayment |= creditCard.isValidCard(); } - // List order: - // > Non-autofill instruments. - // > Complete autofill instruments. - // > Incomplete autofill instruments. - Collections.sort(mPendingAutofillInstruments, COMPLETENESS_COMPARATOR); - Collections.sort(mPendingInstruments, APP_FRECENCY_COMPARATOR); - if (!mPendingAutofillInstruments.isEmpty()) { - mPendingInstruments.add(mPendingAutofillInstruments); - } + Collections.sort(mPendingInstruments, PAYMENT_INSTRUMENT_COMPARATOR); // Log the number of suggested credit cards. + int numberOfAutofillInstruments = 0; + for (int i = 0; i < mPendingInstruments.size(); i++) { + if (mPendingInstruments.get(i).isAutofillInstrument()) numberOfAutofillInstruments++; + } mJourneyLogger.setNumberOfSuggestionsShown( - Section.CREDIT_CARDS, mPendingAutofillInstruments.size()); + Section.CREDIT_CARDS, numberOfAutofillInstruments); // Possibly pre-select the first instrument on the list. - int selection = SectionInformation.NO_SELECTION; - if (!mPendingInstruments.isEmpty()) { - PaymentInstrument first = mPendingInstruments.get(0).get(0); - if (first instanceof AutofillPaymentInstrument) { - AutofillPaymentInstrument creditCard = (AutofillPaymentInstrument) first; - if (creditCard.isComplete()) selection = 0; - } else { - // If a payment app is available, then PaymentRequest.canMakePayment() returns true. - mCanMakePayment = true; - selection = 0; - } - } + int selection = !mPendingInstruments.isEmpty() && mPendingInstruments.get(0).canPreselect() + ? 0 + : SectionInformation.NO_SELECTION; CanMakePaymentQuery query = sCanMakePaymentQueries.get(mPaymentRequestOrigin); if (query != null && query.matchesPaymentMethods(mMethodData)) { @@ -1572,12 +1560,15 @@ } // The list of payment instruments is ready to display. - List<PaymentInstrument> sortedInstruments = new ArrayList<>(); - for (List<PaymentInstrument> a : mPendingInstruments) { - sortedInstruments.addAll(a); + mPaymentMethodsSection = new SectionInformation(PaymentRequestUI.TYPE_PAYMENT_METHODS, + selection, new ArrayList<>(mPendingInstruments)); + if (mPaymentMethodsSectionAdditionalTextResourceId != 0) { + Context context = ChromeActivity.fromWebContents(mWebContents); + if (context != null) { + mPaymentMethodsSection.setAdditionalText( + context.getString(mPaymentMethodsSectionAdditionalTextResourceId)); + } } - mPaymentMethodsSection = new SectionInformation( - PaymentRequestUI.TYPE_PAYMENT_METHODS, selection, sortedInstruments); mPendingInstruments.clear(); @@ -1597,8 +1588,8 @@ private boolean disconnectIfNoPaymentMethodsSupported() { if (!isFinishedQueryingPaymentApps() || !mIsCurrentPaymentRequestShowing) return false; - boolean foundPaymentMethods = mPaymentMethodsSection != null - && !mPaymentMethodsSection.isEmpty(); + boolean foundPaymentMethods = + mPaymentMethodsSection != null && !mPaymentMethodsSection.isEmpty(); boolean userCanAddCreditCard = mMerchantSupportsAutofillPaymentInstruments && !ChromeFeatureList.isEnabled(ChromeFeatureList.NO_CREDIT_CARD_ABORT); @@ -1688,8 +1679,8 @@ if (mShippingAddressesSection.getSelectedItem() == null) return; assert mShippingAddressesSection.getSelectedItem() instanceof AutofillAddress; - AutofillAddress selectedAddress = (AutofillAddress) mShippingAddressesSection - .getSelectedItem(); + AutofillAddress selectedAddress = + (AutofillAddress) mShippingAddressesSection.getSelectedItem(); // The label should only include the country if the view is focused. if (willFocus) { @@ -1726,8 +1717,10 @@ onAddressNormalized(profile); } - /** Starts the normalization of the new shipping address. Will call back into either - * onAddressNormalized or onCouldNotNormalize which will send the result to the merchant. */ + /** + * Starts the normalization of the new shipping address. Will call back into either + * onAddressNormalized or onCouldNotNormalize which will send the result to the merchant. + */ private void startShippingAddressChangeNormalization(AutofillAddress address) { PersonalDataManager.getInstance().normalizeAddress( address.getProfile(), AutofillAddress.getCountryCode(address.getProfile()), this);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java index fedac13..7a73a7e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
@@ -75,4 +75,9 @@ public String getAppIdentifier() { return "Chrome_Service_Worker_Payment_App"; } + + @Override + public int getAdditionalAppTextResourceId() { + return 0; + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java index 8ff4cd7..658f0e6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
@@ -1127,23 +1127,27 @@ @Override public String getAdditionalText(PaymentRequestSection section) { - if (section != mShippingAddressSection) return null; + if (section == mShippingAddressSection) { + int selectedItemIndex = mShippingAddressSectionInformation.getSelectedItemIndex(); + if (selectedItemIndex != SectionInformation.NO_SELECTION + && selectedItemIndex != SectionInformation.INVALID_SELECTION) { + return null; + } - int selectedItemIndex = mShippingAddressSectionInformation.getSelectedItemIndex(); - if (selectedItemIndex != SectionInformation.NO_SELECTION - && selectedItemIndex != SectionInformation.INVALID_SELECTION) { + String customErrorMessage = mShippingAddressSectionInformation.getErrorMessage(); + if (selectedItemIndex == SectionInformation.INVALID_SELECTION + && !TextUtils.isEmpty(customErrorMessage)) { + return customErrorMessage; + } + + return mContext.getString(selectedItemIndex == SectionInformation.NO_SELECTION + ? mShippingStrings.getSelectPrompt() + : mShippingStrings.getUnsupported()); + } else if (section == mPaymentMethodSection) { + return mPaymentMethodSectionInformation.getAdditionalText(); + } else { return null; } - - String customErrorMessage = mShippingAddressSectionInformation.getErrorMessage(); - if (selectedItemIndex == SectionInformation.INVALID_SELECTION - && !TextUtils.isEmpty(customErrorMessage)) { - return customErrorMessage; - } - - return mContext.getString(selectedItemIndex == SectionInformation.NO_SELECTION - ? mShippingStrings.getSelectPrompt() - : mShippingStrings.getUnsupported()); } @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java index 2096ca3..6e3e93a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java
@@ -33,6 +33,8 @@ protected ArrayList<PaymentOption> mItems; private int mSelectedItem; public String mErrorMessage; + @Nullable + public String mAddditionalText; /** * Builds an empty section without selection. @@ -209,6 +211,17 @@ return mErrorMessage; } + /** @param text The optional additional text to display in this section. */ + public void setAdditionalText(String text) { + mAddditionalText = text; + } + + /** @return The optional additional text to display in this section. */ + @Nullable + public String getAdditionalText() { + return mAddditionalText; + } + /** * Returns all the items in the section. Used for testing. *
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillLocalCardEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillLocalCardEditor.java index 56454e9f..a9385c8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillLocalCardEditor.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillLocalCardEditor.java
@@ -19,6 +19,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeVersionInfo; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; @@ -184,7 +185,7 @@ cardNumber, "" /* obfuscatedNumber */, String.valueOf(mExpirationMonth.getSelectedItemPosition() + 1), (String) mExpirationYear.getSelectedItem(), "" /* basicCardPaymentType */, - 0 /* issuerIconDrawableId */, + 0 /* issuerIconDrawableId */, CardType.UNKNOWN, ((AutofillProfile) mBillingAddress.getSelectedItem()).getGUID() /* billing */, "" /* serverId */); personalDataManager.setCreditCard(card);
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index f5cf3ac..25488db 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -328,8 +328,8 @@ <message name="IDS_PAYMENT_APPS_USAGE_MESSAGE" desc="Message to explain the usage of the listed payment apps."> On some websites, you can pay with above supported payment apps on your device. </message> - <message name="IDS_AUTOFILL_CREDIT_CARDS_TITLE" desc="Title of the preference to list the user's credit cards that can be automatically filled into web page forms. [CHAR-LIMIT=32]"> - Credit cards + <message name="IDS_AUTOFILL_CREDIT_CARDS_TITLE" desc="Title of the preference to list the user's cards that can be automatically filled into web page forms. These can be either credit, debit, or prepaid cards. [CHAR-LIMIT=32]"> + Cards </message> <message name="IDS_AUTOFILL_CREATE_PROFILE" desc="Button that allows the user to create a new profile (which contains the user's name, address, etc) that will be automatically filled into web page forms. [CHAR-LIMIT=32]"> Add address @@ -337,11 +337,11 @@ <message name="IDS_AUTOFILL_EDIT_PROFILE" desc="Button that allows the user to edit a profile (which contains the user's name, address, etc) that can be automatically filled into web page forms. [CHAR-LIMIT=32]"> Edit address </message> - <message name="IDS_AUTOFILL_CREATE_CREDIT_CARD" desc="Button that allows the user to add a new credit card that will be automatically filled into web page forms. [CHAR-LIMIT=32]"> - Add credit card + <message name="IDS_AUTOFILL_CREATE_CREDIT_CARD" desc="Button that allows the user to add a new card that will be automatically filled into web page forms. This can be either credit, debit, or prepaid card. [CHAR-LIMIT=32]"> + Add card </message> - <message name="IDS_AUTOFILL_EDIT_CREDIT_CARD" desc="Button that allows the user to edit a credit card that can be automatically filled into web page forms. [CHAR-LIMIT=32]"> - Edit credit card + <message name="IDS_AUTOFILL_EDIT_CREDIT_CARD" desc="Button that allows the user to edit a card that can be automatically filled into web page forms. This can be either credit, debit, or prepaid card. [CHAR-LIMIT=32]"> + Edit card </message> <message name="IDS_AUTOFILL_PROFILE_EDITOR_COUNTRY" desc="Label for a spinner input field containing a list of countries or regions [CHAR-LIMIT=32]"> Country/Region @@ -355,8 +355,8 @@ <message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_NAME" desc="Label for text input field containing the name on a credit card. [CHAR-LIMIT=32]"> Name on card </message> - <message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_NUMBER" desc="Label for text input field containing a credit card number. [CHAR-LIMIT=32]"> - Credit card number + <message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_NUMBER" desc="Label for text input field containing a card number. This can be a credit, debit, or prepaid card. [CHAR-LIMIT=32]"> + Card number </message> <message name="IDS_AUTOFILL_CREDIT_CARD_EDITOR_EXPIRATION_DATE" desc="Label for text input field containing a credit card expiration date. [CHAR-LIMIT=32]"> Expiration date @@ -1344,7 +1344,7 @@ Settings </message> <message name="IDS_PAYMENTS_INTEGRATION" desc="Title for preference which enables import of Google Payments data for Autofill."> - Credit cards and addresses using Google Payments + Cards and addresses using Google Payments </message> <message name="IDS_SYNC_ENCRYPTION" desc="Preference category name for sync encryption. [CHAR-LIMT=32]"> Encryption
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index 292189ab..df937cc 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -1533,6 +1533,8 @@ "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java", "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestLongIdTest.java", "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDataUrlTest.java", + "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDebitTest.java", + "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDontHaveDebitTest.java", "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingMultipleAddressesTest.java", "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java", "javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java index ea160c7..6417f5a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java
@@ -401,13 +401,13 @@ // Create a local card and an identical server card. CreditCard card1 = new CreditCard("" /* guid */, "https://www.example.com" /* origin */, true /* isLocal */, false /* isCached */, "John Doe", "1234123412341234", "", "5", - "2020", "Visa", 0 /* issuerIconDrawableId */, "" /* billingAddressId */, - "" /* serverId */); + "2020", "Visa", 0 /* issuerIconDrawableId */, CardType.UNKNOWN, + "" /* billingAddressId */, "" /* serverId */); CreditCard card2 = new CreditCard("" /* guid */, "https://www.example.com" /* origin */, false /* isLocal */, false /* isCached */, "John Doe", "1234123412341234", "", "5", - "2020", "Visa", 0 /* issuerIconDrawableId */, "" /* billingAddressId */, - "" /* serverId */); + "2020", "Visa", 0 /* issuerIconDrawableId */, CardType.UNKNOWN, + "" /* billingAddressId */, "" /* serverId */); mHelper.setCreditCard(card1); mHelper.addServerCreditCard(card2); @@ -447,9 +447,9 @@ throws InterruptedException, ExecutionException, TimeoutException { String guid = mHelper.setCreditCard( new CreditCard("" /* guid */, "https://www.example.com" /* origin */, - true /* isLocal */, false /* isCached */, "John Doe", "1234123412341234", "", - "5", "2020", "Visa", 0 /* issuerIconDrawableId */, "" /* billingAddressId */, - "" /* serverId */)); + true /* isLocal */, false /* isCached */, "John Doe", "1234123412341234", + "", "5", "2020", "Visa", 0 /* issuerIconDrawableId */, CardType.UNKNOWN, + "" /* billingAddressId */, "" /* serverId */)); // Make sure the credit card does not have the specific use stats form the start. Assert.assertTrue(1234 != mHelper.getCreditCardUseCountForTesting(guid)); @@ -496,11 +496,10 @@ public void testRecordAndLogCreditCardUse() throws InterruptedException, ExecutionException, TimeoutException { String guid = mHelper.setCreditCard( - new CreditCard("" /* guid */, "https://www.example.com" /* origin */, - true /* isLocal */, false /* isCached */, "John Doe", - "1234123412341234", "", "5", "2020", "Visa", - 0 /* issuerIconDrawableId */, "" /* billingAddressId */, - "" /* serverId */)); + new CreditCard("" /* guid */, "https://www.example.com" /* origin */, + true /* isLocal */, false /* isCached */, "John Doe", "1234123412341234", + "", "5", "2020", "Visa", 0 /* issuerIconDrawableId */, CardType.UNKNOWN, + "" /* billingAddressId */, "" /* serverId */)); // Set specific use stats for the credit card. mHelper.setCreditCardUseStatsForTesting(guid, 1234, 1234);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java index 77e62fb..452d4fc 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestAbortTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -47,7 +48,7 @@ "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** If the user has not clicked "Pay" yet, then merchant's abort will succeed. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.java index ae6adbd..92882c1 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.java
@@ -10,6 +10,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.chrome.R; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; @@ -35,7 +36,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } @MediumTest
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java index 80a5ecf1..ee71e459 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -59,8 +60,8 @@ "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "650-253-0000", "jon.doe@gmail.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", - "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, profile1, - "" /* serverId */)); + "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, + CardType.UNKNOWN, profile1, "" /* serverId */)); String profile2 = helper.setProfile(new AutofillProfile("", "https://example.com", true, "Rob Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "650-253-0000", "jon.doe@gmail.com", "en-US")); @@ -94,8 +95,8 @@ // This card has no billing address selected. helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jane Doe", - "4242424242424242", "1111", "12", "2050", "visa", R.drawable.visa_card, profile6, - "" /* serverId */)); + "4242424242424242", "1111", "12", "2050", "visa", R.drawable.visa_card, + CardType.UNKNOWN, profile6, "" /* serverId */)); // Assign use stats so that incomplete profiles have the highest frecency, profile2 has the // highest frecency and profile3 has the lowest among the complete profiles, and profile8
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressWithoutPhoneTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressWithoutPhoneTest.java index ecbb6da..c7626906 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressWithoutPhoneTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressWithoutPhoneTest.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -61,7 +62,7 @@ "Los Angeles", "", "90291", "", "US", "", "jon.doe@gmail.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - address_without_phone, "" /* serverId */)); + CardType.UNKNOWN, address_without_phone, "" /* serverId */)); String address_with_phone = helper.setProfile(new AutofillProfile("", "https://example.com", true, "Rob Phone", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "310-310-6000", "jon.doe@gmail.com", "en-US"));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryNoCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryNoCardTest.java index 362acde..a2501ec 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryNoCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryNoCardTest.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; import org.chromium.chrome.test.ChromeActivityTestRule; @@ -47,9 +48,10 @@ TimeoutException { // The user has an incomplete credit card on file. This is not sufficient for // canMakePayment() to return true. - new AutofillTestHelper().setCreditCard(new CreditCard("", "https://example.com", true, true, - "" /* nameOnCard */, "4111111111111111", "1111", "12", "2050", "visa", - R.drawable.visa_card, "" /* billingAddressId */, "" /* serverId */)); + new AutofillTestHelper().setCreditCard( + new CreditCard("", "https://example.com", true, true, "" /* nameOnCard */, + "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, + CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryTest.java index 139c647..e56f8490 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentQueryTest.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; import org.chromium.chrome.test.ChromeActivityTestRule; @@ -49,7 +50,7 @@ // for canMakePayment() to return true. new AutofillTestHelper().setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - "" /* billingAddressId */, "" /* serverId */)); + CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCardEditorAutoAdvanceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCardEditorAutoAdvanceTest.java index 65adf11..54bf1ae 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCardEditorAutoAdvanceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCardEditorAutoAdvanceTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -54,7 +55,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "1", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryNoCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryNoCardTest.java index 2188897b..472e3a3 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryNoCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryNoCardTest.java
@@ -15,6 +15,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; import org.chromium.chrome.test.ChromeActivityTestRule; @@ -42,9 +43,10 @@ TimeoutException { // The user has an incomplete credit card on file. This is not sufficient for // canMakePayment() to return true. - new AutofillTestHelper().setCreditCard(new CreditCard("", "https://example.com", true, true, - "" /* nameOnCard */, "4111111111111111", "1111", "12", "2050", "visa", - R.drawable.visa_card, "" /* billingAddressId */, "" /* serverId */)); + new AutofillTestHelper().setCreditCard( + new CreditCard("", "https://example.com", true, true, "" /* nameOnCard */, + "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, + CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java index 9e98dbe..ee504c9e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java
@@ -9,6 +9,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.chrome.R; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import java.util.concurrent.ExecutionException; @@ -31,7 +32,7 @@ // for canMakePayment() to return true. new AutofillTestHelper().setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - "" /* billingAddressId */, "" /* serverId */)); + CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */)); } @MediumTest
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsAndFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsAndFreeShippingTest.java index 2dd0dea..c85923c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsAndFreeShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsAndFreeShippingTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -52,7 +53,7 @@ "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDebitTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDebitTest.java new file mode 100644 index 0000000..e750d92 --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDebitTest.java
@@ -0,0 +1,100 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.payments; + +import android.support.test.filters.MediumTest; + +import org.junit.Assert; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.Feature; +import org.chromium.chrome.R; +import org.chromium.chrome.browser.ChromeSwitches; +import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; +import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; +import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; +import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; +import org.chromium.chrome.test.ChromeActivityTestRule; +import org.chromium.chrome.test.ChromeJUnit4ClassRunner; + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +/** + * A payment integration test for a merchant that requests debit card payment. The user has a debit + * card on file. + */ +@RunWith(ChromeJUnit4ClassRunner.class) +@CommandLineFlags.Add({ + ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, + ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, +}) +public class PaymentRequestDebitTest implements MainActivityStartCallback { + @Rule + public PaymentRequestTestRule mPaymentRequestTestRule = + new PaymentRequestTestRule("payment_request_debit_test.html", this); + + @Override + public void onMainActivityStarted() + throws InterruptedException, ExecutionException, TimeoutException { + AutofillTestHelper helper = new AutofillTestHelper(); + String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com", + true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", + "US", "555-555-5555", "jon.doe@google.com", "en-US")); + + // Should be pre-selected: + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, + CardType.DEBIT, billingAddressId, "server-id-1")); + + // Should be available, but never pre-selected: + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "6011111111111117", "1117", "12", "2050", "discover", R.drawable.discover_card, + CardType.UNKNOWN, billingAddressId, "server-id-2")); + + // Should not be available: + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "378282246310005", "0005", "12", "2050", "amex", R.drawable.amex_card, + CardType.CREDIT, billingAddressId, "server-id-3")); + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "5555555555554444", "4444", "12", "2050", "mastercard", R.drawable.mc_card, + CardType.PREPAID, billingAddressId, "server-id-4")); + } + + @Test + @MediumTest + @Feature({"Payments"}) + public void testDebitCardTypeIsPreselectedAndUnknownCardTypeIsAvailable() + throws InterruptedException, ExecutionException, TimeoutException { + mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getReadyToPay()); + + Assert.assertTrue(mPaymentRequestTestRule.getPaymentInstrumentLabel(0).contains("Visa")); + + mPaymentRequestTestRule.clickInPaymentMethodAndWait( + R.id.payments_section, mPaymentRequestTestRule.getReadyToPay()); + Assert.assertEquals(2, mPaymentRequestTestRule.getNumberOfPaymentInstruments()); + + Assert.assertTrue(mPaymentRequestTestRule.getPaymentInstrumentLabel(0).contains("Visa")); + Assert.assertTrue( + mPaymentRequestTestRule.getPaymentInstrumentLabel(1).contains("Discover")); + + mPaymentRequestTestRule.clickAndWait( + R.id.close_button, mPaymentRequestTestRule.getDismissed()); + } + + @Test + @MediumTest + @Feature({"Payments"}) + public void testCanMakePaymentWithDebitCard() + throws InterruptedException, ExecutionException, TimeoutException { + mPaymentRequestTestRule.openPageAndClickNodeAndWait( + "canMakePayment", mPaymentRequestTestRule.getCanMakePaymentQueryResponded()); + mPaymentRequestTestRule.expectResultContains(new String[] {"true"}); + } +} \ No newline at end of file
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDontHaveDebitTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDontHaveDebitTest.java new file mode 100644 index 0000000..4c860723 --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDontHaveDebitTest.java
@@ -0,0 +1,96 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.payments; + +import android.support.test.filters.MediumTest; + +import org.junit.Assert; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.Feature; +import org.chromium.chrome.R; +import org.chromium.chrome.browser.ChromeSwitches; +import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; +import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; +import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; +import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; +import org.chromium.chrome.test.ChromeActivityTestRule; +import org.chromium.chrome.test.ChromeJUnit4ClassRunner; + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +/** + * A payment integration test for a merchant that requests debit card payment. The user does not + * have a debit card on file, but has one card that has "unknown" card type, which should not be + * pre-selected, but should be available for the user to select. + */ +@RunWith(ChromeJUnit4ClassRunner.class) +@CommandLineFlags.Add({ + ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, + ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, +}) +public class PaymentRequestDontHaveDebitTest implements MainActivityStartCallback { + @Rule + public PaymentRequestTestRule mPaymentRequestTestRule = + new PaymentRequestTestRule("payment_request_debit_test.html", this); + + @Override + public void onMainActivityStarted() + throws InterruptedException, ExecutionException, TimeoutException { + AutofillTestHelper helper = new AutofillTestHelper(); + String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com", + true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", + "US", "555-555-5555", "jon.doe@google.com", "en-US")); + + // Should be available, but never pre-selected: + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "6011111111111117", "1117", "12", "2050", "discover", R.drawable.discover_card, + CardType.UNKNOWN, billingAddressId, "server-id-2")); + + // Should not be available: + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "378282246310005", "0005", "12", "2050", "amex", R.drawable.amex_card, + CardType.CREDIT, billingAddressId, "server-id-3")); + helper.addServerCreditCard(new CreditCard("", "https://example.com", false, true, "Jon Doe", + "5555555555554444", "4444", "12", "2050", "mastercard", R.drawable.mc_card, + CardType.PREPAID, billingAddressId, "server-id-4")); + } + + @Test + @MediumTest + @Feature({"Payments"}) + public void testUnknownCardTypeIsNotPreselectedButAvailable() + throws InterruptedException, ExecutionException, TimeoutException { + mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getReadyForInput()); + + Assert.assertTrue( + mPaymentRequestTestRule.getPaymentInstrumentLabel(0).contains("Discover")); + + mPaymentRequestTestRule.clickInPaymentMethodAndWait( + R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); + Assert.assertEquals(1, mPaymentRequestTestRule.getNumberOfPaymentInstruments()); + + Assert.assertTrue( + mPaymentRequestTestRule.getPaymentInstrumentLabel(0).contains("Discover")); + + mPaymentRequestTestRule.clickAndWait( + R.id.close_button, mPaymentRequestTestRule.getDismissed()); + } + + @Test + @MediumTest + @Feature({"Payments"}) + public void testCanMakePaymentWithUnknownCardType() + throws InterruptedException, ExecutionException, TimeoutException { + mPaymentRequestTestRule.openPageAndClickNodeAndWait( + "canMakePayment", mPaymentRequestTestRule.getCanMakePaymentQueryResponded()); + mPaymentRequestTestRule.expectResultContains(new String[] {"true"}); + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java index 172a934..a8cca016 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestDynamicShippingSingleAddressTest.java
@@ -19,6 +19,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -53,7 +54,7 @@ "US", "650-253-0000", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** The shipping address should not be selected in UI by default. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailAndFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailAndFreeShippingTest.java index f97a45ae..a6d3f75 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailAndFreeShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailAndFreeShippingTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -51,7 +52,7 @@ "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** Submit the email and the shipping address to the merchant when the user clicks "Pay." */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java index 5288dc5..cda6b1c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java
@@ -17,6 +17,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -54,7 +55,7 @@ // Create an expired credit card mCreditCardId = mHelper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "1", "2016", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java index 8fbf9afe..d84ac5db 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -48,7 +49,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java index b206d0e..72fafb8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -47,7 +48,7 @@ "US", "310-310-6000", "jon.doe@gmail.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java index f1d38c1..142a3bc7 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -52,7 +53,7 @@ "US", "650-253-0000", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** Submit the shipping address to the merchant when the user clicks "Pay." */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIdTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIdTest.java index 330687e4..a48656ef 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIdTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIdTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -48,7 +49,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteServerCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteServerCardTest.java index 9b48730a..39599e07 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteServerCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteServerCardTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -49,7 +50,8 @@ "US", "310-310-6000", "jon.doe@gmail.com", "en-US")); helper.addServerCreditCard(new CreditCard("", "https://example.com", false /* isLocal */, true /* isCached */, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", - R.drawable.visa_card, "" /* billing address */, "" /* serverId */)); + R.drawable.visa_card, CardType.UNKNOWN, "" /* billing address */, + "" /* serverId */)); } /** Click [PAY] and dismiss the card unmask dialog. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerTest.java index f85070a..af427b3 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerTest.java
@@ -21,6 +21,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -53,14 +54,14 @@ "US", "650-253-0000", "", "en-US")); mHelper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - mBillingAddressId, "" /* serverId */)); + CardType.UNKNOWN, mBillingAddressId, "" /* serverId */)); // The user also has an incomplete address and an incomplete card saved. String mIncompleteAddressId = mHelper.setProfile(new AutofillProfile("", "https://example.com", true, "In Complete", "Google", "344 Main St", "CA", "", "", "90291", "", "US", "650-253-0000", "", "en-US")); mHelper.setCreditCard(new CreditCard("", "https://example.com", true, true, "", "4111111111111111", "1111", "18", "2075", "visa", R.drawable.visa_card, - mIncompleteAddressId, "" /* serverId */)); + CardType.UNKNOWN, mIncompleteAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestMetricsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestMetricsTest.java index 3b5e81b84..3970e5f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestMetricsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestMetricsTest.java
@@ -28,6 +28,7 @@ import org.chromium.chrome.browser.ChromeFeatureList; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -61,7 +62,7 @@ "US", "650-253-0000", "", "en-US")); mHelper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - mBillingAddressId, "" /* serverId */)); + CardType.UNKNOWN, mBillingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java index 0012910..dd203f5 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -51,7 +52,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** Submit the payer name and shipping address to the merchant when the user clicks "Pay." */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java index d218179..f0c71a3 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -50,7 +51,7 @@ "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); // Add the same profile but with a different address. helper.setProfile(new AutofillProfile("", "https://example.com", true, "", "Google",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java index 5403a37..159270f1 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
@@ -25,6 +25,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -56,7 +57,7 @@ "US", "650-253-0000", "jon.doe@gmail.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** Click [X] to cancel payment. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndBasicCardWithModifiersTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndBasicCardWithModifiersTest.java index 85673cc..f370f2c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndBasicCardWithModifiersTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndBasicCardWithModifiersTest.java
@@ -23,6 +23,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.test.ChromeActivityTestRule; @@ -56,11 +57,11 @@ // Mastercard card without a billing address. helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "5454545454545454", "", "12", "2050", "mastercard", R.drawable.mc_card, - "" /* billingAddressId */, "" /* serverId */)); + CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */)); // Visa card with complete set of information. helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndCardsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndCardsTest.java index 67d311f..98cf15c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndCardsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndCardsTest.java
@@ -22,6 +22,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -54,11 +55,11 @@ // Mastercard card without a billing address. helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "5454545454545454", "", "12", "2050", "mastercard", R.drawable.mc_card, - "" /* billingAddressId */, "" /* serverId */)); + CardType.UNKNOWN, "" /* billingAddressId */, "" /* serverId */)); // Visa card with complete set of information. helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java index 07b0d79..556da561 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java
@@ -28,7 +28,6 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.WebContents; -import java.util.Arrays; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; @@ -96,8 +95,7 @@ @Feature({"Payments"}) public void testPaymentWithInstrumentsAppResponseAfterDismissShouldNotCrash() throws InterruptedException, ExecutionException, TimeoutException { - final TestPay app = new TestPay( - Arrays.asList("https://bobpay.com"), HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); + final TestPay app = new TestPay("https://bobpay.com", HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); PaymentAppFactory.getInstance().addAdditionalFactory(new PaymentAppFactoryAddition() { @Override public void create(WebContents webContents, Set<String> methodNames, @@ -127,8 +125,7 @@ @Feature({"Payments"}) public void testPaymentAppNoInstrumentsResponseAfterDismissShouldNotCrash() throws InterruptedException, ExecutionException, TimeoutException { - final TestPay app = new TestPay( - Arrays.asList("https://bobpay.com"), NO_INSTRUMENTS, IMMEDIATE_RESPONSE); + final TestPay app = new TestPay("https://bobpay.com", NO_INSTRUMENTS, IMMEDIATE_RESPONSE); PaymentAppFactory.getInstance().addAdditionalFactory(new PaymentAppFactoryAddition() { @Override public void create(WebContents webContents, Set<String> methodNames,
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppsSortingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppsSortingTest.java index d969128..54ea441 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppsSortingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppsSortingTest.java
@@ -19,6 +19,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentAppFactory.PaymentAppCreatedCallback; @@ -29,7 +30,6 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.WebContents; -import java.util.Arrays; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; @@ -56,7 +56,7 @@ // behind non-autofill payment instruments in payment request. helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } @Test @@ -67,43 +67,42 @@ // Install a payment app with Bob Pay and Alice Pay, and another payment app with Charlie // Pay. final TestPay appA = - new TestPay(Arrays.asList("https://alicepay.com", "https://bobpay.com"), - HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); - final TestPay appB = new TestPay( - Arrays.asList("https://charliepay.com"), HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); + new TestPay("https://alicepay.com", HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); + final TestPay appB = + new TestPay("https://bobpay.com", HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); + final TestPay appC = + new TestPay("https://charliepay.com", HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); PaymentAppFactory.getInstance().addAdditionalFactory(new PaymentAppFactoryAddition() { @Override public void create(WebContents webContents, Set<String> methodNames, PaymentAppCreatedCallback callback) { callback.onPaymentAppCreated(appA); callback.onPaymentAppCreated(appB); + callback.onPaymentAppCreated(appC); callback.onAllPaymentAppsCreated(); } }); - String appAAlicePayId = appA.getAppIdentifier() + "https://alicepay.com"; - String appABobPayId = appA.getAppIdentifier() + "https://bobpay.com"; - String appBCharliePayId = appB.getAppIdentifier() + "https://charliepay.com"; + String alicePayId = appA.getAppIdentifier() + "https://alicepay.com"; + String bobPayId = appB.getAppIdentifier() + "https://bobpay.com"; + String charliePayId = appC.getAppIdentifier() + "https://charliepay.com"; // The initial records for all payment methods are zeroes. - Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appAAlicePayId)); - Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appABobPayId)); + Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentUseCount(alicePayId)); + Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentUseCount(bobPayId)); + Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentUseCount(charliePayId)); + Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(alicePayId)); + Assert.assertEquals(0, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(bobPayId)); Assert.assertEquals( - 0, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appBCharliePayId)); - Assert.assertEquals( - 0, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appAAlicePayId)); - Assert.assertEquals( - 0, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appABobPayId)); - Assert.assertEquals( - 0, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appBCharliePayId)); + 0, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(charliePayId)); // Sets Alice Pay use count and use date to 5. Sets Bob Pay use count and use date to 10. // Sets Charlie Pay use count and use date to 15. - PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(appAAlicePayId, 5); - PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(appAAlicePayId, 5); - PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(appABobPayId, 10); - PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(appABobPayId, 10); - PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(appBCharliePayId, 15); - PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(appBCharliePayId, 15); + PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(alicePayId, 5); + PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(alicePayId, 5); + PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(bobPayId, 10); + PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(bobPayId, 10); + PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(charliePayId, 15); + PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(charliePayId, 15); mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInPaymentMethodAndWait( @@ -126,20 +125,17 @@ R.id.button_secondary, mPaymentRequestTestRule.getDismissed()); // Checks the records for all payment instruments haven't been changed. - Assert.assertEquals(5, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appAAlicePayId)); - Assert.assertEquals(10, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appABobPayId)); + Assert.assertEquals(5, PaymentPreferencesUtil.getPaymentInstrumentUseCount(alicePayId)); + Assert.assertEquals(10, PaymentPreferencesUtil.getPaymentInstrumentUseCount(bobPayId)); + Assert.assertEquals(15, PaymentPreferencesUtil.getPaymentInstrumentUseCount(charliePayId)); + Assert.assertEquals(5, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(alicePayId)); + Assert.assertEquals(10, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(bobPayId)); Assert.assertEquals( - 15, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appBCharliePayId)); - Assert.assertEquals( - 5, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appAAlicePayId)); - Assert.assertEquals( - 10, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appABobPayId)); - Assert.assertEquals( - 15, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appBCharliePayId)); + 15, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(charliePayId)); // Sets Alice Pay use count and use date to 20. - PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(appAAlicePayId, 20); - PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(appAAlicePayId, 20); + PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(alicePayId, 20); + PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(alicePayId, 20); mPaymentRequestTestRule.reTriggerUIAndWait("buy", mPaymentRequestTestRule.getReadyToPay()); mPaymentRequestTestRule.clickInPaymentMethodAndWait( @@ -151,9 +147,9 @@ Assert.assertEquals( "https://alicepay.com", mPaymentRequestTestRule.getPaymentInstrumentLabel(0)); Assert.assertEquals( - "https://bobpay.com", mPaymentRequestTestRule.getPaymentInstrumentLabel(1)); + "https://charliepay.com", mPaymentRequestTestRule.getPaymentInstrumentLabel(1)); Assert.assertEquals( - "https://charliepay.com", mPaymentRequestTestRule.getPaymentInstrumentLabel(2)); + "https://bobpay.com", mPaymentRequestTestRule.getPaymentInstrumentLabel(2)); Assert.assertEquals( "Visa\u0020\u0020\u2022\u2006\u2022\u2006\u2022\u2006\u2022\u20061111\nJon Doe", mPaymentRequestTestRule.getPaymentInstrumentLabel(3)); @@ -166,16 +162,12 @@ // Checks Alice Pay use count is increased by one after completing a payment request with // it. + Assert.assertEquals(21, PaymentPreferencesUtil.getPaymentInstrumentUseCount(alicePayId)); + Assert.assertEquals(10, PaymentPreferencesUtil.getPaymentInstrumentUseCount(bobPayId)); + Assert.assertEquals(15, PaymentPreferencesUtil.getPaymentInstrumentUseCount(charliePayId)); + Assert.assertTrue(PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(alicePayId) > 20); + Assert.assertEquals(10, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(bobPayId)); Assert.assertEquals( - 21, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appAAlicePayId)); - Assert.assertEquals(10, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appABobPayId)); - Assert.assertEquals( - 15, PaymentPreferencesUtil.getPaymentInstrumentUseCount(appBCharliePayId)); - Assert.assertTrue( - PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appAAlicePayId) > 20); - Assert.assertEquals( - 10, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appABobPayId)); - Assert.assertEquals( - 15, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(appBCharliePayId)); + 15, PaymentPreferencesUtil.getPaymentInstrumentLastUseDate(charliePayId)); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java index 3015894..81b4ffb 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -51,7 +52,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** Submit the phone number and shipping address to the merchant when the user clicks "Pay." */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRemoveBillingAddressTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRemoveBillingAddressTest.java index 4f35fb7a..92aaa94 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRemoveBillingAddressTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRemoveBillingAddressTest.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -54,7 +55,7 @@ "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Alice", "4111111111111111", "1111", "1", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); helper.deleteProfile(billingAddressId); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServerCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServerCardTest.java index 44ee6d60..b264337 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServerCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestServerCardTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -48,7 +49,7 @@ helper.addServerCreditCard(new CreditCard("4754d21d-8773-40b6-b4be-5f7486be834f", "https://example.com", false /* isLocal */, true /* isCached */, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** Click [PAY] and dismiss the card unmask dialog. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressAndOptionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressAndOptionTest.java index 903ebe6d..45045e4 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressAndOptionTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressAndOptionTest.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -48,7 +49,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - firstAddressId, "" /* serverId */)); + CardType.UNKNOWN, firstAddressId, "" /* serverId */)); // The user has a second address. String secondAddressId = helper.setProfile(new AutofillProfile("", "https://example.com",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressChangeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressChangeTest.java index 611230f..70288d17 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressChangeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressChangeTest.java
@@ -15,6 +15,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -47,7 +48,7 @@ "", "US", "650-253-0000", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java index 5796c98..5f4d632 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java
@@ -17,6 +17,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -48,7 +49,7 @@ "US", "555-555-5555", "", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTabTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTabTest.java index 1ff76c0..b51c625e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTabTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTabTest.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -54,7 +55,7 @@ "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - billingAddressId, "" /* serverId */)); + CardType.UNKNOWN, billingAddressId, "" /* serverId */)); } /** If the user switches tabs somehow, the dialog is dismissed. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java index 725fa4e..9bc4fc2 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
@@ -15,7 +15,6 @@ import org.chromium.chrome.browser.payments.ui.PaymentRequestUI; import org.chromium.chrome.test.ChromeActivityTestCaseBase; -import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; @@ -457,7 +456,6 @@ mTestCommon.onCardUnmaskPromptValidationDone(prompt); } - /** * Installs a payment app for testing. * @@ -499,12 +497,6 @@ mTestCommon.installPaymentApp(methodName, instrumentPresence, responseSpeed, creationSpeed); } - protected void installPaymentApp(final List<String> appMethodNames, - final int instrumentPresence, final int responseSpeed, final int creationSpeed) { - mTestCommon.installPaymentApp( - appMethodNames, instrumentPresence, responseSpeed, creationSpeed); - } - @Override public void startMainActivityWithURL(String url) throws InterruptedException { super.startMainActivityWithURL(url);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestCommon.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestCommon.java index 7d845bf3..e1c8ceb 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestCommon.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestCommon.java
@@ -4,8 +4,6 @@ package org.chromium.chrome.browser.payments; -import static java.util.Arrays.asList; - import android.os.Handler; import android.view.KeyEvent; import android.view.View; @@ -132,8 +130,9 @@ mViewCoreRef = new AtomicReference<>(); mWebContentsRef = new AtomicReference<>(); mTestFilePath = testFileName.startsWith("data:") - ? testFileName : UrlUtils.getIsolatedTestFilePath( - String.format("chrome/test/data/payments/%s", testFileName)); + ? testFileName + : UrlUtils.getIsolatedTestFilePath( + String.format("chrome/test/data/payments/%s", testFileName)); } public void startMainActivity() throws InterruptedException { @@ -900,18 +899,13 @@ installPaymentApp(methodName, instrumentPresence, responseSpeed, IMMEDIATE_CREATION); } - void installPaymentApp( - String methodName, int instrumentPresence, int responseSpeed, int creationSpeed) { - installPaymentApp(asList(methodName), instrumentPresence, responseSpeed, creationSpeed); - } - - void installPaymentApp(final List<String> appMethodNames, - final int instrumentPresence, final int responseSpeed, final int creationSpeed) { + void installPaymentApp(final String appMethodName, final int instrumentPresence, + final int responseSpeed, final int creationSpeed) { PaymentAppFactory.getInstance().addAdditionalFactory(new PaymentAppFactoryAddition() { @Override public void create(WebContents webContents, Set<String> methodNames, final PaymentAppFactory.PaymentAppCreatedCallback callback) { - final TestPay app = new TestPay(appMethodNames, instrumentPresence, responseSpeed); + final TestPay app = new TestPay(appMethodName, instrumentPresence, responseSpeed); if (creationSpeed == IMMEDIATE_CREATION) { callback.onPaymentAppCreated(app); callback.onAllPaymentAppsCreated(); @@ -930,13 +924,13 @@ /** A payment app implementation for test. */ static class TestPay implements PaymentApp { - private final List<String> mMethodNames; + private final String mDefaultMethodName; private final int mInstrumentPresence; private final int mResponseSpeed; private InstrumentsCallback mCallback; - TestPay(List<String> methodNames, int instrumentPresence, int responseSpeed) { - mMethodNames = methodNames; + TestPay(String defaultMethodName, int instrumentPresence, int responseSpeed) { + mDefaultMethodName = defaultMethodName; mInstrumentPresence = instrumentPresence; mResponseSpeed = responseSpeed; } @@ -952,10 +946,8 @@ void respond() { final List<PaymentInstrument> instruments = new ArrayList<>(); if (mInstrumentPresence == HAVE_INSTRUMENTS) { - for (String methodName : mMethodNames) { - instruments.add( - new TestPayInstrument(getAppIdentifier(), methodName, methodName)); - } + instruments.add(new TestPayInstrument( + getAppIdentifier(), mDefaultMethodName, mDefaultMethodName)); } Runnable instrumentsReady = new Runnable() { @Override @@ -973,9 +965,9 @@ @Override public Set<String> getAppMethodNames() { - Set<String> methodNames = new HashSet<>(); - methodNames.addAll(mMethodNames); - return methodNames; + Set<String> result = new HashSet<>(); + result.add(mDefaultMethodName); + return result; } @Override @@ -990,21 +982,26 @@ public String getAppIdentifier() { return TestPay.this.toString(); } + + @Override + public int getAdditionalAppTextResourceId() { + return 0; + } } /** A payment instrument implementation for test. */ private static class TestPayInstrument extends PaymentInstrument { - private final String mMethodName; + private final String mDefaultMethodName; - TestPayInstrument(String appId, String methodName, String label) { - super(appId + methodName, label, null, null); - mMethodName = methodName; + TestPayInstrument(String appId, String defaultMethodName, String label) { + super(appId + defaultMethodName, label, null, null); + mDefaultMethodName = defaultMethodName; } @Override public Set<String> getInstrumentMethodNames() { Set<String> result = new HashSet<>(); - result.add(mMethodName); + result.add(mDefaultMethodName); return result; } @@ -1014,8 +1011,7 @@ Map<String, PaymentMethodData> methodData, PaymentItem total, List<PaymentItem> displayItems, Map<String, PaymentDetailsModifier> modifiers, InstrumentDetailsCallback detailsCallback) { - detailsCallback.onInstrumentDetailsReady( - mMethodName, "{\"transaction\": 1337}"); + detailsCallback.onInstrumentDetailsReady(mDefaultMethodName, "{\"transaction\": 1337}"); } @Override
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java index 97dc44dc..d3bf11a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestRule.java
@@ -18,7 +18,6 @@ import org.chromium.chrome.browser.payments.ui.PaymentRequestUI; import org.chromium.chrome.test.ChromeActivityTestRule; -import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; @@ -537,12 +536,6 @@ mTestCommon.installPaymentApp(methodName, instrumentPresence, responseSpeed, creationSpeed); } - protected void installPaymentApp(final List<String> appMethodNames, - final int instrumentPresence, final int responseSpeed, final int creationSpeed) { - mTestCommon.installPaymentApp( - appMethodNames, instrumentPresence, responseSpeed, creationSpeed); - } - @Override public void onMainActivityStarted() throws InterruptedException, ExecutionException, TimeoutException {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestUseStatsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestUseStatsTest.java index 4991fc1a..fa3db8b 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestUseStatsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestUseStatsTest.java
@@ -17,6 +17,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; @@ -54,7 +55,7 @@ "US", "555-555-5555", "", "en-US")); mCreditCardId = mHelper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.drawable.visa_card, - mBillingAddressId, "" /* serverId */)); + CardType.UNKNOWN, mBillingAddressId, "" /* serverId */)); // Set specific use stats for the profile and credit card. mHelper.setProfileUseStatsForTesting(mBillingAddressId, 20, 5000); mHelper.setCreditCardUseStatsForTesting(mCreditCardId, 1, 5000);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrFeedbackInfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrFeedbackInfoBarTest.java index 33862a4..b6518dff 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrFeedbackInfoBarTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrFeedbackInfoBarTest.java
@@ -7,6 +7,7 @@ import static org.chromium.chrome.browser.vr_shell.VrTestRule.PAGE_LOAD_TIMEOUT_S; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_LONG_MS; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_SHORT_MS; +import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_DEVICE_DAYDREAM; import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM; import android.support.test.filters.MediumTest; @@ -36,7 +37,7 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell", "enable-webvr"}) -@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) +@Restriction(RESTRICTION_TYPE_DEVICE_DAYDREAM) public class VrFeedbackInfoBarTest { @Rule @@ -138,6 +139,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testExitPresentationInVr() throws InterruptedException, TimeoutException { // Enter VR presentation mode. mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellNavigationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellNavigationTest.java index dca5b706..970932c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellNavigationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellNavigationTest.java
@@ -7,6 +7,7 @@ import static org.chromium.chrome.browser.vr_shell.VrTestRule.PAGE_LOAD_TIMEOUT_S; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_LONG_MS; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_SHORT_MS; +import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_DEVICE_DAYDREAM; import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM; import android.support.test.filters.MediumTest; @@ -40,7 +41,7 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell", "enable-webvr"}) -@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) +@Restriction(RESTRICTION_TYPE_DEVICE_DAYDREAM) public class VrShellNavigationTest { @Rule public VrTestRule mVrTestRule = new VrTestRule(); @@ -158,6 +159,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testWebVrTo2d() throws IllegalArgumentException, InterruptedException, TimeoutException { mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); @@ -173,6 +175,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testWebVrToWebVr() throws IllegalArgumentException, InterruptedException, TimeoutException { mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); @@ -188,6 +191,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testWebVrPresentingTo2d() throws IllegalArgumentException, InterruptedException, TimeoutException { mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); @@ -204,6 +208,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testWebVrPresentingToWebVr() throws IllegalArgumentException, InterruptedException, TimeoutException { mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); @@ -220,6 +225,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testWebVrFullscreenTo2d() throws IllegalArgumentException, InterruptedException, TimeoutException { mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); @@ -236,6 +242,7 @@ */ @Test @MediumTest + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public void testWebVrFullscreenToWebVr() throws IllegalArgumentException, InterruptedException, TimeoutException { mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellTransitionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellTransitionTest.java index ea5edfe7..8076fae 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellTransitionTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellTransitionTest.java
@@ -39,7 +39,6 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell"}) -@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) public class VrShellTransitionTest { @Rule public VrTestRule mVrTestRule = new VrTestRule(); @@ -127,6 +126,7 @@ */ @Test @CommandLineFlags.Add("enable-webvr") + @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) @MediumTest public void testExitPresentationWebVrToVrShell() throws IllegalArgumentException, InterruptedException, TimeoutException {
diff --git a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java index 5d16701..d068de3 100644 --- a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java +++ b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java
@@ -21,6 +21,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.R; +import org.chromium.chrome.browser.autofill.CardType; import org.chromium.chrome.browser.autofill.PersonalDataManager; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.preferences.Preferences; @@ -740,7 +741,7 @@ boolean isLocal = false; PersonalDataManager.getInstance().addServerCreditCardForTest(new CreditCard("", "https://example.com", isLocal, false, "Jon Doe", "4111111111111111", - "1111", "11", "20", "visa", 0, "" /* billingAddressId */, + "1111", "11", "20", "visa", 0, CardType.UNKNOWN, "" /* billingAddressId */, "025eb937c022489eb8dc78cbaa969218" /* serverId */)); } });
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index fc3aed6e..8fbeb05d 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -5447,8 +5447,8 @@ </message> </if> <if expr="use_titlecase"> - <message name="IDS_TOOLTIP_SAVE_CREDIT_CARD" desc="In Title Case: The tooltip for the icon that shows the save credit card bubble"> - Save Credit Card + <message name="IDS_TOOLTIP_SAVE_CREDIT_CARD" desc="In Title Case: The tooltip for the icon that shows the save card bubble"> + Save Card </message> </if> <message name="IDS_TOOLTIP_TRANSLATE" desc="The tooltip for translate"> @@ -7572,8 +7572,8 @@ <message name="IDS_AUTOFILL_ADDRESSES_GROUP_NAME" desc="The name of the Addresses group of the Autofill dialog."> Addresses </message> - <message name="IDS_AUTOFILL_CREDITCARDS_GROUP_NAME" desc="IThe name of the Credit Cards group of the Autofill dialog."> - Credit cards + <message name="IDS_AUTOFILL_CREDITCARDS_GROUP_NAME" desc="The name of the Cards group of the Autofill dialog."> + Cards </message> <message name="IDS_AUTOFILL_EDIT_ADDRESS_CAPTION" desc="The caption on the edit Autofill address dialog."> Edit address @@ -7584,14 +7584,14 @@ <message name="IDS_AUTOFILL_ADD_CONTACT_CAPTION" desc="The caption on the edit Autofill contact dialog for the new entry."> Add a contact </message> - <message name="IDS_AUTOFILL_EDIT_CREDITCARD_CAPTION" desc="The caption on the edit Autofill credit card dialog."> - Edit credit card + <message name="IDS_AUTOFILL_EDIT_CREDITCARD_CAPTION" desc="The caption on the edit Autofill card dialog. The card can be either credit, debit, or prepaid."> + Edit card </message> - <message name="IDS_AUTOFILL_ADD_CREDITCARD_CAPTION" desc="The caption on the edit Autofill credit card dialog the new entry."> - Add a credit card + <message name="IDS_AUTOFILL_ADD_CREDITCARD_CAPTION" desc="The caption on the edit Autofill card dialog the new entry. The card can be either credit, debit, or prepaid."> + Add a card </message> <message name="IDS_AUTOFILL_USE_PAYMENTS_DATA" desc="The text for the checkbox that controls the Autofill/Payments integration feature."> - Credit cards and addresses using Google Payments + Cards and addresses using Google Payments </message> <message name="IDS_AUTOFILL_FIELD_LABEL_EMAIL" desc="The label of the Email entry."> @@ -7603,8 +7603,8 @@ <message name="IDS_AUTOFILL_FIELD_LABEL_NAME_ON_CARD" desc="The label of the Name on card entry."> Name on card </message> - <message name="IDS_AUTOFILL_FIELD_LABEL_CREDIT_CARD_NUMBER" desc="The label of the Credit card number entry."> - Credit card number + <message name="IDS_AUTOFILL_FIELD_LABEL_CREDIT_CARD_NUMBER" desc="The label of the card number entry. This can be either credit, debit, or prepaid card."> + Card number </message> <message name="IDS_AUTOFILL_FIELD_LABEL_EXPIRATION_DATE" desc="The label of the Expiration date entry."> Expiration date
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index a65a9219..ce2853d 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -425,17 +425,17 @@ <message name="IDS_SETTINGS_CREDIT_CARD_CLEAR" desc="Label for a context menu item clears the locally cached credit card that is also saved on Google Payments. Clicking this will NOT remove the credit card from Google Payments."> Clear copy </message> - <message name="IDS_SETTINGS_EDIT_CREDIT_CARD_TITLE" desc="The title for the dialog that's shown when editing a credit card."> - Edit credit card + <message name="IDS_SETTINGS_EDIT_CREDIT_CARD_TITLE" desc="The title for the dialog that's shown when editing a card. This can be either credit, debit, or prepaid card.."> + Edit card </message> - <message name="IDS_SETTINGS_ADD_CREDIT_CARD_TITLE" desc="The title for the dialog that's shown when entering the information for a new credit card."> - Add credit card + <message name="IDS_SETTINGS_ADD_CREDIT_CARD_TITLE" desc="The title for the dialog that's shown when entering the information for a new card. This can be either credit, debit, or prepaid card."> + Add card </message> <message name="IDS_SETTINGS_NAME_ON_CREDIT_CARD" desc="The title for the input that lets users modify the name on the credit card."> Name on card </message> - <message name="IDS_SETTINGS_CREDIT_CARD_NUMBER" desc="The title for the input that lets users modify the credit card number for a credit card."> - Credit card number + <message name="IDS_SETTINGS_CREDIT_CARD_NUMBER" desc="The title for the input that lets users modify the number for a card. This can be either credit, debit, or prepaid card."> + Card number </message> <message name="IDS_SETTINGS_CREDIT_CARD_EXPIRATION_DATE" desc="Label for the expiration date fields of a credit card that has been or is being saved."> Expiration date @@ -446,8 +446,8 @@ <message name="IDS_SETTINGS_CREDIT_CARD_EXPIRATION_YEAR" desc="Accessibility label on the year drop down to let users know the field corresponds to the expiration year"> Expiration year </message> - <message name="IDS_SETTINGS_CREDIT_CARD_EXPIRED" desc="The error message that is shown when user attempts to enter or save an expired credit card."> - Your credit card is expired + <message name="IDS_SETTINGS_CREDIT_CARD_EXPIRED" desc="The error message that is shown when user attempts to enter or save an expired card."> + Your card is expired </message> <message name="IDS_SETTINGS_PASSWORDS" desc="Name for the password section and toggle"> Manage passwords @@ -918,6 +918,9 @@ <message name="IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTERS_MANUALLY_TITLE" desc="Text for the title of the dialog that is used to manually add a printer instead of automatically finding ones nearby."> Add a printer manually </message> + <message name="IDS_SETTINGS_PRINTING_CUPS_SELECT_MANUFACTURER_AND_MODEL_TITLE" desc="Text for the title of the dialog that is used to select a manufacturer and model from the drop down list."> + Select a printer manufacturer and model + </message> <message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_DETAILS_TITLE" desc="Text for the title of the Printer Details subpage."> Printer details </message>
diff --git a/chrome/browser/autofill/android/personal_data_manager_android.cc b/chrome/browser/autofill/android/personal_data_manager_android.cc index 875e77d..aaa3649 100644 --- a/chrome/browser/autofill/android/personal_data_manager_android.cc +++ b/chrome/browser/autofill/android/personal_data_manager_android.cc
@@ -43,16 +43,16 @@ #include "third_party/libaddressinput/chromium/chrome_metadata_source.h" #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" -using base::android::ConvertJavaStringToUTF8; -using base::android::ConvertUTF16ToJavaString; -using base::android::ConvertUTF8ToJavaString; -using base::android::JavaParamRef; -using base::android::ScopedJavaGlobalRef; -using base::android::ScopedJavaLocalRef; - namespace autofill { namespace { +using ::base::android::ConvertJavaStringToUTF8; +using ::base::android::ConvertUTF16ToJavaString; +using ::base::android::ConvertUTF8ToJavaString; +using ::base::android::JavaParamRef; +using ::base::android::ScopedJavaGlobalRef; +using ::base::android::ScopedJavaLocalRef; + Profile* GetProfile() { return ProfileManager::GetActiveUserProfile()->GetOriginalProfile(); } @@ -95,10 +95,9 @@ profile->SetRawInfo(type, ConvertJavaStringToUTF16(jstr)); } -void PopulateNativeProfileFromJava( - const JavaParamRef<jobject>& jprofile, - JNIEnv* env, - AutofillProfile* profile) { +void PopulateNativeProfileFromJava(const JavaParamRef<jobject>& jprofile, + JNIEnv* env, + AutofillProfile* profile) { profile->set_origin( ConvertJavaStringToUTF8(Java_AutofillProfile_getOrigin(env, jprofile))); profile->SetInfo( @@ -153,14 +152,13 @@ ConvertUTF8ToJavaString(env, payment_request_data.basic_card_issuer_network), ResourceMapper::MapFromChromiumId(payment_request_data.icon_resource_id), - ConvertUTF8ToJavaString(env, card.billing_address_id()), + card.card_type(), ConvertUTF8ToJavaString(env, card.billing_address_id()), ConvertUTF8ToJavaString(env, card.server_id())); } -void PopulateNativeCreditCardFromJava( - const jobject& jcard, - JNIEnv* env, - CreditCard* card) { +void PopulateNativeCreditCardFromJava(const jobject& jcard, + JNIEnv* env, + CreditCard* card) { card->set_origin( ConvertJavaStringToUTF8(Java_CreditCard_getOrigin(env, jcard))); card->SetRawInfo( @@ -180,6 +178,11 @@ card->set_server_id( ConvertJavaStringToUTF8(Java_CreditCard_getServerId(env, jcard))); + jint card_type = Java_CreditCard_getCardType(env, jcard); + DCHECK_GE(CreditCard::CARD_TYPE_PREPAID, card_type); + DCHECK_LE(CreditCard::CARD_TYPE_UNKNOWN, card_type); + card->set_card_type(static_cast<CreditCard::CardType>(card_type)); + // Only set the guid if it is an existing card (java guid not empty). // Otherwise, keep the generated one. std::string guid = @@ -374,8 +377,7 @@ const JavaParamRef<jobject>& unused_obj, const JavaParamRef<jobject>& jprofile) { std::string guid = ConvertJavaStringToUTF8( - env, - Java_AutofillProfile_getGUID(env, jprofile).obj()); + env, Java_AutofillProfile_getGUID(env, jprofile).obj()); AutofillProfile profile; PopulateNativeProfileFromJava(jprofile, env, &profile); @@ -499,7 +501,7 @@ const JavaParamRef<jobject>& unused_obj, const JavaParamRef<jstring>& jguid) { CreditCard* card = personal_data_manager_->GetCreditCardByGUID( - ConvertJavaStringToUTF8(env, jguid)); + ConvertJavaStringToUTF8(env, jguid)); if (!card) return ScopedJavaLocalRef<jobject>(); @@ -520,9 +522,8 @@ JNIEnv* env, const JavaParamRef<jobject>& unused_obj, const JavaParamRef<jobject>& jcard) { - std::string guid = ConvertJavaStringToUTF8( - env, - Java_CreditCard_getGUID(env, jcard).obj()); + std::string guid = + ConvertJavaStringToUTF8(env, Java_CreditCard_getGUID(env, jcard).obj()); CreditCard card; PopulateNativeCreditCardFromJava(jcard, env, &card); @@ -568,7 +569,7 @@ JNIEnv* env, const base::android::JavaParamRef<jobject>& unused_obj, const base::android::JavaParamRef<jobject>& jcard) { - std::unique_ptr<CreditCard> card(new CreditCard); + std::unique_ptr<CreditCard> card = base::MakeUnique<CreditCard>(); PopulateNativeCreditCardFromJava(jcard, env, card.get()); card->set_record_type(CreditCard::MASKED_SERVER_CARD); personal_data_manager_->AddServerCreditCardForTest(std::move(card)); @@ -596,11 +597,11 @@ const JavaParamRef<jobject>& jweb_contents, const JavaParamRef<jobject>& jcard, const JavaParamRef<jobject>& jdelegate) { - std::unique_ptr<CreditCard> card(new CreditCard); + std::unique_ptr<CreditCard> card = base::MakeUnique<CreditCard>(); PopulateNativeCreditCardFromJava(jcard, env, card.get()); // Self-deleting object. - (new FullCardRequester())->GetFullCard( - env, jweb_contents, jdelegate, std::move(card)); + (new FullCardRequester()) + ->GetFullCard(env, jweb_contents, jdelegate, std::move(card)); } void PersonalDataManagerAndroid::OnPersonalDataChanged() { @@ -815,7 +816,7 @@ std::unique_ptr<std::vector<ServerFieldType>> suggested_fields; size_t minimal_fields_shown = 2; if (address_only) { - suggested_fields.reset(new std::vector<ServerFieldType>); + suggested_fields = base::MakeUnique<std::vector<ServerFieldType>>(); if (include_name_in_label) suggested_fields->push_back(NAME_FULL); if (include_organization_in_label)
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index c4e6a15..bc8cea2f 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd
@@ -463,6 +463,8 @@ <include name="IDR_SIGNIN_EMAIL_CONFIRMATION_JS" file="resources\signin\signin_email_confirmation\signin_email_confirmation.js" type="BINDATA" /> <include name="IDR_SIGNIN_ERROR_HTML" file="resources\signin\signin_error\signin_error.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_SIGNIN_ERROR_JS" file="resources\signin\signin_error\signin_error.js" type="BINDATA" /> + <include name="IDR_SIGNIN_DICE_INTERNALS_HTML" file="resources\signin\signin_dice_internals\signin_dice_internals.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> + <include name="IDR_SIGNIN_DICE_INTERNALS_JS" file="resources\signin\signin_dice_internals\signin_dice_internals.js" type="BINDATA" /> <if expr="chromeos"> <include name="IDR_UBER_HTML" file="resources\uber\uber.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_UBER_JS" file="resources\uber\uber.js" type="BINDATA" />
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc index 2a2aee9a..abbe1be 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc
@@ -291,17 +291,10 @@ return; } - std::string raw_session_key; - session_key->GetRawKey(&raw_session_key); - challenge_creator_.reset(new ChallengeCreator( - user_key, - raw_session_key, - tpm_public_key_, - device, + user_key, session_key->key(), tpm_public_key_, device, base::Bind(&EasyUnlockCreateKeysOperation::OnChallengeCreated, - weak_ptr_factory_.GetWeakPtr(), - index))); + weak_ptr_factory_.GetWeakPtr(), index))); challenge_creator_->Start(); }
diff --git a/chrome/browser/chromeos/login/helper.cc b/chrome/browser/chromeos/login/helper.cc index 0020fc0..fb79ef11 100644 --- a/chrome/browser/chromeos/login/helper.cc +++ b/chrome/browser/chromeos/login/helper.cc
@@ -18,6 +18,7 @@ #include "chromeos/network/managed_network_configuration_handler.h" #include "chromeos/network/network_connection_handler.h" #include "chromeos/network/network_handler.h" +#include "chromeos/network/network_handler_callbacks.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" #include "chromeos/network/network_util.h" @@ -36,6 +37,8 @@ namespace { +constexpr char kInvalidJsonError[] = "Invalid JSON Dictionary"; + // Gets the WebContents instance of current login display. If there is none, // returns nullptr. content::WebContents* GetLoginWebContents() { @@ -164,15 +167,19 @@ void NetworkStateHelper::CreateAndConnectNetworkFromOnc( const std::string& onc_spec, const base::Closure& success_callback, - const base::Closure& error_callback) const { + const network_handler::ErrorCallback& error_callback) const { std::string error; std::unique_ptr<base::Value> root = base::JSONReader::ReadAndReturnError( onc_spec, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error); base::DictionaryValue* toplevel_onc = nullptr; if (!root || !root->GetAsDictionary(&toplevel_onc)) { - LOG(ERROR) << "Invalid JSON Dictionary: " << error; - error_callback.Run(); + LOG(ERROR) << kInvalidJsonError << ": " << error; + std::unique_ptr<base::DictionaryValue> error_data = + base::MakeUnique<base::DictionaryValue>(); + error_data->SetString(network_handler::kErrorName, kInvalidJsonError); + error_data->SetString(network_handler::kErrorDetail, error); + error_callback.Run(kInvalidJsonError, std::move(error_data)); return; } @@ -182,8 +189,7 @@ "", *toplevel_onc, base::Bind(&NetworkStateHelper::OnCreateConfiguration, base::Unretained(this), success_callback, error_callback), - base::Bind(&NetworkStateHelper::OnCreateOrConnectNetworkFailed, - base::Unretained(this), error_callback)); + error_callback); } bool NetworkStateHelper::IsConnected() const { @@ -202,23 +208,12 @@ void NetworkStateHelper::OnCreateConfiguration( const base::Closure& success_callback, - const base::Closure& error_callback, + const network_handler::ErrorCallback& error_callback, const std::string& service_path, const std::string& guid) const { // Connect to the network. NetworkHandler::Get()->network_connection_handler()->ConnectToNetwork( - service_path, success_callback, - base::Bind(&NetworkStateHelper::OnCreateOrConnectNetworkFailed, - base::Unretained(this), error_callback), - false); -} - -void NetworkStateHelper::OnCreateOrConnectNetworkFailed( - const base::Closure& error_callback, - const std::string& error_name, - std::unique_ptr<base::DictionaryValue> error_data) const { - LOG(ERROR) << "Failed to create or connect to network: " << error_name; - error_callback.Run(); + service_path, success_callback, error_callback, false); } content::StoragePartition* GetSigninPartition() {
diff --git a/chrome/browser/chromeos/login/helper.h b/chrome/browser/chromeos/login/helper.h index f3ebd2fa..2db275c 100644 --- a/chrome/browser/chromeos/login/helper.h +++ b/chrome/browser/chromeos/login/helper.h
@@ -12,6 +12,7 @@ #include "base/compiler_specific.h" #include "base/macros.h" #include "base/strings/string16.h" +#include "chromeos/network/network_handler_callbacks.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/views/view.h" @@ -73,7 +74,7 @@ virtual void CreateAndConnectNetworkFromOnc( const std::string& onc_spec, const base::Closure& success_callback, - const base::Closure& error_callback) const; + const network_handler::ErrorCallback& error_callback) const; // Returns true if the default network is in connected state. virtual bool IsConnected() const; @@ -82,14 +83,11 @@ virtual bool IsConnecting() const; private: - void OnCreateConfiguration(const base::Closure& success_callback, - const base::Closure& error_callback, - const std::string& service_path, - const std::string& guid) const; - void OnCreateOrConnectNetworkFailed( - const base::Closure& error_callback, - const std::string& error_name, - std::unique_ptr<base::DictionaryValue> error_data) const; + void OnCreateConfiguration( + const base::Closure& success_callback, + const network_handler::ErrorCallback& error_callback, + const std::string& service_path, + const std::string& guid) const; DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper); };
diff --git a/chrome/browser/chromeos/login/screens/host_pairing_screen.cc b/chrome/browser/chromeos/login/screens/host_pairing_screen.cc index 64b431c..9b8e3a7 100644 --- a/chrome/browser/chromeos/login/screens/host_pairing_screen.cc +++ b/chrome/browser/chromeos/login/screens/host_pairing_screen.cc
@@ -11,9 +11,26 @@ #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" #include "components/pairing/host_pairing_controller.h" +#include "google_apis/gaia/google_service_auth_error.h" namespace chromeos { +namespace { + +// Gets the fine-grained enrollment error code. It's calculated by concatenating +// |main_error_code| and |sub_error_code| strings together. The reason that +// string concatenation is preferred to arithmetic addition is that the number +// of sub error states is not necessarily a one-digit number and may have +// arbitrary digits. +int GetEnrollmentErrorCode( + pairing_chromeos::HostPairingController::ErrorCode main_error_code, + int sub_error_code) { + return std::stoi(std::to_string(static_cast<int>(main_error_code)) + + std::to_string(sub_error_code)); +} + +} // namespace + using namespace host_pairing; using namespace pairing_chromeos; @@ -164,17 +181,25 @@ void HostPairingScreen::OnAuthError(const GoogleServiceAuthError& error) { enrollment_error_string_ = view_->GetErrorStringFromAuthError(error); + enrollment_error_code_ = + GetEnrollmentErrorCode(HostPairingController::ErrorCode::AUTH_ERROR, + static_cast<int>(error.state())); OnAnyEnrollmentError(); } void HostPairingScreen::OnEnrollmentError(policy::EnrollmentStatus status) { enrollment_error_string_ = view_->GetErrorStringFromEnrollmentError(status); + enrollment_error_code_ = + GetEnrollmentErrorCode(HostPairingController::ErrorCode::ENROLL_ERROR, + static_cast<int>(status.status())); OnAnyEnrollmentError(); } void HostPairingScreen::OnOtherError( EnterpriseEnrollmentHelper::OtherError error) { enrollment_error_string_ = view_->GetErrorStringFromOtherError(error); + enrollment_error_code_ = GetEnrollmentErrorCode( + HostPairingController::ErrorCode::OTHER_ERROR, static_cast<int>(error)); OnAnyEnrollmentError(); } @@ -204,6 +229,8 @@ void HostPairingScreen::OnAnyEnrollmentError() { enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, weak_ptr_factory_.GetWeakPtr())); + remora_controller_->SetErrorCodeAndMessage(enrollment_error_code_, + enrollment_error_string_); remora_controller_->OnEnrollmentStatusChanged( HostPairingController::ENROLLMENT_STATUS_FAILURE); }
diff --git a/chrome/browser/chromeos/login/screens/host_pairing_screen.h b/chrome/browser/chromeos/login/screens/host_pairing_screen.h index 39da633..fce409b2 100644 --- a/chrome/browser/chromeos/login/screens/host_pairing_screen.h +++ b/chrome/browser/chromeos/login/screens/host_pairing_screen.h
@@ -90,6 +90,10 @@ pairing_chromeos::HostPairingController* remora_controller_ = nullptr; std::unique_ptr<EnterpriseEnrollmentHelper> enrollment_helper_; + + // Describes the error code of an enrollment operation. For the format, see + // the definition of |error_code_| in bluetooth_host_pairing_controller.h. + int enrollment_error_code_ = 0; std::string enrollment_error_string_; // Current stage of pairing process.
diff --git a/chrome/browser/chromeos/login/screens/network_screen.cc b/chrome/browser/chromeos/login/screens/network_screen.cc index fdc73f2..1d78fd4 100644 --- a/chrome/browser/chromeos/login/screens/network_screen.cc +++ b/chrome/browser/chromeos/login/screens/network_screen.cc
@@ -155,9 +155,9 @@ void NetworkScreen::CreateAndConnectNetworkFromOnc( const std::string& onc_spec, const base::Closure& success_callback, - const base::Closure& failed_callback) { + const network_handler::ErrorCallback& error_callback) { network_state_helper_->CreateAndConnectNetworkFromOnc( - onc_spec, success_callback, failed_callback); + onc_spec, success_callback, error_callback); } void NetworkScreen::AddObserver(Observer* observer) {
diff --git a/chrome/browser/chromeos/login/screens/network_screen.h b/chrome/browser/chromeos/login/screens/network_screen.h index 0b61db13d..3f383569 100644 --- a/chrome/browser/chromeos/login/screens/network_screen.h +++ b/chrome/browser/chromeos/login/screens/network_screen.h
@@ -7,6 +7,7 @@ #include <memory> +#include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/macros.h" @@ -17,6 +18,7 @@ #include "base/timer/timer.h" #include "chrome/browser/chromeos/login/screens/base_screen.h" #include "chrome/browser/chromeos/settings/cros_settings.h" +#include "chromeos/network/network_handler_callbacks.h" #include "chromeos/network/network_state_handler_observer.h" #include "ui/base/ime/chromeos/input_method_manager.h" @@ -86,9 +88,10 @@ // Currently We can only get unsecured Wifi network configuration from shark // that can be applied to remora. Returns the network ONC configuration. void GetConnectedWifiNetwork(std::string* out_onc_spec); - void CreateAndConnectNetworkFromOnc(const std::string& onc_spec, - const base::Closure& success_callback, - const base::Closure& failed_callback); + void CreateAndConnectNetworkFromOnc( + const std::string& onc_spec, + const base::Closure& success_callback, + const network_handler::ErrorCallback& error_callback); void AddObserver(Observer* observer); void RemoveObserver(Observer* observer);
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc index aa69f57a1..28446d1 100644 --- a/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc +++ b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
@@ -47,9 +47,8 @@ std::unique_ptr<crypto::SymmetricKey> key( crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, kHMACKeySizeInBits)); - std::string raw_result, result; - key->GetRawKey(&raw_result); - base::Base64Encode(raw_result, &result); + std::string result; + base::Base64Encode(key->key(), &result); return result; }
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index f775eef..f19f522 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -15,6 +15,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/json/json_string_value_serializer.h" #include "base/location.h" #include "base/logging.h" #include "base/macros.h" @@ -1317,7 +1318,8 @@ if (NetworkAllowUpdate(network_state)) { network_screen->CreateAndConnectNetworkFromOnc( - onc_spec, base::Bind(&base::DoNothing), base::Bind(&base::DoNothing)); + onc_spec, base::Bind(&base::DoNothing), + network_handler::ErrorCallback()); } else { network_screen->CreateAndConnectNetworkFromOnc( onc_spec, base::Bind(&WizardController::OnSetHostNetworkSuccessful, @@ -1617,7 +1619,19 @@ InitiateOOBEUpdate(); } -void WizardController::OnSetHostNetworkFailed() { +void WizardController::OnSetHostNetworkFailed( + const std::string& error_name, + std::unique_ptr<base::DictionaryValue> error_data) { + std::string error_message; + JSONStringValueSerializer serializer(&error_message); + serializer.Serialize(*error_data); + error_message = error_name + ": " + error_message; + + remora_controller_->SetErrorCodeAndMessage( + static_cast<int>( + pairing_chromeos::HostPairingController::ErrorCode::NETWORK_ERROR), + error_message); + remora_controller_->OnNetworkConnectivityChanged( pairing_chromeos::HostPairingController::CONNECTIVITY_NONE); }
diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h index d45a37a..e39bdd64 100644 --- a/chrome/browser/chromeos/login/wizard_controller.h +++ b/chrome/browser/chromeos/login/wizard_controller.h
@@ -316,7 +316,9 @@ // Callback functions for AddNetworkRequested(). void OnSetHostNetworkSuccessful(); - void OnSetHostNetworkFailed(); + void OnSetHostNetworkFailed( + const std::string& error_name, + std::unique_ptr<base::DictionaryValue> error_data); // Start the enrollment screen using the config from // |prescribed_enrollment_config_|. If |force_interactive| is true,
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 40602f82..050d4e831 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc
@@ -884,6 +884,8 @@ builder.set_ftp_enabled(true); #endif + builder.DisableHttpCache(); + globals_->system_request_context = builder.Build(); }
diff --git a/chrome/browser/io_thread_browsertest.cc b/chrome/browser/io_thread_browsertest.cc index 11dcd9e..b7c536e1 100644 --- a/chrome/browser/io_thread_browsertest.cc +++ b/chrome/browser/io_thread_browsertest.cc
@@ -59,14 +59,14 @@ DISALLOW_COPY_AND_ASSIGN(TestURLFetcherDelegate); }; -class IOThreadPacTest : public InProcessBrowserTest { +class IOThreadBrowserTest : public InProcessBrowserTest { public: - IOThreadPacTest() {} - ~IOThreadPacTest() override {} + IOThreadBrowserTest() {} + ~IOThreadBrowserTest() override {} void SetUp() override { // Must start listening (And get a port for the proxy) before calling - // SetUp(). + // SetUp(). Use two phase EmbeddedTestServer setup for proxy tests. ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); InProcessBrowserTest::SetUp(); } @@ -84,10 +84,38 @@ } }; -class IOThreadPacTestWithHangingRequest : public IOThreadPacTest { +// Make sure that the system URLRequestContext does not cache responses. Main +// reason for this test is that caching requires memory, so this guards against +// accidentally hooking up a cache. +IN_PROC_BROWSER_TEST_F(IOThreadBrowserTest, NoCache) { + GURL cacheable_url = embedded_test_server()->GetURL("/cachetime"); + // Request a cacheable resource. Request should succeed. + TestURLFetcherDelegate fetcher_delegate; + std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create( + cacheable_url, net::URLFetcher::GET, &fetcher_delegate); + fetcher->SetRequestContext( + g_browser_process->io_thread()->system_url_request_context_getter()); + fetcher->Start(); + fetcher_delegate.WaitForCompletion(); + EXPECT_EQ(200, fetcher->GetResponseCode()); + + // Shut down server and re-request resource. Request should fail. + TestURLFetcherDelegate failed_fetcher_delegate; + EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); + fetcher = net::URLFetcher::Create(cacheable_url, net::URLFetcher::GET, + &failed_fetcher_delegate); + fetcher->SetRequestContext( + g_browser_process->io_thread()->system_url_request_context_getter()); + fetcher->Start(); + failed_fetcher_delegate.WaitForCompletion(); + EXPECT_FALSE(fetcher->GetStatus().is_success()); + EXPECT_EQ(net::ERR_CONNECTION_REFUSED, fetcher->GetStatus().error()); +} + +class IOThreadBrowserTestWithHangingPacRequest : public IOThreadBrowserTest { public: - IOThreadPacTestWithHangingRequest() {} - ~IOThreadPacTestWithHangingRequest() override {} + IOThreadBrowserTestWithHangingPacRequest() {} + ~IOThreadBrowserTestWithHangingPacRequest() override {} void SetUpOnMainThread() override { // This must be created after the main message loop has been set up. @@ -99,7 +127,7 @@ embedded_test_server()->SetConnectionListener(connection_listener_.get()); - IOThreadPacTest::SetUpOnMainThread(); + IOThreadBrowserTest::SetUpOnMainThread(); } void SetUpCommandLine(base::CommandLine* command_line) override { @@ -114,7 +142,7 @@ // Make sure that the SystemURLRequestContext is shut down correctly when // there's an in-progress PAC script fetch. -IN_PROC_BROWSER_TEST_F(IOThreadPacTestWithHangingRequest, Shutdown) { +IN_PROC_BROWSER_TEST_F(IOThreadBrowserTestWithHangingPacRequest, Shutdown) { // Request that should hang while trying to request the PAC script. // Enough requests are created on startup that this probably isn't needed, but // best to be safe. @@ -128,11 +156,13 @@ connection_listener_->WaitForConnections(); } -class IOThreadPacTestWithFileURL : public IOThreadPacTest { +class IOThreadBrowserTestWithPacFileURL : public IOThreadBrowserTest { public: - IOThreadPacTestWithFileURL() { EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); } + IOThreadBrowserTestWithPacFileURL() { + EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); + } - ~IOThreadPacTestWithFileURL() override {} + ~IOThreadBrowserTestWithPacFileURL() override {} void SetUpCommandLine(base::CommandLine* command_line) override { base::FilePath pac_file_path; @@ -158,7 +188,7 @@ // Make sure the system URLRequestContext can hadle fetching PAC scripts from // file URLs. -IN_PROC_BROWSER_TEST_F(IOThreadPacTestWithFileURL, FilePac) { +IN_PROC_BROWSER_TEST_F(IOThreadBrowserTestWithPacFileURL, FilePac) { TestURLFetcherDelegate fetcher_delegate; std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create(GURL("http://foo:12345/echoheader?Foo"),
diff --git a/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc index eeb6acd7..6c7bc7f 100644 --- a/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc +++ b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc
@@ -45,7 +45,7 @@ auto offline_metrics_collector = base::MakeUnique<OfflineMetricsCollectorImpl>(); auto suggested_articles_observer = - base::MakeUnique<SuggestedArticlesObserver>(prefetch_dispatcher.get()); + base::MakeUnique<SuggestedArticlesObserver>(); return new PrefetchServiceImpl(std::move(offline_metrics_collector), std::move(prefetch_dispatcher),
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc index ce6c1639..5607157 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -31,6 +31,8 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/shell_integration_win.h" #include "chrome/browser/win/app_icon.h" +#include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/grit/chrome_unscaled_resources.h" @@ -779,8 +781,16 @@ // static bool ProfileShortcutManager::IsFeatureEnabled() { base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - return command_line->HasSwitch(switches::kEnableProfileShortcutManager) || - !command_line->HasSwitch(switches::kUserDataDir); + if (command_line->HasSwitch(switches::kEnableProfileShortcutManager)) + return true; + + base::FilePath user_data_dir; + bool success = base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + DCHECK(success); + base::FilePath default_user_data_dir; + success = chrome::GetDefaultUserDataDirectory(&default_user_data_dir); + DCHECK(success); + return user_data_dir == default_user_data_dir; } // static
diff --git a/chrome/browser/resources/chromeos/arc_support/background.js b/chrome/browser/resources/chromeos/arc_support/background.js index d3a1415c..5028bee 100644 --- a/chrome/browser/resources/chromeos/arc_support/background.js +++ b/chrome/browser/resources/chromeos/arc_support/background.js
@@ -63,7 +63,6 @@ * Class to handle checkbox corresponding to a preference. */ class PreferenceCheckbox { - /** * Creates a Checkbox which handles the corresponding preference update. * @param {Element} container The container this checkbox corresponds to. @@ -107,7 +106,9 @@ * different from the preference value, because the user's check is * not propagated to the preference until the user clicks "AGREE" button. */ - isChecked() { return this.checkbox_.checked; } + isChecked() { + return this.checkbox_.checked; + } /** * Called when the preference value in native code is updated. @@ -141,8 +142,8 @@ */ class MetricsPreferenceCheckbox extends PreferenceCheckbox { constructor( - container, learnMoreContent, learnMoreLinkId, isOwner, - textDisabled, textEnabled, textManagedDisabled, textManagedEnabled) { + container, learnMoreContent, learnMoreLinkId, isOwner, textDisabled, + textEnabled, textManagedDisabled, textManagedEnabled) { // Do not use policy indicator. // Learn More link handling is done by this class. // So pass |null| intentionally. @@ -154,8 +155,8 @@ // Two dimensional array. First dimension is whether it is managed or not, // the second one is whether it is enabled or not. this.texts_ = [ - [textDisabled, textEnabled], - [textManagedDisabled, textManagedEnabled] + [textDisabled, textEnabled], + [textManagedDisabled, textManagedEnabled], ]; } @@ -207,7 +208,6 @@ * loading of Terms-Of-Service content. */ class TermsOfServicePage { - /** * @param {Element} container The container of the page. * @param {boolean} isManaged Set true if ARC is managed. @@ -220,8 +220,8 @@ * location service. */ constructor( - container, isManaged, countryCode, - metricsCheckbox, backupRestoreCheckbox, locationServiceCheckbox) { + container, isManaged, countryCode, metricsCheckbox, backupRestoreCheckbox, + locationServiceCheckbox) { this.loadingContainer_ = container.querySelector('#terms-of-service-loading'); this.contentContainer_ = @@ -245,17 +245,20 @@ var scriptSetCountryCode = 'document.countryCode = \'' + countryCode.toLowerCase() + '\';'; this.termsView_.addContentScripts([ - { name: 'preProcess', + { + name: 'preProcess', matches: ['https://play.google.com/*'], - js: { code: scriptSetCountryCode }, + js: {code: scriptSetCountryCode}, run_at: 'document_start' }, - { name: 'postProcess', + { + name: 'postProcess', matches: ['https://play.google.com/*'], - css: { files: ['playstore.css'] }, - js: { files: ['playstore.js'] }, + css: {files: ['playstore.css']}, + js: {files: ['playstore.js']}, run_at: 'document_end' - }]); + } + ]); // webview is not allowed to open links in the new window. Hook these // events and open links in overlay dialog. @@ -413,27 +416,19 @@ // Initialize preference connected checkboxes in terms of service page. termsPage = new TermsOfServicePage( - doc.getElementById('terms'), - data.arcManaged, - data.countryCode, + doc.getElementById('terms'), data.arcManaged, data.countryCode, new MetricsPreferenceCheckbox( - doc.getElementById('metrics-preference'), - data.learnMoreStatistics, - '#learn-more-link-metrics', - data.isOwnerProfile, - data.textMetricsDisabled, - data.textMetricsEnabled, - data.textMetricsManagedDisabled, - data.textMetricsManagedEnabled), + doc.getElementById('metrics-preference'), data.learnMoreStatistics, + '#learn-more-link-metrics', data.isOwnerProfile, + data.textMetricsDisabled, data.textMetricsEnabled, + data.textMetricsManagedDisabled, data.textMetricsManagedEnabled), new PreferenceCheckbox( doc.getElementById('backup-restore-preference'), - data.learnMoreBackupAndRestore, - '#learn-more-link-backup-restore', + data.learnMoreBackupAndRestore, '#learn-more-link-backup-restore', data.controlledByPolicy), new PreferenceCheckbox( doc.getElementById('location-service-preference'), - data.learnMoreLocationServices, - '#learn-more-link-location-service', + data.learnMoreLocationServices, '#learn-more-link-location-service', data.controlledByPolicy)); } @@ -508,11 +503,11 @@ if (pageDivId == 'lso-loading') { lsoView.src = 'https://accounts.google.com/o/oauth2/v2/auth?client_id=' + - '1070009224336-sdh77n7uot3oc99ais00jmuft6sk2fg9.apps.' + - 'googleusercontent.com&response_type=code&redirect_uri=oob&' + - 'scope=https://www.google.com/accounts/OAuthLogin&' + - 'device_type=arc_plus_plus&device_id=' + currentDeviceId + - '&hl=' + navigator.language; + '1070009224336-sdh77n7uot3oc99ais00jmuft6sk2fg9.apps.' + + 'googleusercontent.com&response_type=code&redirect_uri=oob&' + + 'scope=https://www.google.com/accounts/OAuthLogin&' + + 'device_type=arc_plus_plus&device_id=' + currentDeviceId + + '&hl=' + navigator.language; } appWindow.show(); if (pageDivId == 'terms') { @@ -618,10 +613,10 @@ return; } - var decorationWidth = appWindow.outerBounds.width - - appWindow.innerBounds.width; - var decorationHeight = appWindow.outerBounds.height - - appWindow.innerBounds.height; + var decorationWidth = + appWindow.outerBounds.width - appWindow.innerBounds.width; + var decorationHeight = + appWindow.outerBounds.height - appWindow.innerBounds.height; var outerWidth = INNER_WIDTH + decorationWidth; var outerHeight = INNER_HEIGHT + decorationHeight; @@ -639,20 +634,19 @@ appWindow.outerBounds.width = outerWidth; appWindow.outerBounds.height = outerHeight; appWindow.outerBounds.left = Math.ceil((screen.availWidth - outerWidth) / 2); - appWindow.outerBounds.top = - Math.ceil((screen.availHeight - outerHeight) / 2); + appWindow.outerBounds.top = Math.ceil((screen.availHeight - outerHeight) / 2); } chrome.app.runtime.onLaunched.addListener(function() { var onAppContentLoad = function() { var doc = appWindow.contentWindow.document; lsoView = doc.getElementById('arc-support'); - lsoView.addContentScripts([ - { name: 'postProcess', - matches: ['https://accounts.google.com/*'], - css: { files: ['lso.css'] }, - run_at: 'document_end' - }]); + lsoView.addContentScripts([{ + name: 'postProcess', + matches: ['https://accounts.google.com/*'], + css: {files: ['lso.css']}, + run_at: 'document_end' + }]); var isApprovalResponse = function(url) { var resultUrlPrefix = 'https://accounts.google.com/o/oauth2/approval?'; @@ -696,17 +690,13 @@ sendNativeMessage('onAuthSucceeded', {code: authCode}); } else { sendNativeMessage('onAuthFailed'); - showErrorPage( - appWindow.contentWindow.loadTimeData.getString( - 'authorizationFailed')); + showErrorPage(appWindow.contentWindow.loadTimeData.getString( + 'authorizationFailed')); } }); }; - var requestFilter = { - urls: ['<all_urls>'], - types: ['main_frame'] - }; + var requestFilter = {urls: ['<all_urls>'], types: ['main_frame']}; lsoView.request.onResponseStarted.addListener( onLsoViewRequestResponseStarted, requestFilter); @@ -726,8 +716,8 @@ doc.getElementById('button-send-feedback') .addEventListener('click', onSendFeedback); doc.getElementById('overlay-close').addEventListener('click', hideOverlay); - doc.getElementById('privacy-policy-link').addEventListener( - 'click', showPrivacyPolicyOverlay); + doc.getElementById('privacy-policy-link') + .addEventListener('click', showPrivacyPolicyOverlay); var overlay = doc.getElementById('overlay-container'); appWindow.contentWindow.cr.ui.overlay.setupOverlay(overlay); @@ -762,14 +752,8 @@ 'id': 'play_store_wnd', 'resizable': false, 'hidden': true, - 'frame': { - type: 'chrome', - color: '#ffffff' - }, - 'innerBounds': { - 'width': INNER_WIDTH, - 'height': INNER_HEIGHT - } + 'frame': {type: 'chrome', color: '#ffffff'}, + 'innerBounds': {'width': INNER_WIDTH, 'height': INNER_HEIGHT} }; chrome.app.window.create('main.html', options, onWindowCreated); });
diff --git a/chrome/browser/resources/chromeos/arc_support/playstore.js b/chrome/browser/resources/chromeos/arc_support/playstore.js index 0593461..a0d052dd 100644 --- a/chrome/browser/resources/chromeos/arc_support/playstore.js +++ b/chrome/browser/resources/chromeos/arc_support/playstore.js
@@ -13,16 +13,16 @@ */ function processLangZoneTerms() { var doc = document; - var selectLangZoneTerms = doc.getElementById('play-footer'). - getElementsByTagName('select')[0]; + var selectLangZoneTerms = + doc.getElementById('play-footer').getElementsByTagName('select')[0]; - var initialLoad = window.location.href == - 'https://play.google.com/about/play-terms.html'; + var initialLoad = + window.location.href == 'https://play.google.com/about/play-terms.html'; var langSegments = navigator.language.split('-'); if (initialLoad) { var applyTermsForLangAndZone = function(termsLang) { - var matchByLangZone = '/intl/' + termsLang + '_' + - document.countryCode + '/about/play-terms.html'; + var matchByLangZone = '/intl/' + termsLang + '_' + document.countryCode + + '/about/play-terms.html'; for (var i = selectLangZoneTerms.options.length - 1; i >= 0; --i) { var option = selectLangZoneTerms.options[i]; if (option.value == matchByLangZone) { @@ -39,8 +39,7 @@ if (applyTermsForLangAndZone(navigator.language)) { return; } - if (langSegments.length == 2 && - applyTermsForLangAndZone(langSegments[0])) { + if (langSegments.length == 2 && applyTermsForLangAndZone(langSegments[0])) { return; } }
diff --git a/chrome/browser/resources/chromeos/bluetooth_options.js b/chrome/browser/resources/chromeos/bluetooth_options.js index 150592aa..556f544 100644 --- a/chrome/browser/resources/chromeos/bluetooth_options.js +++ b/chrome/browser/resources/chromeos/bluetooth_options.js
@@ -21,11 +21,8 @@ __proto__: Page.prototype, }; - BluetoothOptions.updateDiscovery = function() { - }; + BluetoothOptions.updateDiscovery = function() {}; // Export - return { - BluetoothOptions: BluetoothOptions - }; + return {BluetoothOptions: BluetoothOptions}; });
diff --git a/chrome/browser/resources/chromeos/bluetooth_pair_device.js b/chrome/browser/resources/chromeos/bluetooth_pair_device.js index c476037..9c9eaf7 100644 --- a/chrome/browser/resources/chromeos/bluetooth_pair_device.js +++ b/chrome/browser/resources/chromeos/bluetooth_pair_device.js
@@ -32,9 +32,7 @@ PageManager.closeOverlay(); }; - return { - BluetoothOptions: BluetoothOptions - }; + return {BluetoothOptions: BluetoothOptions}; }); /**
diff --git a/chrome/browser/resources/chromeos/braille_ime/braille_ime.js b/chrome/browser/resources/chromeos/braille_ime/braille_ime.js index c9125744..7e4d342 100644 --- a/chrome/browser/resources/chromeos/braille_ime/braille_ime.js +++ b/chrome/browser/resources/chromeos/braille_ime/braille_ime.js
@@ -120,10 +120,15 @@ * @private * @const {Object<number>} */ - CODE_TO_DOT_: {'KeyF': 0x01, 'KeyJ': 0x08, - 'KeyD': 0x02, 'KeyK': 0x10, - 'KeyS': 0x04, 'KeyL': 0x20, - 'Space': 0x100 }, + CODE_TO_DOT_: { + 'KeyF': 0x01, + 'KeyJ': 0x08, + 'KeyD': 0x02, + 'KeyK': 0x10, + 'KeyS': 0x04, + 'KeyL': 0x20, + 'Space': 0x100 + }, /** * The current engine ID as set by {@code onActivate}, or the empty string if @@ -157,8 +162,8 @@ chrome.input.ime.onBlur.addListener(this.onBlur_.bind(this)); chrome.input.ime.onInputContextUpdate.addListener( this.onInputContextUpdate_.bind(this)); - chrome.input.ime.onKeyEvent.addListener(this.onKeyEvent_.bind(this), - ['async']); + chrome.input.ime.onKeyEvent.addListener( + this.onKeyEvent_.bind(this), ['async']); chrome.input.ime.onReset.addListener(this.onReset_.bind(this)); chrome.input.ime.onMenuItemActivated.addListener( this.onMenuItemActivated_.bind(this)); @@ -298,8 +303,7 @@ if (event.code === 'Backspace' && event.type === 'keydown') { this.pressed_ = 0; this.accumulated_ = 0; - this.sendToChromeVox_( - {type: 'backspace', requestId: event.requestId}); + this.sendToChromeVox_({type: 'backspace', requestId: event.requestId}); return undefined; } var dot = this.CODE_TO_DOT_[event.code]; @@ -344,10 +348,8 @@ } this.port_ = chrome.runtime.connect( this.CHROMEVOX_EXTENSION_ID_, {name: this.PORT_NAME}); - this.port_.onMessage.addListener( - this.onChromeVoxMessage_.bind(this)); - this.port_.onDisconnect.addListener( - this.onChromeVoxDisconnect_.bind(this)); + this.port_.onMessage.addListener(this.onChromeVoxMessage_.bind(this)); + this.port_.onDisconnect.addListener(this.onChromeVoxDisconnect_.bind(this)); }, /** @@ -366,8 +368,8 @@ * newText: string}} */ (message); - this.replaceText_(message.contextID, message.deleteBefore, - message.newText); + this.replaceText_( + message.contextID, message.deleteBefore, message.newText); break; case 'keyEventHandled': message = @@ -385,8 +387,8 @@ this.commitUncommitted_(message.contextID); break; default: - console.error('Unknown message from ChromeVox: ' + - JSON.stringify(message)); + console.error( + 'Unknown message from ChromeVox: ' + JSON.stringify(message)); break; } }, @@ -426,8 +428,8 @@ * @private */ sendActiveState_: function() { - this.sendToChromeVox_({type: 'activeState', - active: this.engineID_.length > 0}); + this.sendToChromeVox_( + {type: 'activeState', active: this.engineID_.length > 0}); }, /** @@ -442,14 +444,24 @@ var addText = chrome.input.ime.commitText.bind( null, {contextID: contextID, text: toInsert}, function() {}); if (deleteBefore > 0) { - var deleteText = chrome.input.ime.deleteSurroundingText.bind(null, - {engineID: this.engineID_, contextID: contextID, - offset: -deleteBefore, length: deleteBefore}, addText); + var deleteText = chrome.input.ime.deleteSurroundingText.bind( + null, { + engineID: this.engineID_, + contextID: contextID, + offset: -deleteBefore, + length: deleteBefore + }, + addText); // Make sure there's no non-zero length selection so that // deleteSurroundingText works correctly. chrome.input.ime.deleteSurroundingText( - {engineID: this.engineID_, contextID: contextID, - offset: 0, length: 0}, deleteText); + { + engineID: this.engineID_, + contextID: contextID, + offset: 0, + length: 0 + }, + deleteText); } else { addText(); } @@ -496,18 +508,16 @@ */ updateMenuItems_: function() { // TODO(plundblad): Localize when translations available. - chrome.input.ime.setMenuItems( - {engineID: this.engineID_, - items: [ - { - id: this.USE_STANDARD_KEYBOARD_ID, - label: 'Use standard keyboard for braille', - style: 'check', - visible: true, - checked: this.useStandardKeyboard_, - enabled: true - } - ] - }); + chrome.input.ime.setMenuItems({ + engineID: this.engineID_, + items: [{ + id: this.USE_STANDARD_KEYBOARD_ID, + label: 'Use standard keyboard for braille', + style: 'check', + visible: true, + checked: this.useStandardKeyboard_, + enabled: true + }] + }); } };
diff --git a/chrome/browser/resources/chromeos/browser_options.js b/chrome/browser/resources/chromeos/browser_options.js index dd4a1ee..2ca4dff 100644 --- a/chrome/browser/resources/chromeos/browser_options.js +++ b/chrome/browser/resources/chromeos/browser_options.js
@@ -28,7 +28,5 @@ }; // Export - return { - BrowserOptions: BrowserOptions - }; + return {BrowserOptions: BrowserOptions}; });
diff --git a/chrome/browser/resources/chromeos/certificate_manager_dialog.js b/chrome/browser/resources/chromeos/certificate_manager_dialog.js index ed35f86f..7043be3 100644 --- a/chrome/browser/resources/chromeos/certificate_manager_dialog.js +++ b/chrome/browser/resources/chromeos/certificate_manager_dialog.js
@@ -31,8 +31,8 @@ for (var i = 0; i < containers.length; i++) { var overlay = containers[i]; cr.ui.overlay.setupOverlay(overlay); - overlay.addEventListener('cancelOverlay', - PageManager.cancelOverlay.bind(PageManager)); + overlay.addEventListener( + 'cancelOverlay', PageManager.cancelOverlay.bind(PageManager)); } // Hide elements that should not be part of the dialog. @@ -42,16 +42,19 @@ PageManager.isDialog = true; CertificateManager.getInstance().setIsKiosk(true); CertificateManager.getInstance().initializePage(); - PageManager.registerOverlay(AlertOverlay.getInstance(), + PageManager.registerOverlay( + AlertOverlay.getInstance(), CertificateManager.getInstance()); + PageManager.registerOverlay( + CertificateBackupOverlay.getInstance(), CertificateManager.getInstance()); + PageManager.registerOverlay( + CertificateEditCaTrustOverlay.getInstance(), CertificateManager.getInstance()); - PageManager.registerOverlay(CertificateBackupOverlay.getInstance(), - CertificateManager.getInstance()); - PageManager.registerOverlay(CertificateEditCaTrustOverlay.getInstance(), - CertificateManager.getInstance()); - PageManager.registerOverlay(CertificateImportErrorOverlay.getInstance(), + PageManager.registerOverlay( + CertificateImportErrorOverlay.getInstance(), CertificateManager.getInstance()); PageManager.registerOverlay(CertificateManager.getInstance()); - PageManager.registerOverlay(CertificateRestoreOverlay.getInstance(), + PageManager.registerOverlay( + CertificateRestoreOverlay.getInstance(), CertificateManager.getInstance()); PageManager.showPageByName('certificates', false); @@ -60,8 +63,7 @@ disableTextSelectAndDrag(function(e) { var src = e.target; return src instanceof HTMLTextAreaElement || - src instanceof HTMLInputElement && - /text|url/.test(src.type); + src instanceof HTMLInputElement && /text|url/.test(src.type); }); document.addEventListener('DOMContentLoaded', load);
diff --git a/chrome/browser/resources/chromeos/choose_mobile_network.js b/chrome/browser/resources/chromeos/choose_mobile_network.js index 7181c07..d1b5346 100644 --- a/chrome/browser/resources/chromeos/choose_mobile_network.js +++ b/chrome/browser/resources/chromeos/choose_mobile_network.js
@@ -4,8 +4,7 @@ cr.define('mobile', function() { - function ChooseNetwork() { - } + function ChooseNetwork() {} cr.addSingletonGetter(ChooseNetwork); @@ -25,8 +24,8 @@ container.innerHTML = ''; for (var i in networks) { var elem = document.createElement('div'); - elem.innerHTML = - '<input type="radio" name="network" id="network' + i + '" />' + + elem.innerHTML = '<input type="radio" name="network" id="network' + i + + '" />' + '<label for="network' + i + '" id="label' + i + '"></label>'; container.appendChild(elem); $('label' + i).textContent = networks[i].operatorName; @@ -96,9 +95,7 @@ }; // Export - return { - ChooseNetwork: ChooseNetwork - }; + return {ChooseNetwork: ChooseNetwork}; }); var ChooseNetwork = mobile.ChooseNetwork;
diff --git a/chrome/browser/resources/chromeos/cryptohome.js b/chrome/browser/resources/chromeos/cryptohome.js index 40b1720..af1f2f4 100644 --- a/chrome/browser/resources/chromeos/cryptohome.js +++ b/chrome/browser/resources/chromeos/cryptohome.js
@@ -21,6 +21,8 @@ if (interval > 0) { $('refresh-message').textContent = '(Auto-refreshing page every ' + interval + 's)'; - setTimeout(function() { window.location.reload(true); }, interval * 1000); + setTimeout(function() { + window.location.reload(true); + }, interval * 1000); } });
diff --git a/chrome/browser/resources/chromeos/drive_internals.js b/chrome/browser/resources/chromeos/drive_internals.js index ac124cb..4646160 100644 --- a/chrome/browser/resources/chromeos/drive_internals.js +++ b/chrome/browser/resources/chromeos/drive_internals.js
@@ -12,8 +12,9 @@ var mb = Math.floor(bytes / (1 << 20)); return mb.toString().replace( /\d+?(?=(\d{3})+$)/g, // Digit sequence (\d+) followed (?=) by 3n digits. - function(three_digit_block) { return three_digit_block + ','; } - ); + function(three_digit_block) { + return three_digit_block + ','; + }); } /** @@ -191,8 +192,7 @@ function updateLocalMetadata(localMetadata) { var changestamp = localMetadata['account-largest-changestamp-local']; - $('account-largest-changestamp-local').textContent = - changestamp.toString() + + $('account-largest-changestamp-local').textContent = changestamp.toString() + (changestamp > 0 ? ' (loaded)' : ' (not loaded)') + (localMetadata['account-metadata-refreshing'] ? ' (refreshing)' : ''); } @@ -203,11 +203,11 @@ */ function updateDeltaUpdateStatus(deltaUpdateStatus) { $('push-notification-enabled').textContent = - deltaUpdateStatus['push-notification-enabled']; + deltaUpdateStatus['push-notification-enabled']; $('last-update-check-time').textContent = - deltaUpdateStatus['last-update-check-time']; + deltaUpdateStatus['last-update-check-time']; $('last-update-check-error').textContent = - deltaUpdateStatus['last-update-check-error']; + deltaUpdateStatus['last-update-check-error']; } /**
diff --git a/chrome/browser/resources/chromeos/emulator/audio_settings.js b/chrome/browser/resources/chromeos/emulator/audio_settings.js index d64a4cf..08ef9c2 100644 --- a/chrome/browser/resources/chromeos/emulator/audio_settings.js +++ b/chrome/browser/resources/chromeos/emulator/audio_settings.js
@@ -58,7 +58,9 @@ */ currentEditableObject: { type: Object, - value: function() { return {}; } + value: function() { + return {}; + } }, /** @@ -66,20 +68,35 @@ * This is initially set to -1 (i.e. no node selected) becuase no devices * have been copied. */ - currentEditIndex: {type: Number, value: function() { return -1; }}, + currentEditIndex: { + type: Number, + value: function() { + return -1; + } + }, /** * A counter that will auto increment everytime a new node is added * or copied and used to set a new id. This allows the |AudioNode.id| * to allows be unique. */ - nodeCount: {type: Number, value: function() { return 0; }}, + nodeCount: { + type: Number, + value: function() { + return 0; + } + }, /** * A set of audio nodes. * @type !Array<!AudioNode> */ - nodes: {type: Array, value: function() { return []; }}, + nodes: { + type: Array, + value: function() { + return []; + } + }, /** * A set of options for the possible audio node types.
diff --git a/chrome/browser/resources/chromeos/emulator/battery_settings.js b/chrome/browser/resources/chromeos/emulator/battery_settings.js index 8487802f..39e3d3a 100644 --- a/chrome/browser/resources/chromeos/emulator/battery_settings.js +++ b/chrome/browser/resources/chromeos/emulator/battery_settings.js
@@ -28,8 +28,9 @@ */ batteryStateOptions: { type: Array, - value: function() { return ['Full', 'Charging', 'Discharging', - 'Not Present']; }, + value: function() { + return ['Full', 'Charging', 'Discharging', 'Not Present']; + }, }, /** @@ -43,22 +44,72 @@ type: Array, value: function() { return [ - {id: '0', name: 'AC Charger 1', type: 'DedicatedCharger', - port: 0, connected: false, power: 'high'}, - {id: '1', name: 'AC Charger 2', type: 'DedicatedCharger', - port: 0, connected: false, power: 'high'}, - {id: '2', name: 'USB Charger 1', type: 'DedicatedCharger', - port: 0, connected: false, power: 'low', variablePower: true}, - {id: '3', name: 'USB Charger 2', type: 'DedicatedCharger', - port: 0, connected: false, power: 'low', variablePower: true}, - {id: '4', name: 'Dual-role USB 1', type: 'DualRoleUSB', - port: 0, connected: false, power: 'low'}, - {id: '5', name: 'Dual-role USB 2', type: 'DualRoleUSB', - port: 1, connected: false, power: 'low'}, - {id: '6', name: 'Dual-role USB 3', type: 'DualRoleUSB', - port: 2, connected: false, power: 'low'}, - {id: '7', name: 'Dual-role USB 4', type: 'DualRoleUSB', - port: 3, connected: false, power: 'low'}, + { + id: '0', + name: 'AC Charger 1', + type: 'DedicatedCharger', + port: 0, + connected: false, + power: 'high' + }, + { + id: '1', + name: 'AC Charger 2', + type: 'DedicatedCharger', + port: 0, + connected: false, + power: 'high' + }, + { + id: '2', + name: 'USB Charger 1', + type: 'DedicatedCharger', + port: 0, + connected: false, + power: 'low', + variablePower: true + }, + { + id: '3', + name: 'USB Charger 2', + type: 'DedicatedCharger', + port: 0, + connected: false, + power: 'low', + variablePower: true + }, + { + id: '4', + name: 'Dual-role USB 1', + type: 'DualRoleUSB', + port: 0, + connected: false, + power: 'low' + }, + { + id: '5', + name: 'Dual-role USB 2', + type: 'DualRoleUSB', + port: 1, + connected: false, + power: 'low' + }, + { + id: '6', + name: 'Dual-role USB 3', + type: 'DualRoleUSB', + port: 2, + connected: false, + power: 'low' + }, + { + id: '7', + name: 'Dual-role USB 4', + type: 'DualRoleUSB', + port: 3, + connected: false, + power: 'low' + }, ]; }, },
diff --git a/chrome/browser/resources/chromeos/emulator/bluetooth_settings.js b/chrome/browser/resources/chromeos/emulator/bluetooth_settings.js index a8a5b055..aa04e9e3 100644 --- a/chrome/browser/resources/chromeos/emulator/bluetooth_settings.js +++ b/chrome/browser/resources/chromeos/emulator/bluetooth_settings.js
@@ -61,13 +61,23 @@ * A set of bluetooth devices. * @type !Array<!BluetoothDevice> */ - devices: {type: Array, value: function() { return []; }}, + devices: { + type: Array, + value: function() { + return []; + } + }, /** * A set of predefined bluetooth devices. * @type !Array<!Bluetooth> */ - predefinedDevices: {type: Array, value: function() { return []; }}, + predefinedDevices: { + type: Array, + value: function() { + return []; + } + }, /** * A bluetooth device object which is currently being edited. @@ -75,7 +85,9 @@ */ currentEditableObject: { type: Object, - value: function() { return {}; } + value: function() { + return {}; + } }, /** @@ -83,7 +95,12 @@ * This is initially set to -1 (i.e. no device selected) because not custom * devices exist when the page loads. */ - currentEditIndex: {type: Number, value: function() { return -1; }}, + currentEditIndex: { + type: Number, + value: function() { + return -1; + } + }, /** * A set of options for the possible bluetooth device classes/types. @@ -95,12 +112,9 @@ type: Array, value: function() { return [ - {text: 'Unknown', value: 0}, - {text: 'Mouse', value: 0x2580}, - {text: 'Keyboard', value: 0x2540}, - {text: 'Audio', value: 0x240408}, - {text: 'Phone', value: 0x7a020c}, - {text: 'Computer', value: 0x104} + {text: 'Unknown', value: 0}, {text: 'Mouse', value: 0x2580}, + {text: 'Keyboard', value: 0x2540}, {text: 'Audio', value: 0x240408}, + {text: 'Phone', value: 0x7a020c}, {text: 'Computer', value: 0x104} ]; } }, @@ -112,7 +126,9 @@ */ deviceAuthenticationMethods: { type: Array, - value: function() { return []; } + value: function() { + return []; + } }, /** @@ -122,7 +138,9 @@ */ deviceAuthenticationActions: { type: Array, - value: function() { return []; } + value: function() { + return []; + } }, }, @@ -149,8 +167,9 @@ currentEditableObjectChanged: function(obj) { if (this.currentEditIndex >= 0) { var prop = obj.path.split('.')[1]; - this.set('devices.' + this.currentEditIndex.toString() + '.' + prop, - obj.value); + this.set( + 'devices.' + this.currentEditIndex.toString() + '.' + prop, + obj.value); } }, @@ -270,8 +289,9 @@ * to the main adapter. * @param {!Array<!BluetoothDevice>} devices A list of bluetooth devices. */ - updateBluetoothInfo: function(predefinedDevices, loadedCustomDevices, - pairingMethodOptions, pairingActionOptions) { + updateBluetoothInfo: function( + predefinedDevices, loadedCustomDevices, pairingMethodOptions, + pairingActionOptions) { this.predefinedDevices = this.loadDevicesFromList(predefinedDevices, true); this.devices = this.loadDevicesFromList(loadedCustomDevices, false); this.deviceAuthenticationMethods = pairingMethodOptions; @@ -288,7 +308,8 @@ /** @type {!Array<!BluetoothDevice>} */ var deviceList = []; for (var i = 0; i < devices.length; ++i) { - if (this.devicePaths[devices[i].path] != undefined) continue; + if (this.devicePaths[devices[i].path] != undefined) + continue; // Get the label for the device class which should be selected. devices[i].class = this.getTextForDeviceClass(devices[i].classValue); @@ -310,7 +331,8 @@ devicePairedFromTray: function(path) { var obj = this.devicePaths[path]; - if (obj == undefined) return; + if (obj == undefined) + return; var index = obj.index; var devicePath = (obj.predefined ? 'predefinedDevices.' : 'devices.'); @@ -359,7 +381,8 @@ pairFailed: function(path) { var obj = this.devicePaths[path]; - if (obj == undefined) return; + if (obj == undefined) + return; var devicePath = (obj.predefined ? 'predefinedDevices.' : 'devices.'); devicePath += obj.index.toString(); @@ -482,7 +505,8 @@ * @param {string} path A bluetooth device's path. */ deviceRemovedFromMainAdapter: function(path) { - if (this.devicePaths[path] == undefined) return; + if (this.devicePaths[path] == undefined) + return; var obj = this.devicePaths[path]; var devicePath = (obj.predefined ? 'predefinedDevices.' : 'devices.');
diff --git a/chrome/browser/resources/chromeos/first_run/app/background.js b/chrome/browser/resources/chromeos/first_run/app/background.js index 5d1ba84..8e40e34 100644 --- a/chrome/browser/resources/chromeos/first_run/app/background.js +++ b/chrome/browser/resources/chromeos/first_run/app/background.js
@@ -3,11 +3,13 @@ // found in the LICENSE file. chrome.app.runtime.onLaunched.addListener(function() { - chrome.app.window.create('main.html', { - 'frame': 'none', - 'resizable': false, - 'hidden': true, - }, function(appWindow) { - appWindow.contentWindow.appWindow = appWindow; - }); + chrome.app.window.create( + 'main.html', { + 'frame': 'none', + 'resizable': false, + 'hidden': true, + }, + function(appWindow) { + appWindow.contentWindow.appWindow = appWindow; + }); });
diff --git a/chrome/browser/resources/chromeos/first_run/first_run.js b/chrome/browser/resources/chromeos/first_run/first_run.js index e22c495..4598b43 100644 --- a/chrome/browser/resources/chromeos/first_run/first_run.js +++ b/chrome/browser/resources/chromeos/first_run/first_run.js
@@ -30,7 +30,8 @@ return; } var transitionDuration = (opt_transitionDuration === undefined) ? - cr.FirstRun.getDefaultTransitionDuration() : opt_transitionDuration; + cr.FirstRun.getDefaultTransitionDuration() : + opt_transitionDuration; var style = element.style; var oldDurationValue = style.getPropertyValue('transition-duration'); style.setProperty('transition-duration', transitionDuration + 'ms'); @@ -170,8 +171,8 @@ */ removeHoles: function(opt_onHolesRemoved) { var mask = this.mask_; - var holes = Array.prototype.slice.call( - mask.getElementsByClassName('hole')); + var holes = + Array.prototype.slice.call(mask.getElementsByClassName('hole')); var holesLeft = holes.length; if (!holesLeft) { if (opt_onHolesRemoved) @@ -179,8 +180,8 @@ return; } holes.forEach(function(hole) { - changeVisibility(hole, false, this.getDefaultTransitionDuration(), - function() { + changeVisibility( + hole, false, this.getDefaultTransitionDuration(), function() { mask.removeChild(hole); --holesLeft; if (!holesLeft && opt_onHolesRemoved) @@ -251,7 +252,8 @@ * changed. */ setBackgroundVisible: function(visible, opt_onCompletion) { - changeVisibility(this.backgroundContainer_, visible, + changeVisibility( + this.backgroundContainer_, visible, this.getBackgroundTransitionDuration(), opt_onCompletion); },
diff --git a/chrome/browser/resources/chromeos/first_run/step.js b/chrome/browser/resources/chromeos/first_run/step.js index 213ea27..5ef856b4 100644 --- a/chrome/browser/resources/chromeos/first_run/step.js +++ b/chrome/browser/resources/chromeos/first_run/step.js
@@ -25,15 +25,16 @@ this.name_ = this.getAttribute('id'); var controlsContainer = this.getElementsByClassName('controls')[0]; if (!controlsContainer) - throw Error('Controls not found.'); + throw Error('Controls not found.'); this.nextButton_ = controlsContainer.getElementsByClassName('next-button')[0]; if (!this.nextButton_) throw Error('Next button not found.'); - this.nextButton_.addEventListener('click', (function(e) { - chrome.send('nextButtonClicked', [this.getName()]); - e.stopPropagation(); - }).bind(this)); + this.nextButton_.addEventListener( + 'click', (function(e) { + chrome.send('nextButtonClicked', [this.getName()]); + e.stopPropagation(); + }).bind(this)); this.defaultControl_ = controlsContainer.children[0]; }, @@ -52,14 +53,11 @@ hide: function(animated, opt_onHidden) { var transitionDuration = animated ? cr.FirstRun.getDefaultTransitionDuration() : 0; - changeVisibility(this, - false, - transitionDuration, - function() { - this.classList.add('hidden'); - if (opt_onHidden) - opt_onHidden(); - }.bind(this)); + changeVisibility(this, false, transitionDuration, function() { + this.classList.add('hidden'); + if (opt_onHidden) + opt_onHidden(); + }.bind(this)); }, /** @@ -71,13 +69,10 @@ var transitionDuration = animated ? cr.FirstRun.getDefaultTransitionDuration() : 0; this.classList.remove('hidden'); - changeVisibility(this, - true, - transitionDuration, - function() { - if (opt_onShown) - opt_onShown(this); - }.bind(this)); + changeVisibility(this, true, transitionDuration, function() { + if (opt_onShown) + opt_onShown(this); + }.bind(this)); }, /** @@ -112,55 +107,26 @@ // '*' wildcard. The last suitable rule in list is choosen for arrow style. var ARROW_POSITION = { 'app-list': [ - { - position: ['points-down', 'left'] - }, - { - dir: 'rtl', - position: ['points-down', 'right'] - }, - { - shelf: 'left', - position: ['points-left', 'top'] - }, - { - shelf: 'right', - position: ['points-right', 'top'] - } + {position: ['points-down', 'left']}, + {dir: 'rtl', position: ['points-down', 'right']}, + {shelf: 'left', position: ['points-left', 'top']}, + {shelf: 'right', position: ['points-right', 'top']} ], 'tray': [ - { - position: ['points-right', 'top'] - }, - { - dir: 'rtl', - shelf: 'bottom', - position: ['points-left', 'top'] - }, - { - shelf: 'left', - position: ['points-left', 'top'] - } + {position: ['points-right', 'top']}, + {dir: 'rtl', shelf: 'bottom', position: ['points-left', 'top']}, + {shelf: 'left', position: ['points-left', 'top']} ], 'help': [ - { - position: ['points-right', 'bottom'] - }, - { - dir: 'rtl', - shelf: 'bottom', - position: ['points-left', 'bottom'] - }, - { - shelf: 'left', - position: ['points-left', 'bottom'] - } + {position: ['points-right', 'bottom']}, + {dir: 'rtl', shelf: 'bottom', position: ['points-left', 'bottom']}, + {shelf: 'left', position: ['points-left', 'bottom']} ] }; var DISTANCE_TO_POINTEE = 10; var MINIMAL_SCREEN_OFFSET = 10; - var ARROW_LENGTH = 6; // Keep synced with .arrow border-width. + var ARROW_LENGTH = 6; // Keep synced with .arrow border-width. Bubble.prototype = { __proto__: Step.prototype, @@ -183,10 +149,10 @@ var inputDirection = document.documentElement.getAttribute('dir'); var shelfAlignment = document.documentElement.getAttribute('shelf'); var isSuitable = function(rule) { - var inputDirectionMatch = !rule.hasOwnProperty('dir') || - rule.dir === inputDirection; - var shelfAlignmentMatch = !rule.hasOwnProperty('shelf') || - rule.shelf === shelfAlignment; + var inputDirectionMatch = + !rule.hasOwnProperty('dir') || rule.dir === inputDirection; + var shelfAlignmentMatch = + !rule.hasOwnProperty('shelf') || rule.shelf === shelfAlignment; return inputDirectionMatch && shelfAlignmentMatch; }; var lastSuitableRule = null; @@ -206,7 +172,7 @@ this.direction_ = [1, 0]; else if (list.contains('points-down')) this.direction_ = [0, 1]; - else // list.contains('points-left') + else // list.contains('points-left') this.direction_ = [-1, 0]; }, @@ -224,8 +190,10 @@ this.style.setProperty('opacity', '0'); this.show(false); } - var arrow = [this.arrow_.offsetLeft + this.arrow_.offsetWidth / 2, - this.arrow_.offsetTop + this.arrow_.offsetHeight / 2]; + var arrow = [ + this.arrow_.offsetLeft + this.arrow_.offsetWidth / 2, + this.arrow_.offsetTop + this.arrow_.offsetHeight / 2 + ]; var totalOffset = DISTANCE_TO_POINTEE + offset; var left = point[0] - totalOffset * this.direction_[0] - arrow[0]; var top = point[1] - totalOffset * this.direction_[1] - arrow[1]; @@ -233,14 +201,18 @@ if (this.arrow_.classList.contains('points-up') || this.arrow_.classList.contains('points-down')) { left = Math.max(left, MINIMAL_SCREEN_OFFSET); - left = Math.min(left, document.body.offsetWidth - this.offsetWidth - - MINIMAL_SCREEN_OFFSET); + left = Math.min( + left, + document.body.offsetWidth - this.offsetWidth - + MINIMAL_SCREEN_OFFSET); } if (this.arrow_.classList.contains('points-left') || this.arrow_.classList.contains('points-right')) { top = Math.max(top, MINIMAL_SCREEN_OFFSET); - top = Math.min(top, document.body.offsetHeight - this.offsetHeight - - MINIMAL_SCREEN_OFFSET); + top = Math.min( + top, + document.body.offsetHeight - this.offsetHeight - + MINIMAL_SCREEN_OFFSET); } this.style.setProperty('left', left + 'px'); this.style.setProperty('top', top + 'px'); @@ -259,15 +231,14 @@ setPosition: function(position) { var arrow = this.arrow_; // Increasing offset if it's from side where bubble points to. - [['top', 'points-up'], - ['right', 'points-right'], - ['bottom', 'points-down'], - ['left', 'points-left']].forEach(function(mapping) { - if (position.hasOwnProperty(mapping[0]) && - arrow.classList.contains(mapping[1])) { - position[mapping[0]] += ARROW_LENGTH + DISTANCE_TO_POINTEE; - } - }); + [['top', 'points-up'], ['right', 'points-right'], + ['bottom', 'points-down'], ['left', 'points-left']] + .forEach(function(mapping) { + if (position.hasOwnProperty(mapping[0]) && + arrow.classList.contains(mapping[1])) { + position[mapping[0]] += ARROW_LENGTH + DISTANCE_TO_POINTEE; + } + }); Step.prototype.setPosition.call(this, position); }, };
diff --git a/chrome/browser/resources/chromeos/keyboard/keyboard_utils.js b/chrome/browser/resources/chromeos/keyboard/keyboard_utils.js index 2048f1a6..a113250 100644 --- a/chrome/browser/resources/chromeos/keyboard/keyboard_utils.js +++ b/chrome/browser/resources/chromeos/keyboard/keyboard_utils.js
@@ -28,8 +28,7 @@ * @private */ keyboard.onInitMessage_ = function(event) { - if (event.data == 'initialMessage' && - event.origin == 'chrome://oobe') { + if (event.data == 'initialMessage' && event.origin == 'chrome://oobe') { keyboardHostWindow = event.source; keyboardHostOrigin = event.origin; } @@ -50,15 +49,13 @@ * @private */ keyboard.onKeyIgnore_ = function(event) { - event = /** @type {!KeyboardEvent} */(event); + event = /** @type {!KeyboardEvent} */ (event); if (event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) return; - if (event.key == 'ArrowLeft' || - event.key == 'ArrowRight' || - event.key == 'ArrowUp' || - event.key == 'ArrowDown') { + if (event.key == 'ArrowLeft' || event.key == 'ArrowRight' || + event.key == 'ArrowUp' || event.key == 'ArrowDown') { event.stopPropagation(); event.preventDefault(); } @@ -70,7 +67,7 @@ * @private */ keyboard.onKeyDown_ = function(event) { - event = /** @type {!KeyboardEvent} */(event); + event = /** @type {!KeyboardEvent} */ (event); if (event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) return; @@ -130,12 +127,9 @@ * @param {boolean} injected true if script runs as an injected content script. */ keyboard.initializeKeyboardFlow = function(injected) { - document.addEventListener('keydown', - keyboard.onKeyDown_, true); - document.addEventListener('keypress', - keyboard.onKeyIgnore_, true); - document.addEventListener('keyup', - keyboard.onKeyIgnore_, true); + document.addEventListener('keydown', keyboard.onKeyDown_, true); + document.addEventListener('keypress', keyboard.onKeyIgnore_, true); + document.addEventListener('keyup', keyboard.onKeyIgnore_, true); if (injected) window.addEventListener('message', keyboard.onInitMessage_); };
diff --git a/chrome/browser/resources/chromeos/keyboard_overlay.js b/chrome/browser/resources/chromeos/keyboard_overlay.js index e420718..1766ac7 100644 --- a/chrome/browser/resources/chromeos/keyboard_overlay.js +++ b/chrome/browser/resources/chromeos/keyboard_overlay.js
@@ -4,19 +4,9 @@ // <include src="keyboard_overlay_data.js"> -var BASE_KEYBOARD = { - top: 0, - left: 0, - width: 1237, - height: 514 -}; +var BASE_KEYBOARD = {top: 0, left: 0, width: 1237, height: 514}; -var BASE_INSTRUCTIONS = { - top: 194, - left: 370, - width: 498, - height: 142 -}; +var BASE_INSTRUCTIONS = {top: 194, left: 370, width: 498, height: 142}; var MODIFIER_TO_CLASS = { 'SHIFT': 'modifier-shift', @@ -120,16 +110,16 @@ * keys, their labels should change as well. */ var TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL = { - 'back' : 'f1', - 'forward' : 'f2', - 'reload' : 'f3', - 'full screen' : 'f4', - 'switch window' : 'f5', - 'bright down' : 'f6', - 'bright up' : 'f7', - 'mute' : 'f8', - 'vol. down' : 'f9', - 'vol. up' : 'f10', + 'back': 'f1', + 'forward': 'f2', + 'reload': 'f3', + 'full screen': 'f4', + 'switch window': 'f5', + 'bright down': 'f6', + 'bright up': 'f7', + 'mute': 'f8', + 'vol. down': 'f9', + 'vol. up': 'f10', }; /** @@ -137,46 +127,46 @@ * These labels should be localized. (crbug.com/471025). */ var LABEL_TO_LOCALIZED_LABEL_ID = { - 'esc' : 'keyboardOverlayEscKeyLabel', - 'back' : 'keyboardOverlayBackKeyLabel', - 'forward' : 'keyboardOverlayForwardKeyLabel', - 'reload' : 'keyboardOverlayReloadKeyLabel', - 'full screen' : 'keyboardOverlayFullScreenKeyLabel', - 'switch window' : 'keyboardOverlaySwitchWinKeyLabel', - 'bright down' : 'keyboardOverlayBrightDownKeyLabel', - 'bright up' : 'keyboardOverlayBrightUpKeyLabel', - 'mute' : 'keyboardOverlayMuteKeyLabel', - 'vol. down' : 'keyboardOverlayVolDownKeyLabel', - 'vol. up' : 'keyboardOverlayVolUpKeyLabel', - 'power' : 'keyboardOverlayPowerKeyLabel', - 'backspace' : 'keyboardOverlayBackspaceKeyLabel', - 'tab' : 'keyboardOverlayTabKeyLabel', - 'search' : 'keyboardOverlaySearchKeyLabel', - 'enter' : 'keyboardOverlayEnterKeyLabel', - 'shift' : 'keyboardOverlayShiftKeyLabel', - 'ctrl' : 'keyboardOverlayCtrlKeyLabel', - 'alt' : 'keyboardOverlayAltKeyLabel', - 'left' : 'keyboardOverlayLeftKeyLabel', - 'right' : 'keyboardOverlayRightKeyLabel', - 'up' : 'keyboardOverlayUpKeyLabel', - 'down' : 'keyboardOverlayDownKeyLabel', - 'f1' : 'keyboardOverlayF1', - 'f2' : 'keyboardOverlayF2', - 'f3' : 'keyboardOverlayF3', - 'f4' : 'keyboardOverlayF4', - 'f5' : 'keyboardOverlayF5', - 'f6' : 'keyboardOverlayF6', - 'f7' : 'keyboardOverlayF7', - 'f8' : 'keyboardOverlayF8', - 'f9' : 'keyboardOverlayF9', - 'f10' : 'keyboardOverlayF10', + 'esc': 'keyboardOverlayEscKeyLabel', + 'back': 'keyboardOverlayBackKeyLabel', + 'forward': 'keyboardOverlayForwardKeyLabel', + 'reload': 'keyboardOverlayReloadKeyLabel', + 'full screen': 'keyboardOverlayFullScreenKeyLabel', + 'switch window': 'keyboardOverlaySwitchWinKeyLabel', + 'bright down': 'keyboardOverlayBrightDownKeyLabel', + 'bright up': 'keyboardOverlayBrightUpKeyLabel', + 'mute': 'keyboardOverlayMuteKeyLabel', + 'vol. down': 'keyboardOverlayVolDownKeyLabel', + 'vol. up': 'keyboardOverlayVolUpKeyLabel', + 'power': 'keyboardOverlayPowerKeyLabel', + 'backspace': 'keyboardOverlayBackspaceKeyLabel', + 'tab': 'keyboardOverlayTabKeyLabel', + 'search': 'keyboardOverlaySearchKeyLabel', + 'enter': 'keyboardOverlayEnterKeyLabel', + 'shift': 'keyboardOverlayShiftKeyLabel', + 'ctrl': 'keyboardOverlayCtrlKeyLabel', + 'alt': 'keyboardOverlayAltKeyLabel', + 'left': 'keyboardOverlayLeftKeyLabel', + 'right': 'keyboardOverlayRightKeyLabel', + 'up': 'keyboardOverlayUpKeyLabel', + 'down': 'keyboardOverlayDownKeyLabel', + 'f1': 'keyboardOverlayF1', + 'f2': 'keyboardOverlayF2', + 'f3': 'keyboardOverlayF3', + 'f4': 'keyboardOverlayF4', + 'f5': 'keyboardOverlayF5', + 'f6': 'keyboardOverlayF6', + 'f7': 'keyboardOverlayF7', + 'f8': 'keyboardOverlayF8', + 'f9': 'keyboardOverlayF9', + 'f10': 'keyboardOverlayF10', }; var COMPOUND_ENTER_KEY_DATA = [815, 107, 60, 120]; var COMPOUND_ENTER_KEY_CLIP_PATH = - 'polygon(0% 0%, 100% 0%, 100% 100%, 28% 100%, 28% 47%, 0% 47%)'; + 'polygon(0% 0%, 100% 0%, 100% 100%, 28% 100%, 28% 47%, 0% 47%)'; var COMPOUND_ENTER_KEY_OVERLAY_DIV_CLIP_PATH = - 'polygon(12% 0%, 100% 0%, 100% 97%, 12% 97%)'; + 'polygon(12% 0%, 100% 0%, 100% 97%, 12% 97%)'; var IME_ID_PREFIX = '_comp_ime_'; var EXTENSION_ID_LEN = 32; @@ -277,8 +267,9 @@ result += String.fromCharCode(n); } else if (n <= 0x10FFFF) { n -= 0x10000; - result += (String.fromCharCode(0xD800 | (n >> 10)) + - String.fromCharCode(0xDC00 | (n & 0x3FF))); + result += + (String.fromCharCode(0xD800 | (n >> 10)) + + String.fromCharCode(0xDC00 | (n & 0x3FF))); } else { console.error('hex2Char error: Code point out of range :' + hex); } @@ -351,11 +342,15 @@ } // make the result array - return result = ['L_SHIFT', 'R_SHIFT', 'L_CTRL', 'R_CTRL', 'L_ALT', 'R_ALT', - 'SEARCH'].filter( - function(modifier) { - return isPressed[modifier]; - }).sort(); + return result = + [ + 'L_SHIFT', 'R_SHIFT', 'L_CTRL', 'R_CTRL', 'L_ALT', 'R_ALT', + 'SEARCH' + ] + .filter(function(modifier) { + return isPressed[modifier]; + }) + .sort(); } /** @@ -473,7 +468,7 @@ keyLabel = hex2char(pos); if (!keyLabel) { continue; - } + } if (isAscii(keyLabel) && getShortcutData()[getAction(keyLabel, modifiers)]) { break; @@ -529,10 +524,10 @@ // function-keys label (i.e. mute --> f8), and then use that label to get // a localized one. var topRowKeyAsFunctionLabel = - TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL[labelToBeLocalized]; + TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL[labelToBeLocalized]; labelToBeLocalized = - topRowKeyAsFunctionLabel ? topRowKeyAsFunctionLabel : keyData.label; + topRowKeyAsFunctionLabel ? topRowKeyAsFunctionLabel : keyData.label; } localizedLabelId = LABEL_TO_LOCALIZED_LABEL_ID[labelToBeLocalized]; @@ -569,8 +564,7 @@ var classes = getKeyClasses(identifier, modifiers, normModifiers); var keyLabel = getKeyLabel(keyData, normModifiers); var shortcutId = shortcutData[getAction(keyLabel, normModifiers)]; - if (modifiers.length == 0 && - (identifier == '2A' || identifier == '36')) { + if (modifiers.length == 0 && (identifier == '2A' || identifier == '36')) { // Either the right or left shift keys are used to disable the caps lock // if it was enabled. To fix crbug.com/453623. shortcutId = 'keyboardOverlayDisableCapsLock'; @@ -598,9 +592,9 @@ var keyText = $(keyTextId(identifier, i)); var keyTextValue = getKeyTextValue(keyData); if (keyTextValue) { - keyText.style.visibility = 'visible'; + keyText.style.visibility = 'visible'; } else { - keyText.style.visibility = 'hidden'; + keyText.style.visibility = 'hidden'; } keyText.textContent = keyTextValue; @@ -614,7 +608,7 @@ if (layout[i][1] == 'COMPOUND_ENTER_KEY') { var overlayDivClasses = - getKeyClasses(identifier, modifiers, normModifiers); + getKeyClasses(identifier, modifiers, normModifiers); if (shortcutId) overlayDivClasses.push('is-shortcut'); $(keyId(identifier, i) + '-sub').className = overlayDivClasses.join(' '); @@ -787,7 +781,7 @@ overlayDiv.style.width = overlayDivW + 'px'; overlayDiv.style.height = overlayDivH + 'px'; overlayDiv.style.webkitClipPath = - COMPOUND_ENTER_KEY_OVERLAY_DIV_CLIP_PATH; + COMPOUND_ENTER_KEY_OVERLAY_DIV_CLIP_PATH; keyboard.appendChild(overlayDiv); } @@ -805,13 +799,17 @@ keyboard.style.height = (height + 2 * (minY + 1)) + 'px'; instructions.style.left = ((BASE_INSTRUCTIONS.left - BASE_KEYBOARD.left) * - width / BASE_KEYBOARD.width + minX) + 'px'; + width / BASE_KEYBOARD.width + + minX) + + 'px'; instructions.style.top = ((BASE_INSTRUCTIONS.top - BASE_KEYBOARD.top) * - height / BASE_KEYBOARD.height + minY) + 'px'; - instructions.style.width = (width * BASE_INSTRUCTIONS.width / - BASE_KEYBOARD.width) + 'px'; - instructions.style.height = (height * BASE_INSTRUCTIONS.height / - BASE_KEYBOARD.height) + 'px'; + height / BASE_KEYBOARD.height + + minY) + + 'px'; + instructions.style.width = + (width * BASE_INSTRUCTIONS.width / BASE_KEYBOARD.width) + 'px'; + instructions.style.height = + (height * BASE_INSTRUCTIONS.height / BASE_KEYBOARD.height) + 'px'; } /** @@ -836,12 +834,12 @@ */ function initDiamondKey() { var newLayoutData = { - '1D': [65.0, 287.0, 60.0, 60.0], // left Ctrl - '38': [185.0, 287.0, 60.0, 60.0], // left Alt + '1D': [65.0, 287.0, 60.0, 60.0], // left Ctrl + '38': [185.0, 287.0, 60.0, 60.0], // left Alt 'E0 5B': [125.0, 287.0, 60.0, 60.0], // search - '3A': [5.0, 167.0, 105.0, 60.0], // caps lock - '5B': [803.0, 6.0, 72.0, 35.0], // lock key - '5D': [5.0, 287.0, 60.0, 60.0] // diamond key + '3A': [5.0, 167.0, 105.0, 60.0], // caps lock + '5B': [803.0, 6.0, 72.0, 35.0], // lock key + '5D': [5.0, 287.0, 60.0, 60.0] // diamond key }; var layout = getLayout(); @@ -891,10 +889,8 @@ function initIdentifierMap(remap) { for (var key in remap) { var val = remap[key]; - if ((key in LABEL_TO_IDENTIFIER) && - (val in LABEL_TO_IDENTIFIER)) { - identifierMap[LABEL_TO_IDENTIFIER[key]] = - LABEL_TO_IDENTIFIER[val]; + if ((key in LABEL_TO_IDENTIFIER) && (val in LABEL_TO_IDENTIFIER)) { + identifierMap[LABEL_TO_IDENTIFIER[key]] = LABEL_TO_IDENTIFIER[val]; } else { console.error('Invalid label map element: ' + key + ', ' + val); } @@ -918,8 +914,8 @@ // If the input method is a component extension IME, remove the prefix: // _comp_ime_<ext_id> // The extension id is a hash value with 32 characters. - inputMethodId = inputMethodId.slice( - IME_ID_PREFIX.length + EXTENSION_ID_LEN); + inputMethodId = + inputMethodId.slice(IME_ID_PREFIX.length + EXTENSION_ID_LEN); } keyboardOverlayId = inputMethodIdToOverlayId[inputMethodId]; }
diff --git a/chrome/browser/resources/chromeos/keyboard_overlay_data.js b/chrome/browser/resources/chromeos/keyboard_overlay_data.js index 98a36c7..45c95e5f 100644 --- a/chrome/browser/resources/chromeos/keyboard_overlay_data.js +++ b/chrome/browser/resources/chromeos/keyboard_overlay_data.js
@@ -85,15674 +85,4027 @@ 'keyboardGlyph': { 'ar': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31', - 'p9': '661' - }, - '03': { - 'p1': '40', - 'p7': '32', - 'p9': '662' - }, - '04': { - 'p1': '23', - 'p7': '33', - 'p9': '663' - }, - '05': { - 'p1': '24', - 'p7': '34', - 'p9': '664' - }, - '06': { - 'p1': '66A', - 'p7': '35', - 'p9': '665' - }, - '07': { - 'p1': '5E', - 'p7': '36', - 'p9': '666' - }, - '08': { - 'p1': '26', - 'p7': '37', - 'p9': '667' - }, - '09': { - 'p1': '66D', - 'p7': '38', - 'p9': '668' - }, - '0A': { - 'p1': '28', - 'p7': '39', - 'p9': '669' - }, - '0B': { - 'p1': '29', - 'p7': '30', - 'p9': '660' - }, - '0C': { - 'p1': '5F', - 'p7': '2D' - }, - '0D': { - 'p1': '2B', - 'p7': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p3': '064E', - 'p7': '71', - 'p9': 'FEBF' - }, - '11': { - 'p3': '064B', - 'p7': '77', - 'p9': 'FEBB' - }, - '12': { - 'p3': '064F', - 'p7': '65', - 'p9': 'FE9B' - }, - '13': { - 'p3': '064C', - 'p7': '72', - 'p9': 'FED7' - }, - '14': { - 'p3': 'FEF9', - 'p7': '74', - 'p9': 'FED3' - }, - '15': { - 'p3': 'FE87', - 'p7': '79', - 'p9': 'FECF' - }, - '16': { - 'p3': '60', - 'p7': '75', - 'p9': 'FECB' - }, - '17': { - 'p3': 'F7', - 'p7': '69', - 'p9': 'FEEB' - }, - '18': { - 'p3': 'D7', - 'p7': '6F', - 'p9': 'FEA7' - }, - '19': { - 'p3': '61B', - 'p7': '70', - 'p9': 'FEA3' - }, - '1A': { - 'p3': '3C', - 'p9': 'FE9F' - }, - '1B': { - 'p3': '3E', - 'p9': 'FEA9' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p3': '650', - 'p7': '61', - 'p9': 'FEB7' - }, - '1F': { - 'p3': '064D', - 'p7': '73', - 'p9': 'FEB3' - }, - '20': { - 'p3': '005B', - 'p7': '64', - 'p9': 'FEF3' - }, - '21': { - 'p3': '005D', - 'p7': '66', - 'p9': 'FE91' - }, - '22': { - 'p3': 'FEF7', - 'p7': '67', - 'p9': 'FEDF' - }, - '23': { - 'p3': 'FE83', - 'p7': '68', - 'p9': 'FE8D' - }, - '24': { - 'p3': '640', - 'p7': '6A', - 'p9': 'FE97' - }, - '25': { - 'p3': '060C', - 'p7': '6B', - 'p9': 'FEE7' - }, - '26': { - 'p3': '002F', - 'p7': '6C', - 'p9': 'FEE3' - }, - '27': { - 'p3': '003A', - 'p9': 'FEDB' - }, - '28': { - 'p3': '22', - 'p9': 'FEC3' - }, - '29': { - 'p1': '007E', - 'p3': 'FE7C', - 'p7': '60', - 'p9': 'FEAB' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '007c', - 'p7': '005c' - }, - '2C': { - 'p3': '007E', - 'p7': '7A', - 'p9': 'FE8B' - }, - '2D': { - 'p3': 'FE7E', - 'p7': '78', - 'p9': 'FE80' - }, - '2E': { - 'p3': '007B', - 'p7': '63', - 'p9': 'FE85' - }, - '2F': { - 'p3': '007D', - 'p7': '76', - 'p9': 'FEAD' - }, - '30': { - 'p3': 'FEF5', - 'p7': '62', - 'p9': 'FEFB' - }, - '31': { - 'p3': 'FE81', - 'p7': '6E', - 'p9': 'FEEF' - }, - '32': { - 'p3': '27', - 'p7': '6D', - 'p9': 'FE93' - }, - '33': { - 'p3': '002C', - 'p9': 'FEED' - }, - '34': { - 'p3': '002E', - 'p9': 'FEAF' - }, - '35': { - 'p3': '61F', - 'p9': 'FEC7' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31', 'p9': '661'}, + '03': {'p1': '40', 'p7': '32', 'p9': '662'}, + '04': {'p1': '23', 'p7': '33', 'p9': '663'}, + '05': {'p1': '24', 'p7': '34', 'p9': '664'}, + '06': {'p1': '66A', 'p7': '35', 'p9': '665'}, + '07': {'p1': '5E', 'p7': '36', 'p9': '666'}, + '08': {'p1': '26', 'p7': '37', 'p9': '667'}, + '09': {'p1': '66D', 'p7': '38', 'p9': '668'}, + '0A': {'p1': '28', 'p7': '39', 'p9': '669'}, + '0B': {'p1': '29', 'p7': '30', 'p9': '660'}, + '0C': {'p1': '5F', 'p7': '2D'}, + '0D': {'p1': '2B', 'p7': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p3': '064E', 'p7': '71', 'p9': 'FEBF'}, + '11': {'p3': '064B', 'p7': '77', 'p9': 'FEBB'}, + '12': {'p3': '064F', 'p7': '65', 'p9': 'FE9B'}, + '13': {'p3': '064C', 'p7': '72', 'p9': 'FED7'}, + '14': {'p3': 'FEF9', 'p7': '74', 'p9': 'FED3'}, + '15': {'p3': 'FE87', 'p7': '79', 'p9': 'FECF'}, + '16': {'p3': '60', 'p7': '75', 'p9': 'FECB'}, + '17': {'p3': 'F7', 'p7': '69', 'p9': 'FEEB'}, + '18': {'p3': 'D7', 'p7': '6F', 'p9': 'FEA7'}, + '19': {'p3': '61B', 'p7': '70', 'p9': 'FEA3'}, + '1A': {'p3': '3C', 'p9': 'FE9F'}, + '1B': {'p3': '3E', 'p9': 'FEA9'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p3': '650', 'p7': '61', 'p9': 'FEB7'}, + '1F': {'p3': '064D', 'p7': '73', 'p9': 'FEB3'}, + '20': {'p3': '005B', 'p7': '64', 'p9': 'FEF3'}, + '21': {'p3': '005D', 'p7': '66', 'p9': 'FE91'}, + '22': {'p3': 'FEF7', 'p7': '67', 'p9': 'FEDF'}, + '23': {'p3': 'FE83', 'p7': '68', 'p9': 'FE8D'}, + '24': {'p3': '640', 'p7': '6A', 'p9': 'FE97'}, + '25': {'p3': '060C', 'p7': '6B', 'p9': 'FEE7'}, + '26': {'p3': '002F', 'p7': '6C', 'p9': 'FEE3'}, + '27': {'p3': '003A', 'p9': 'FEDB'}, + '28': {'p3': '22', 'p9': 'FEC3'}, + '29': {'p1': '007E', 'p3': 'FE7C', 'p7': '60', 'p9': 'FEAB'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '007c', 'p7': '005c'}, + '2C': {'p3': '007E', 'p7': '7A', 'p9': 'FE8B'}, + '2D': {'p3': 'FE7E', 'p7': '78', 'p9': 'FE80'}, + '2E': {'p3': '007B', 'p7': '63', 'p9': 'FE85'}, + '2F': {'p3': '007D', 'p7': '76', 'p9': 'FEAD'}, + '30': {'p3': 'FEF5', 'p7': '62', 'p9': 'FEFB'}, + '31': {'p3': 'FE81', 'p7': '6E', 'p9': 'FEEF'}, + '32': {'p3': '27', 'p7': '6D', 'p9': 'FE93'}, + '33': {'p3': '002C', 'p9': 'FEED'}, + '34': {'p3': '002E', 'p9': 'FEAF'}, + '35': {'p3': '61F', 'p9': 'FEC7'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'bg': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '40', - 'p3': '003f', - 'p7': '32' - }, - '04': { - 'p1': '23', - 'p3': '002b', - 'p7': '33' - }, - '05': { - 'p1': '24', - 'p3': '22', - 'p7': '34' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '5e', - 'p3': '003d', - 'p7': '36' - }, - '08': { - 'p1': '26', - 'p3': '003a', - 'p7': '37' - }, - '09': { - 'p1': '2a', - 'p3': '002f', - 'p7': '38' - }, - '0A': { - 'p1': '28', - 'p3': '005f', - 'p7': '39' - }, - '0B': { - 'p1': '29', - 'p3': '2116', - 'p7': '30' - }, - '0C': { - 'p1': '5f', - 'p3': '49', - 'p7': '002d' - }, - '0D': { - 'p1': '2b', - 'p3': '56', - 'p7': '3d', - 'p9': '002e' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p1': '71', - 'p3': '44b', - 'p9': '2c' - }, - '11': { - 'p1': '77', - 'p9': '443' - }, - '12': { - 'p1': '65', - 'p9': '435' - }, - '13': { - 'p1': '72', - 'p9': '438' - }, - '14': { - 'p1': '74', - 'p9': '448' - }, - '15': { - 'p1': '79', - 'p9': '449' - }, - '16': { - 'p1': '75', - 'p9': '43a' - }, - '17': { - 'p1': '69', - 'p9': '441' - }, - '18': { - 'p1': '6f', - 'p9': '434' - }, - '19': { - 'p1': '70', - 'p9': '437' - }, - '1A': { - 'p1': '7b', - 'p7': '5b', - 'p9': '446' - }, - '1B': { - 'p1': '7d', - 'p3': 'a7', - 'p7': '5d', - 'p9': '3b' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p1': '61', - 'p9': '44c' - }, - '1F': { - 'p1': '73', - 'p9': '44f' - }, - '20': { - 'p1': '64', - 'p9': '430' - }, - '21': { - 'p1': '66', - 'p9': '43e' - }, - '22': { - 'p1': '67', - 'p9': '436' - }, - '23': { - 'p1': '68', - 'p9': '433' - }, - '24': { - 'p1': '6a', - 'p9': '442' - }, - '25': { - 'p1': '6b', - 'p9': '43d' - }, - '26': { - 'p1': '6c', - 'p9': '432' - }, - '27': { - 'p1': '3a', - 'p7': '3b', - 'p9': '43c' - }, - '28': { - 'p1': '201E', - 'p7': '27', - 'p9': '447' - }, - '29': { - 'p1': '007e', - 'p7': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '7c', - 'p3': '29', - 'p7': '5c', - 'p9': '28' - }, - '2C': { - 'p1': '7a', - 'p9': '44e' - }, - '2D': { - 'p1': '78', - 'p9': '439' - }, - '2E': { - 'p1': '63', - 'p9': '44a' - }, - '2F': { - 'p1': '76', - 'p9': '44d' - }, - '30': { - 'p1': '62', - 'p9': '444' - }, - '31': { - 'p1': '6e', - 'p9': '445' - }, - '32': { - 'p1': '6d', - 'p9': '43f' - }, - '33': { - 'p1': '3c', - 'p7': '2c', - 'p9': '440' - }, - '34': { - 'p1': '3e', - 'p7': '2e', - 'p9': '43b' - }, - '35': { - 'p1': '3f', - 'p7': '2f', - 'p9': '431' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '40', 'p3': '003f', 'p7': '32'}, + '04': {'p1': '23', 'p3': '002b', 'p7': '33'}, + '05': {'p1': '24', 'p3': '22', 'p7': '34'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '5e', 'p3': '003d', 'p7': '36'}, + '08': {'p1': '26', 'p3': '003a', 'p7': '37'}, + '09': {'p1': '2a', 'p3': '002f', 'p7': '38'}, + '0A': {'p1': '28', 'p3': '005f', 'p7': '39'}, + '0B': {'p1': '29', 'p3': '2116', 'p7': '30'}, + '0C': {'p1': '5f', 'p3': '49', 'p7': '002d'}, + '0D': {'p1': '2b', 'p3': '56', 'p7': '3d', 'p9': '002e'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p1': '71', 'p3': '44b', 'p9': '2c'}, + '11': {'p1': '77', 'p9': '443'}, + '12': {'p1': '65', 'p9': '435'}, + '13': {'p1': '72', 'p9': '438'}, + '14': {'p1': '74', 'p9': '448'}, + '15': {'p1': '79', 'p9': '449'}, + '16': {'p1': '75', 'p9': '43a'}, + '17': {'p1': '69', 'p9': '441'}, + '18': {'p1': '6f', 'p9': '434'}, + '19': {'p1': '70', 'p9': '437'}, + '1A': {'p1': '7b', 'p7': '5b', 'p9': '446'}, + '1B': {'p1': '7d', 'p3': 'a7', 'p7': '5d', 'p9': '3b'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p1': '61', 'p9': '44c'}, + '1F': {'p1': '73', 'p9': '44f'}, + '20': {'p1': '64', 'p9': '430'}, + '21': {'p1': '66', 'p9': '43e'}, + '22': {'p1': '67', 'p9': '436'}, + '23': {'p1': '68', 'p9': '433'}, + '24': {'p1': '6a', 'p9': '442'}, + '25': {'p1': '6b', 'p9': '43d'}, + '26': {'p1': '6c', 'p9': '432'}, + '27': {'p1': '3a', 'p7': '3b', 'p9': '43c'}, + '28': {'p1': '201E', 'p7': '27', 'p9': '447'}, + '29': {'p1': '007e', 'p7': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '7c', 'p3': '29', 'p7': '5c', 'p9': '28'}, + '2C': {'p1': '7a', 'p9': '44e'}, + '2D': {'p1': '78', 'p9': '439'}, + '2E': {'p1': '63', 'p9': '44a'}, + '2F': {'p1': '76', 'p9': '44d'}, + '30': {'p1': '62', 'p9': '444'}, + '31': {'p1': '6e', 'p9': '445'}, + '32': {'p1': '6d', 'p9': '43f'}, + '33': {'p1': '3c', 'p7': '2c', 'p9': '440'}, + '34': {'p1': '3e', 'p7': '2e', 'p9': '43b'}, + '35': {'p1': '3f', 'p7': '2f', 'p9': '431'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'ca': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '007C' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '00B7', - 'p8': '33', - 'p9': '23' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '007E' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36', - 'p9': '00AC' - }, - '08': { - 'p2': '002F', - 'p8': '37' - }, - '09': { - 'p2': '28', - 'p8': '38' - }, - '0A': { - 'p2': '29', - 'p8': '39' - }, - '0B': { - 'p2': '003D', - 'p8': '30' - }, - '0C': { - 'p2': '003F', - 'p8': '27' - }, - '0D': { - 'p2': '00BF', - 'p8': '00A1' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '005E', - 'p8': '60', - 'p9': '005B' - }, - '1B': { - 'p2': '002A', - 'p8': '002B', - 'p9': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F1' - }, - '28': { - 'p2': '00A8', - 'p8': '00B4', - 'p9': '007B' - }, - '29': { - 'p2': '00AA', - 'p8': '00BA', - 'p9': '005C' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '00C7', - 'p8': 'E7', - 'p9': '007D' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31', 'p9': '007C'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '00B7', 'p8': '33', 'p9': '23'}, + '05': {'p2': '24', 'p8': '34', 'p9': '007E'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36', 'p9': '00AC'}, + '08': {'p2': '002F', 'p8': '37'}, + '09': {'p2': '28', 'p8': '38'}, + '0A': {'p2': '29', 'p8': '39'}, + '0B': {'p2': '003D', 'p8': '30'}, + '0C': {'p2': '003F', 'p8': '27'}, + '0D': {'p2': '00BF', 'p8': '00A1'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p2': '005E', 'p8': '60', 'p9': '005B'}, + '1B': {'p2': '002A', 'p8': '002B', 'p9': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F1'}, + '28': {'p2': '00A8', 'p8': '00B4', 'p9': '007B'}, + '29': {'p2': '00AA', 'p8': '00BA', 'p9': '005C'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '00C7', 'p8': 'E7', 'p9': '007D'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'cs': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p3': '31', - 'p7': '31', - 'p9': '002b' - }, - '03': { - 'p1': '40', - 'p3': '32', - 'p7': '32', - 'p9': '011B' - }, - '04': { - 'p1': '23', - 'p3': '33', - 'p7': '33', - 'p9': '161' - }, - '05': { - 'p1': '24', - 'p3': '34', - 'p7': '34', - 'p9': '010d' - }, - '06': { - 'p1': '25', - 'p3': '35', - 'p7': '35', - 'p9': '159' - }, - '07': { - 'p1': '5e', - 'p3': '36', - 'p7': '36', - 'p9': '017e' - }, - '08': { - 'p1': '26', - 'p3': '37', - 'p7': '37', - 'p9': 'fd' - }, - '09': { - 'p1': '2a', - 'p3': '38', - 'p7': '38', - 'p9': 'e1' - }, - '0A': { - 'p1': '28', - 'p3': '39', - 'p7': '39', - 'p9': 'ed' - }, - '0B': { - 'p1': '29', - 'p3': '30', - 'p7': '30', - 'p9': 'e9' - }, - '0C': { - 'p1': '5f', - 'p3': '25', - 'p7': '2d', - 'p9': '3d' - }, - '0D': { - 'p1': '2b', - 'p3': '2c7', - 'p7': '3d', - 'p9': 'b4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20ac' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '7A', - 'p9': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p1': '7b', - 'p3': '002f', - 'p7': '5b', - 'p9': 'fa' - }, - '1B': { - 'p1': '7d', - 'p3': '28', - 'p7': '5d', - 'p9': '29' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p1': '3a', - 'p3': '22', - 'p7': '3b', - 'p9': '16f' - }, - '28': { - 'p1': '22', - 'p3': '21', - 'p7': '27', - 'p9': 'a7' - }, - '29': { - 'p1': '7e', - 'p3': 'b0', - 'p7': '60', - 'p9': '3b' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '007c', - 'p3': '27', - 'p7': '5c', - 'p9': 'a8' - }, - '2C': { - 'p5': '79', - 'p9': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p1': '3c', - 'p3': '3f', - 'p7': '2c', - 'p9': '2c' - }, - '34': { - 'p1': '3e', - 'p3': '3a', - 'p7': '2e', - 'p9': '2e' - }, - '35': { - 'p1': '3f', - 'p3': '5f', - 'p7': '2f', - 'p9': '2d' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p1': '7c', - 'p3': '2a', - 'p7': '5c', - 'p9': '26' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p3': '31', 'p7': '31', 'p9': '002b'}, + '03': {'p1': '40', 'p3': '32', 'p7': '32', 'p9': '011B'}, + '04': {'p1': '23', 'p3': '33', 'p7': '33', 'p9': '161'}, + '05': {'p1': '24', 'p3': '34', 'p7': '34', 'p9': '010d'}, + '06': {'p1': '25', 'p3': '35', 'p7': '35', 'p9': '159'}, + '07': {'p1': '5e', 'p3': '36', 'p7': '36', 'p9': '017e'}, + '08': {'p1': '26', 'p3': '37', 'p7': '37', 'p9': 'fd'}, + '09': {'p1': '2a', 'p3': '38', 'p7': '38', 'p9': 'e1'}, + '0A': {'p1': '28', 'p3': '39', 'p7': '39', 'p9': 'ed'}, + '0B': {'p1': '29', 'p3': '30', 'p7': '30', 'p9': 'e9'}, + '0C': {'p1': '5f', 'p3': '25', 'p7': '2d', 'p9': '3d'}, + '0D': {'p1': '2b', 'p3': '2c7', 'p7': '3d', 'p9': 'b4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20ac'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '7A', 'p9': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p1': '7b', 'p3': '002f', 'p7': '5b', 'p9': 'fa'}, + '1B': {'p1': '7d', 'p3': '28', 'p7': '5d', 'p9': '29'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p1': '3a', 'p3': '22', 'p7': '3b', 'p9': '16f'}, + '28': {'p1': '22', 'p3': '21', 'p7': '27', 'p9': 'a7'}, + '29': {'p1': '7e', 'p3': 'b0', 'p7': '60', 'p9': '3b'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '007c', 'p3': '27', 'p7': '5c', 'p9': 'a8'}, + '2C': {'p5': '79', 'p9': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p1': '3c', 'p3': '3f', 'p7': '2c', 'p9': '2c'}, + '34': {'p1': '3e', 'p3': '3a', 'p7': '2e', 'p9': '2e'}, + '35': {'p1': '3f', 'p3': '5f', 'p7': '2f', 'p9': '2d'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p1': '7c', 'p3': '2a', 'p7': '5c', 'p9': '26'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'da': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '22', - 'p7': '32', - 'p9': '40' - }, - '04': { - 'p1': '23', - 'p7': '33', - 'p9': '00A3' - }, - '05': { - 'p1': '00A4', - 'p7': '34', - 'p9': '24' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '26', - 'p7': '36' - }, - '08': { - 'p1': '002F', - 'p7': '37', - 'p9': '007B' - }, - '09': { - 'p1': '28', - 'p7': '38', - 'p9': '005B' - }, - '0A': { - 'p1': '29', - 'p7': '39', - 'p9': '005D' - }, - '0B': { - 'p1': '003D', - 'p7': '30', - 'p9': '007D' - }, - '0C': { - 'p1': '003F', - 'p7': '002B' - }, - '0D': { - 'p1': '60', - 'p7': '00B4', - 'p9': '007C' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': 'E5' - }, - '1B': { - 'p1': '005E', - 'p7': '00A8', - 'p9': '007E' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': 'E6' - }, - '28': { - 'p5': '00F8' - }, - '29': { - 'p1': '00A7', - 'p7': '00BD' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '002A', - 'p7': '27' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p1': '003B', - 'p7': '002C' - }, - '34': { - 'p1': '003A', - 'p7': '002E' - }, - '35': { - 'p1': '005F', - 'p7': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p1': '003E', - 'p7': '003C', - 'p9': '005C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '22', 'p7': '32', 'p9': '40'}, + '04': {'p1': '23', 'p7': '33', 'p9': '00A3'}, + '05': {'p1': '00A4', 'p7': '34', 'p9': '24'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '26', 'p7': '36'}, + '08': {'p1': '002F', 'p7': '37', 'p9': '007B'}, + '09': {'p1': '28', 'p7': '38', 'p9': '005B'}, + '0A': {'p1': '29', 'p7': '39', 'p9': '005D'}, + '0B': {'p1': '003D', 'p7': '30', 'p9': '007D'}, + '0C': {'p1': '003F', 'p7': '002B'}, + '0D': {'p1': '60', 'p7': '00B4', 'p9': '007C'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': 'E5'}, + '1B': {'p1': '005E', 'p7': '00A8', 'p9': '007E'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': 'E6'}, + '28': {'p5': '00F8'}, + '29': {'p1': '00A7', 'p7': '00BD'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '002A', 'p7': '27'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p1': '003B', 'p7': '002C'}, + '34': {'p1': '003A', 'p7': '002E'}, + '35': {'p1': '005F', 'p7': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p1': '003E', 'p7': '003C', 'p9': '005C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'de': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '00B2' - }, - '04': { - 'p2': '00A7', - 'p8': '33', - 'p9': '00B3' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '002F', - 'p8': '37', - 'p9': '007B' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '005B' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '005D' - }, - '0B': { - 'p2': '3D', - 'p8': '30', - 'p9': '7D' - }, - '0C': { - 'p2': '3F', - 'p8': 'DF', - 'p9': '5C' - }, - '0D': { - 'p2': '60', - 'p8': 'B4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '40' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '007A' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '00FC' - }, - '1B': { - 'p2': '2A', - 'p8': '2B', - 'p9': '7E' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'strg' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F6' - }, - '28': { - 'p5': 'E4' - }, - '29': { - 'p2': '00B0', - 'p8': '005E' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '27', - 'p8': '23' - }, - '2C': { - 'p5': '79' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D', - 'p9': 'B5' - }, - '33': { - 'p2': '3B', - 'p8': '2C' - }, - '34': { - 'p2': '3A', - 'p8': '2E' - }, - '35': { - 'p2': '5F', - 'p8': '2D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3E', - 'p8': '3C', - 'p9': '7C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'strg' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32', 'p9': '00B2'}, + '04': {'p2': '00A7', 'p8': '33', 'p9': '00B3'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '002F', 'p8': '37', 'p9': '007B'}, + '09': {'p2': '28', 'p8': '38', 'p9': '005B'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '005D'}, + '0B': {'p2': '3D', 'p8': '30', 'p9': '7D'}, + '0C': {'p2': '3F', 'p8': 'DF', 'p9': '5C'}, + '0D': {'p2': '60', 'p8': 'B4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '40'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '007A'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': '00FC'}, + '1B': {'p2': '2A', 'p8': '2B', 'p9': '7E'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'strg'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F6'}, + '28': {'p5': 'E4'}, + '29': {'p2': '00B0', 'p8': '005E'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '27', 'p8': '23'}, + '2C': {'p5': '79'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D', 'p9': 'B5'}, + '33': {'p2': '3B', 'p8': '2C'}, + '34': {'p2': '3A', 'p8': '2E'}, + '35': {'p2': '5F', 'p8': '2D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3E', 'p8': '3C', 'p9': '7C'}, + 'E0 1D': {'format': 'smaller', 'label': 'strg'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'de_neo': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '00B0', - 'p8': '31', - 'p9': '00B9' - }, - '03': { - 'p2': '00A7', - 'p8': '32', - 'p9': '00B2' - }, - '04': { - 'p2': '2113', - 'p8': '33', - 'p9': '00B3' - }, - '05': { - 'p2': '00BB', - 'p8': '34', - 'p9': '203A' - }, - '06': { - 'p2': '00AB', - 'p8': '35', - 'p9': '2039' - }, - '07': { - 'p2': '24', - 'p8': '36', - 'p9': '00A2' - }, - '08': { - 'p2': '20AC', - 'p8': '37', - 'p9': '00A5' - }, - '09': { - 'p2': '201E', - 'p8': '38', - 'p9': '201A' - }, - '0A': { - 'p2': '201C', - 'p8': '39', - 'p9': '2018' - }, - '0B': { - 'p2': '201D', - 'p8': '30', - 'p9': '2019' - }, - '0C': { - 'p2': '2014', - 'p8': '2D' - }, - '0D': { - 'p2': '00B8', - 'p8': '02CB', - 'p9': '02DA' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '78', - 'p9': '2026' - }, - '11': { - 'p5': '76', - 'p9': '005F' - }, - '12': { - 'p5': '6C', - 'p9': '005B' - }, - '13': { - 'p5': '63', - 'p9': '005D' - }, - '14': { - 'p5': '77', - 'p9': '005E' - }, - '15': { - 'p5': '6B', - 'p9': '21' - }, - '16': { - 'p5': '68', - 'p9': '003C' - }, - '17': { - 'p5': '67', - 'p9': '003E' - }, - '18': { - 'p5': '66', - 'p9': '003D' - }, - '19': { - 'p5': '71', - 'p9': '26' - }, - '1A': { - 'p5': 'DF', - 'p9': '017F' - }, - '1B': { - 'p2': '02DC', - 'p8': '02CA', - 'p9': '002F' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'strg' - }, - '1E': { - 'p5': '75', - 'p9': '005C' - }, - '1F': { - 'p5': '69', - 'p9': '002F' - }, - '20': { - 'p5': '61', - 'p9': '007B' - }, - '21': { - 'p5': '65', - 'p9': '007D' - }, - '22': { - 'p5': '6F', - 'p9': '002A' - }, - '23': { - 'p5': '73', - 'p9': '003F' - }, - '24': { - 'p5': '6E', - 'p9': '28' - }, - '25': { - 'p5': '72', - 'p9': '29' - }, - '26': { - 'p5': '74', - 'p9': '002D' - }, - '27': { - 'p5': '64', - 'p9': '003A' - }, - '28': { - 'p5': '79', - 'p9': '40' - }, - '29': { - 'p2': '02C7', - 'p8': '02C6' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'label': 'mod3' - }, - '2C': { - 'p5': '00FC', - 'p9': '23' - }, - '2D': { - 'p5': '00F6', - 'p9': '24' - }, - '2E': { - 'p5': 'E4', - 'p9': '007C' - }, - '2F': { - 'p5': '70', - 'p9': '007E' - }, - '30': { - 'p5': '7a', - 'p9': '60' - }, - '31': { - 'p5': '62', - 'p9': '002B' - }, - '32': { - 'p5': '6D', - 'p9': '25' - }, - '33': { - 'p2': '2013', - 'p8': '2C', - 'p9': '22' - }, - '34': { - 'p2': '2022', - 'p8': '2E', - 'p9': '27' - }, - '35': { - 'p5': '6A', - 'p9': '003B' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'label': 'mod4' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'strg' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'mod4' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'mod3' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '00B0', 'p8': '31', 'p9': '00B9'}, + '03': {'p2': '00A7', 'p8': '32', 'p9': '00B2'}, + '04': {'p2': '2113', 'p8': '33', 'p9': '00B3'}, + '05': {'p2': '00BB', 'p8': '34', 'p9': '203A'}, + '06': {'p2': '00AB', 'p8': '35', 'p9': '2039'}, + '07': {'p2': '24', 'p8': '36', 'p9': '00A2'}, + '08': {'p2': '20AC', 'p8': '37', 'p9': '00A5'}, + '09': {'p2': '201E', 'p8': '38', 'p9': '201A'}, + '0A': {'p2': '201C', 'p8': '39', 'p9': '2018'}, + '0B': {'p2': '201D', 'p8': '30', 'p9': '2019'}, + '0C': {'p2': '2014', 'p8': '2D'}, + '0D': {'p2': '00B8', 'p8': '02CB', 'p9': '02DA'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '78', 'p9': '2026'}, + '11': {'p5': '76', 'p9': '005F'}, + '12': {'p5': '6C', 'p9': '005B'}, + '13': {'p5': '63', 'p9': '005D'}, + '14': {'p5': '77', 'p9': '005E'}, + '15': {'p5': '6B', 'p9': '21'}, + '16': {'p5': '68', 'p9': '003C'}, + '17': {'p5': '67', 'p9': '003E'}, + '18': {'p5': '66', 'p9': '003D'}, + '19': {'p5': '71', 'p9': '26'}, + '1A': {'p5': 'DF', 'p9': '017F'}, + '1B': {'p2': '02DC', 'p8': '02CA', 'p9': '002F'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'strg'}, + '1E': {'p5': '75', 'p9': '005C'}, + '1F': {'p5': '69', 'p9': '002F'}, + '20': {'p5': '61', 'p9': '007B'}, + '21': {'p5': '65', 'p9': '007D'}, + '22': {'p5': '6F', 'p9': '002A'}, + '23': {'p5': '73', 'p9': '003F'}, + '24': {'p5': '6E', 'p9': '28'}, + '25': {'p5': '72', 'p9': '29'}, + '26': {'p5': '74', 'p9': '002D'}, + '27': {'p5': '64', 'p9': '003A'}, + '28': {'p5': '79', 'p9': '40'}, + '29': {'p2': '02C7', 'p8': '02C6'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'label': 'mod3'}, + '2C': {'p5': '00FC', 'p9': '23'}, + '2D': {'p5': '00F6', 'p9': '24'}, + '2E': {'p5': 'E4', 'p9': '007C'}, + '2F': {'p5': '70', 'p9': '007E'}, + '30': {'p5': '7a', 'p9': '60'}, + '31': {'p5': '62', 'p9': '002B'}, + '32': {'p5': '6D', 'p9': '25'}, + '33': {'p2': '2013', 'p8': '2C', 'p9': '22'}, + '34': {'p2': '2022', 'p8': '2E', 'p9': '27'}, + '35': {'p5': '6A', 'p9': '003B'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'label': 'mod4'}, + 'E0 1D': {'format': 'smaller', 'label': 'strg'}, + 'E0 38': {'format': 'smaller', 'label': 'mod4'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'mod3'} }, 'layoutName': 'E' }, 'el': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'Esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '40', - 'p7': '32' - }, - '04': { - 'p1': '23', - 'p7': '33' - }, - '05': { - 'p1': '24', - 'p7': '34' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '005E', - 'p7': '36' - }, - '08': { - 'p1': '26', - 'p7': '37' - }, - '09': { - 'p1': '002A', - 'p7': '38' - }, - '0A': { - 'p1': '28', - 'p7': '39' - }, - '0B': { - 'p1': '29', - 'p7': '30' - }, - '0C': { - 'p1': '005F', - 'p7': '002D' - }, - '0D': { - 'p1': '002B', - 'p7': '003D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p1': '51', - 'p3': '3A', - 'p9': '3B' - }, - '11': { - 'p1': '57', - 'p9': '3C2' - }, - '12': { - 'p1': '45', - 'p9': '20AC' - }, - '13': { - 'p1': '52', - 'p9': '03A1' - }, - '14': { - 'p1': '54' - }, - '15': { - 'p1': '03A5' - }, - '16': { - 'p1': '55', - 'p9': '398' - }, - '17': { - 'p1': '399' - }, - '18': { - 'p1': '039F' - }, - '19': { - 'p1': '50', - 'p9': '03A0' - }, - '1A': { - 'p1': '007B', - 'p7': '005B' - }, - '1B': { - 'p1': '007D', - 'p7': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'Ctrl' - }, - '1E': { - 'p1': '391' - }, - '1F': { - 'p1': '53', - 'p9': '03A3' - }, - '20': { - 'p1': '44', - 'p9': '394' - }, - '21': { - 'p1': '46', - 'p9': '3A6' - }, - '22': { - 'p1': '47', - 'p9': '393' - }, - '23': { - 'p1': '397' - }, - '24': { - 'p1': '004A', - 'p9': '039E' - }, - '25': { - 'p1': '039A' - }, - '26': { - 'p1': '004C', - 'p9': '039B' - }, - '27': { - 'p1': '003A', - 'p3': '00A8', - 'p7': '003B', - 'p9': '00B4' - }, - '28': { - 'p1': '22', - 'p7': '27' - }, - '29': { - 'p1': '007E', - 'p7': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '007C', - 'p7': '005C' - }, - '2C': { - 'p1': '396' - }, - '2D': { - 'p1': '03A7' - }, - '2E': { - 'p1': '43', - 'p9': '03A8' - }, - '2F': { - 'p1': '56', - 'p9': '03A9' - }, - '30': { - 'p1': '392' - }, - '31': { - 'p1': '039D' - }, - '32': { - 'p1': '039C' - }, - '33': { - 'p1': '003C', - 'p7': '002C' - }, - '34': { - 'p1': '003E', - 'p7': '002E' - }, - '35': { - 'p1': '003F', - 'p7': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'Alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'Esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '40', 'p7': '32'}, + '04': {'p1': '23', 'p7': '33'}, + '05': {'p1': '24', 'p7': '34'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '005E', 'p7': '36'}, + '08': {'p1': '26', 'p7': '37'}, + '09': {'p1': '002A', 'p7': '38'}, + '0A': {'p1': '28', 'p7': '39'}, + '0B': {'p1': '29', 'p7': '30'}, + '0C': {'p1': '005F', 'p7': '002D'}, + '0D': {'p1': '002B', 'p7': '003D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p1': '51', 'p3': '3A', 'p9': '3B'}, + '11': {'p1': '57', 'p9': '3C2'}, + '12': {'p1': '45', 'p9': '20AC'}, + '13': {'p1': '52', 'p9': '03A1'}, + '14': {'p1': '54'}, + '15': {'p1': '03A5'}, + '16': {'p1': '55', 'p9': '398'}, + '17': {'p1': '399'}, + '18': {'p1': '039F'}, + '19': {'p1': '50', 'p9': '03A0'}, + '1A': {'p1': '007B', 'p7': '005B'}, + '1B': {'p1': '007D', 'p7': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'Ctrl'}, + '1E': {'p1': '391'}, + '1F': {'p1': '53', 'p9': '03A3'}, + '20': {'p1': '44', 'p9': '394'}, + '21': {'p1': '46', 'p9': '3A6'}, + '22': {'p1': '47', 'p9': '393'}, + '23': {'p1': '397'}, + '24': {'p1': '004A', 'p9': '039E'}, + '25': {'p1': '039A'}, + '26': {'p1': '004C', 'p9': '039B'}, + '27': {'p1': '003A', 'p3': '00A8', 'p7': '003B', 'p9': '00B4'}, + '28': {'p1': '22', 'p7': '27'}, + '29': {'p1': '007E', 'p7': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '007C', 'p7': '005C'}, + '2C': {'p1': '396'}, + '2D': {'p1': '03A7'}, + '2E': {'p1': '43', 'p9': '03A8'}, + '2F': {'p1': '56', 'p9': '03A9'}, + '30': {'p1': '392'}, + '31': {'p1': '039D'}, + '32': {'p1': '039C'}, + '33': {'p1': '003C', 'p7': '002C'}, + '34': {'p1': '003E', 'p7': '002E'}, + '35': {'p1': '003F', 'p7': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'Alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '56': {}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'Ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'Alt Gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'Ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'Alt Gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'en_GB': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32' - }, - '04': { - 'p2': 'A3', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '20AC' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '7B', - 'p8': '5B' - }, - '1B': { - 'p2': '7D', - 'p8': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '3A', - 'p8': '3B' - }, - '28': { - 'p2': '40', - 'p8': '27' - }, - '29': { - 'p2': 'AC', - 'p8': '60', - 'p9': '00A6' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '007E', - 'p8': '23' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '007C', - 'p8': '005C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32'}, + '04': {'p2': 'A3', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34', 'p9': '20AC'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '7B', 'p8': '5B'}, + '1B': {'p2': '7D', 'p8': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '3A', 'p8': '3B'}, + '28': {'p2': '40', 'p8': '27'}, + '29': {'p2': 'AC', 'p8': '60', 'p9': '00A6'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '007E', 'p8': '23'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '007C', 'p8': '005C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'en_GB_dvorak': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32' - }, - '04': { - 'p2': 'A3', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '20AC' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '7B', - 'p8': '5B' - }, - '0D': { - 'p2': '7D', - 'p8': '5D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p2': '40', - 'p8': '27' - }, - '11': { - 'p2': '3C', - 'p8': '2C' - }, - '12': { - 'p2': '3E', - 'p8': '2E' - }, - '13': { - 'p5': '70' - }, - '14': { - 'p5': '79' - }, - '15': { - 'p5': '66' - }, - '16': { - 'p5': '67' - }, - '17': { - 'p5': '63' - }, - '18': { - 'p5': '72' - }, - '19': { - 'p5': '6C' - }, - '1A': { - 'p2': '3F', - 'p8': '2F' - }, - '1B': { - 'p2': '2B', - 'p8': '3D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '6F' - }, - '20': { - 'p5': '65' - }, - '21': { - 'p5': '75' - }, - '22': { - 'p5': '69' - }, - '23': { - 'p5': '64' - }, - '24': { - 'p5': '68' - }, - '25': { - 'p5': '74' - }, - '26': { - 'p5': '6E' - }, - '27': { - 'p5': '73' - }, - '28': { - 'p2': '5F', - 'p8': '2D' - }, - '29': { - 'p2': 'AC', - 'p8': '60', - 'p9': '00A6' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '007E', - 'p8': '23' - }, - '2C': { - 'p2': '3A', - 'p8': '3B' - }, - '2D': { - 'p5': '71' - }, - '2E': { - 'p5': '6A' - }, - '2F': { - 'p5': '6B' - }, - '30': { - 'p5': '78' - }, - '31': { - 'p5': '62' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p5': '77' - }, - '34': { - 'p5': '76' - }, - '35': { - 'p5': '7A' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '007C', - 'p8': '005C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32'}, + '04': {'p2': 'A3', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34', 'p9': '20AC'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '7B', 'p8': '5B'}, + '0D': {'p2': '7D', 'p8': '5D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p2': '40', 'p8': '27'}, + '11': {'p2': '3C', 'p8': '2C'}, + '12': {'p2': '3E', 'p8': '2E'}, + '13': {'p5': '70'}, + '14': {'p5': '79'}, + '15': {'p5': '66'}, + '16': {'p5': '67'}, + '17': {'p5': '63'}, + '18': {'p5': '72'}, + '19': {'p5': '6C'}, + '1A': {'p2': '3F', 'p8': '2F'}, + '1B': {'p2': '2B', 'p8': '3D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '6F'}, + '20': {'p5': '65'}, + '21': {'p5': '75'}, + '22': {'p5': '69'}, + '23': {'p5': '64'}, + '24': {'p5': '68'}, + '25': {'p5': '74'}, + '26': {'p5': '6E'}, + '27': {'p5': '73'}, + '28': {'p2': '5F', 'p8': '2D'}, + '29': {'p2': 'AC', 'p8': '60', 'p9': '00A6'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '007E', 'p8': '23'}, + '2C': {'p2': '3A', 'p8': '3B'}, + '2D': {'p5': '71'}, + '2E': {'p5': '6A'}, + '2F': {'p5': '6B'}, + '30': {'p5': '78'}, + '31': {'p5': '62'}, + '32': {'p5': '6D'}, + '33': {'p5': '77'}, + '34': {'p5': '76'}, + '35': {'p5': '7A'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '007C', 'p8': '005C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'en_US': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '7B', - 'p8': '5B' - }, - '1B': { - 'p2': '7D', - 'p8': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '3A', - 'p8': '3B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '5C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '7B', 'p8': '5B'}, + '1B': {'p2': '7D', 'p8': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '3A', 'p8': '3B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '5C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'en_US_altgr_intl': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '7B', - 'p8': '5B' - }, - '1B': { - 'p2': '7D', - 'p8': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '3A', - 'p8': '3B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '5C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '7B', 'p8': '5B'}, + '1B': {'p2': '7D', 'p8': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '3A', 'p8': '3B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '5C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'en_US_colemak': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '66' - }, - '13': { - 'p5': '70' - }, - '14': { - 'p5': '67' - }, - '15': { - 'p5': '6A' - }, - '16': { - 'p5': '6C' - }, - '17': { - 'p5': '75' - }, - '18': { - 'p5': '79' - }, - '19': { - 'p2': '3A', - 'p8': '3B' - }, - '1A': { - 'p2': '7B', - 'p8': '5B' - }, - '1B': { - 'p2': '7D', - 'p8': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '72' - }, - '20': { - 'p5': '73' - }, - '21': { - 'p5': '74' - }, - '22': { - 'p5': '64' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6E' - }, - '25': { - 'p5': '65' - }, - '26': { - 'p5': '69' - }, - '27': { - 'p5': '6F' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '5C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6B' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '66'}, + '13': {'p5': '70'}, + '14': {'p5': '67'}, + '15': {'p5': '6A'}, + '16': {'p5': '6C'}, + '17': {'p5': '75'}, + '18': {'p5': '79'}, + '19': {'p2': '3A', 'p8': '3B'}, + '1A': {'p2': '7B', 'p8': '5B'}, + '1B': {'p2': '7D', 'p8': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '72'}, + '20': {'p5': '73'}, + '21': {'p5': '74'}, + '22': {'p5': '64'}, + '23': {'p5': '68'}, + '24': {'p5': '6E'}, + '25': {'p5': '65'}, + '26': {'p5': '69'}, + '27': {'p5': '6F'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '5C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6B'}, + '32': {'p5': '6D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'backspace' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'backspace'} }, 'layoutName': 'U' }, 'en_US_dvorak': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '7B', - 'p8': '5B' - }, - '0D': { - 'p2': '7D', - 'p8': '5D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p2': '22', - 'p8': '27' - }, - '11': { - 'p2': '3C', - 'p8': '2C' - }, - '12': { - 'p2': '3E', - 'p8': '2E' - }, - '13': { - 'p5': '70' - }, - '14': { - 'p5': '79' - }, - '15': { - 'p5': '66' - }, - '16': { - 'p5': '67' - }, - '17': { - 'p5': '63' - }, - '18': { - 'p5': '72' - }, - '19': { - 'p5': '6C' - }, - '1A': { - 'p2': '3F', - 'p8': '2F' - }, - '1B': { - 'p2': '2B', - 'p8': '3D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '6F' - }, - '20': { - 'p5': '65' - }, - '21': { - 'p5': '75' - }, - '22': { - 'p5': '69' - }, - '23': { - 'p5': '64' - }, - '24': { - 'p5': '68' - }, - '25': { - 'p5': '74' - }, - '26': { - 'p5': '6E' - }, - '27': { - 'p5': '73' - }, - '28': { - 'p2': '5F', - 'p8': '2D' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '5C' - }, - '2C': { - 'p2': '3A', - 'p8': '3B' - }, - '2D': { - 'p5': '71' - }, - '2E': { - 'p5': '6A' - }, - '2F': { - 'p5': '6B' - }, - '30': { - 'p5': '78' - }, - '31': { - 'p5': '62' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p5': '77' - }, - '34': { - 'p5': '76' - }, - '35': { - 'p5': '7A' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '7B', 'p8': '5B'}, + '0D': {'p2': '7D', 'p8': '5D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p2': '22', 'p8': '27'}, + '11': {'p2': '3C', 'p8': '2C'}, + '12': {'p2': '3E', 'p8': '2E'}, + '13': {'p5': '70'}, + '14': {'p5': '79'}, + '15': {'p5': '66'}, + '16': {'p5': '67'}, + '17': {'p5': '63'}, + '18': {'p5': '72'}, + '19': {'p5': '6C'}, + '1A': {'p2': '3F', 'p8': '2F'}, + '1B': {'p2': '2B', 'p8': '3D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '6F'}, + '20': {'p5': '65'}, + '21': {'p5': '75'}, + '22': {'p5': '69'}, + '23': {'p5': '64'}, + '24': {'p5': '68'}, + '25': {'p5': '74'}, + '26': {'p5': '6E'}, + '27': {'p5': '73'}, + '28': {'p2': '5F', 'p8': '2D'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '5C'}, + '2C': {'p2': '3A', 'p8': '3B'}, + '2D': {'p5': '71'}, + '2E': {'p5': '6A'}, + '2F': {'p5': '6B'}, + '30': {'p5': '78'}, + '31': {'p5': '62'}, + '32': {'p5': '6D'}, + '33': {'p5': '77'}, + '34': {'p5': '76'}, + '35': {'p5': '7A'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'en_US_intl': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '7B', - 'p8': '5B' - }, - '1B': { - 'p2': '7D', - 'p8': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '3A', - 'p8': '3B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '5C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '7B', 'p8': '5B'}, + '1B': {'p2': '7D', 'p8': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '3A', 'p8': '3B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '5C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'es': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '007C' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '00B7', - 'p8': '33', - 'p9': '23' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '007E' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36', - 'p9': '00AC' - }, - '08': { - 'p2': '002F', - 'p8': '37' - }, - '09': { - 'p2': '28', - 'p8': '38' - }, - '0A': { - 'p2': '29', - 'p8': '39' - }, - '0B': { - 'p2': '003D', - 'p8': '30' - }, - '0C': { - 'p2': '003F', - 'p8': '27' - }, - '0D': { - 'p2': '00BF', - 'p8': '00A1' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '005E', - 'p8': '60', - 'p9': '005B' - }, - '1B': { - 'p2': '002A', - 'p8': '002B', - 'p9': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F1' - }, - '28': { - 'p2': '00A8', - 'p8': '00B4', - 'p9': '007B' - }, - '29': { - 'p2': '00AA', - 'p8': '00BA', - 'p9': '005C' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '00C7', - 'p8': 'E7', - 'p9': '007D' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31', 'p9': '007C'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '00B7', 'p8': '33', 'p9': '23'}, + '05': {'p2': '24', 'p8': '34', 'p9': '007E'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36', 'p9': '00AC'}, + '08': {'p2': '002F', 'p8': '37'}, + '09': {'p2': '28', 'p8': '38'}, + '0A': {'p2': '29', 'p8': '39'}, + '0B': {'p2': '003D', 'p8': '30'}, + '0C': {'p2': '003F', 'p8': '27'}, + '0D': {'p2': '00BF', 'p8': '00A1'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p2': '005E', 'p8': '60', 'p9': '005B'}, + '1B': {'p2': '002A', 'p8': '002B', 'p9': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F1'}, + '28': {'p2': '00A8', 'p8': '00B4', 'p9': '007B'}, + '29': {'p2': '00AA', 'p8': '00BA', 'p9': '005C'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '00C7', 'p8': 'E7', 'p9': '007D'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'es_419': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '002F', - 'p8': '37' - }, - '09': { - 'p2': '28', - 'p8': '38' - }, - '0A': { - 'p2': '29', - 'p8': '39' - }, - '0B': { - 'p2': '3d', - 'p8': '30' - }, - '0C': { - 'p2': '3f', - 'p8': '27', - 'p9': '005C' - }, - '0D': { - 'p2': 'a1', - 'p8': 'bf' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '40' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6f' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': 'A8', - 'p8': 'B4' - }, - '1B': { - 'p2': '2a', - 'p8': '2b', - 'p9': '7e' - }, - '1C': { - 'format': 'right', - 'label': 'intro' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6a' - }, - '25': { - 'p5': '6b' - }, - '26': { - 'p5': '6c' - }, - '27': { - 'p5': 'f1' - }, - '28': { - 'p2': '5B', - 'p8': '7B', - 'p9': '5E' - }, - '29': { - 'p2': '00B0', - 'p8': '007C', - 'p9': '00AC' - }, - '2A': { - 'format': 'left', - 'label': 'may\u00fas' - }, - '2B': { - 'p2': '5D', - 'p8': '7D', - 'p9': '60' - }, - '2C': { - 'p5': '7a' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6e' - }, - '32': { - 'p5': '6d' - }, - '33': { - 'p2': '3b', - 'p8': '2C' - }, - '34': { - 'p2': '3a', - 'p8': '2e' - }, - '35': { - 'p2': '5f', - 'p8': '2d' - }, - '36': { - 'format': 'right', - 'label': 'may\u00fas' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3e', - 'p8': '3c' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '002F', 'p8': '37'}, + '09': {'p2': '28', 'p8': '38'}, + '0A': {'p2': '29', 'p8': '39'}, + '0B': {'p2': '3d', 'p8': '30'}, + '0C': {'p2': '3f', 'p8': '27', 'p9': '005C'}, + '0D': {'p2': 'a1', 'p8': 'bf'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '40'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6f'}, + '19': {'p5': '70'}, + '1A': {'p2': 'A8', 'p8': 'B4'}, + '1B': {'p2': '2a', 'p8': '2b', 'p9': '7e'}, + '1C': {'format': 'right', 'label': 'intro'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6a'}, + '25': {'p5': '6b'}, + '26': {'p5': '6c'}, + '27': {'p5': 'f1'}, + '28': {'p2': '5B', 'p8': '7B', 'p9': '5E'}, + '29': {'p2': '00B0', 'p8': '007C', 'p9': '00AC'}, + '2A': {'format': 'left', 'label': 'may\u00fas'}, + '2B': {'p2': '5D', 'p8': '7D', 'p9': '60'}, + '2C': {'p5': '7a'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6e'}, + '32': {'p5': '6d'}, + '33': {'p2': '3b', 'p8': '2C'}, + '34': {'p2': '3a', 'p8': '2e'}, + '35': {'p2': '5f', 'p8': '2d'}, + '36': {'format': 'right', 'label': 'may\u00fas'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3e', 'p8': '3c'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'et': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': 'A3' - }, - '05': { - 'p2': 'A4', - 'p8': '34', - 'p9': '24' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '2F', - 'p8': '37', - 'p9': '7B' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '5B' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '5D' - }, - '0B': { - 'p2': '3D', - 'p8': '30', - 'p9': '7D' - }, - '0C': { - 'p2': '3F', - 'p8': '2B', - 'p9': '5C' - }, - '0D': { - 'p2': '60', - 'p8': 'B4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': 'FC' - }, - '1B': { - 'p5': 'F5', - 'p9': 'A7' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F6' - }, - '28': { - 'p5': 'E4', - 'p9': '5E' - }, - '29': { - 'p2': '7E', - 'p8': '2C7' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '2A', - 'p8': '27', - 'p9': 'BD' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p2': '3B', - 'p8': '2C' - }, - '34': { - 'p2': '3A', - 'p8': '2E' - }, - '35': { - 'p2': '5F', - 'p8': '2D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3E', - 'p8': '3C', - 'p9': '7C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '23', 'p8': '33', 'p9': 'A3'}, + '05': {'p2': 'A4', 'p8': '34', 'p9': '24'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '2F', 'p8': '37', 'p9': '7B'}, + '09': {'p2': '28', 'p8': '38', 'p9': '5B'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '5D'}, + '0B': {'p2': '3D', 'p8': '30', 'p9': '7D'}, + '0C': {'p2': '3F', 'p8': '2B', 'p9': '5C'}, + '0D': {'p2': '60', 'p8': 'B4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': 'FC'}, + '1B': {'p5': 'F5', 'p9': 'A7'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F6'}, + '28': {'p5': 'E4', 'p9': '5E'}, + '29': {'p2': '7E', 'p8': '2C7'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '2A', 'p8': '27', 'p9': 'BD'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p2': '3B', 'p8': '2C'}, + '34': {'p2': '3A', 'p8': '2E'}, + '35': {'p2': '5F', 'p8': '2D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3E', 'p8': '3C', 'p9': '7C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'fi': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': '00A3' - }, - '05': { - 'p2': '00A4', - 'p8': '34', - 'p9': '24' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '002F', - 'p8': '37', - 'p9': '007B' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '005B' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '005D' - }, - '0B': { - 'p2': '003D', - 'p8': '30', - 'p9': '007D' - }, - '0C': { - 'p2': '003F', - 'p8': '002B', - 'p9': '005C' - }, - '0D': { - 'p2': '60', - 'p8': '00B4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': 'E5' - }, - '1B': { - 'p2': '005E', - 'p8': '00A8', - 'p9': '007E' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F6' - }, - '28': { - 'p5': 'E4' - }, - '29': { - 'p2': '00BD', - 'p8': '00A7' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '002A', - 'p8': '27' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C', - 'p9': '007C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '23', 'p8': '33', 'p9': '00A3'}, + '05': {'p2': '00A4', 'p8': '34', 'p9': '24'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '002F', 'p8': '37', 'p9': '007B'}, + '09': {'p2': '28', 'p8': '38', 'p9': '005B'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '005D'}, + '0B': {'p2': '003D', 'p8': '30', 'p9': '007D'}, + '0C': {'p2': '003F', 'p8': '002B', 'p9': '005C'}, + '0D': {'p2': '60', 'p8': '00B4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': 'E5'}, + '1B': {'p2': '005E', 'p8': '00A8', 'p9': '007E'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F6'}, + '28': {'p5': 'E4'}, + '29': {'p2': '00BD', 'p8': '00A7'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '002A', 'p8': '27'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C', 'p9': '007C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'fr': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': '\u00e9chap' - }, - '02': { - 'p2': '31', - 'p8': '26' - }, - '03': { - 'p2': '32', - 'p8': 'E9', - 'p9': '007E' - }, - '04': { - 'p2': '33', - 'p8': '22', - 'p9': '23' - }, - '05': { - 'p2': '34', - 'p8': '27', - 'p9': '007B' - }, - '06': { - 'p2': '35', - 'p8': '28', - 'p9': '005B' - }, - '07': { - 'p2': '36', - 'p8': '2D', - 'p9': '007C' - }, - '08': { - 'p2': '37', - 'p8': 'E8', - 'p9': '60' - }, - '09': { - 'p2': '38', - 'p8': '5F', - 'p9': '005C' - }, - '0A': { - 'p2': '39', - 'p8': 'E7', - 'p9': '005E' - }, - '0B': { - 'p2': '30', - 'p8': 'E0', - 'p9': '40' - }, - '0C': { - 'p2': '00B0', - 'p8': '29', - 'p9': '005D' - }, - '0D': { - 'p2': '002B', - 'p8': '003D', - 'p9': '007D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '61' - }, - '11': { - 'p5': '007A' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': 'A8', - 'p8': '5E' - }, - '1B': { - 'p2': 'A3', - 'p8': '24', - 'p9': 'A4' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '71' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '006D' - }, - '28': { - 'p2': '25', - 'p8': 'F9' - }, - '29': { - 'p8': 'B2' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': 'B5', - 'p8': '2A' - }, - '2C': { - 'p5': '77' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p2': '3F', - 'p8': '2C' - }, - '33': { - 'p2': '2E', - 'p8': '3B' - }, - '34': { - 'p2': '2F', - 'p8': '3A' - }, - '35': { - 'p2': 'A7', - 'p8': '21' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3E', - 'p8': '3C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': '\u00e9chap'}, + '02': {'p2': '31', 'p8': '26'}, + '03': {'p2': '32', 'p8': 'E9', 'p9': '007E'}, + '04': {'p2': '33', 'p8': '22', 'p9': '23'}, + '05': {'p2': '34', 'p8': '27', 'p9': '007B'}, + '06': {'p2': '35', 'p8': '28', 'p9': '005B'}, + '07': {'p2': '36', 'p8': '2D', 'p9': '007C'}, + '08': {'p2': '37', 'p8': 'E8', 'p9': '60'}, + '09': {'p2': '38', 'p8': '5F', 'p9': '005C'}, + '0A': {'p2': '39', 'p8': 'E7', 'p9': '005E'}, + '0B': {'p2': '30', 'p8': 'E0', 'p9': '40'}, + '0C': {'p2': '00B0', 'p8': '29', 'p9': '005D'}, + '0D': {'p2': '002B', 'p8': '003D', 'p9': '007D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '61'}, + '11': {'p5': '007A'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p2': 'A8', 'p8': '5E'}, + '1B': {'p2': 'A3', 'p8': '24', 'p9': 'A4'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '71'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '006D'}, + '28': {'p2': '25', 'p8': 'F9'}, + '29': {'p8': 'B2'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': 'B5', 'p8': '2A'}, + '2C': {'p5': '77'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p2': '3F', 'p8': '2C'}, + '33': {'p2': '2E', 'p8': '3B'}, + '34': {'p2': '2F', 'p8': '3A'}, + '35': {'p2': 'A7', 'p8': '21'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3E', 'p8': '3C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'fr_CA': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': '\u00e9chap' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': 'B1' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '2F', - 'p8': '33', - 'p9': 'A3' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': 'A2' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': 'A4' - }, - '07': { - 'p2': '3F', - 'p8': '36', - 'p9': 'AC' - }, - '08': { - 'p2': '26', - 'p8': '37', - 'p9': 'A6' - }, - '09': { - 'p2': '2A', - 'p8': '38', - 'p9': 'B2' - }, - '0A': { - 'p2': '28', - 'p8': '39', - 'p9': 'B3' - }, - '0B': { - 'p2': '29', - 'p8': '30', - 'p9': 'BC' - }, - '0C': { - 'p2': '5F', - 'p8': '2D', - 'p9': 'BD' - }, - '0D': { - 'p2': '2B', - 'p8': '3D', - 'p9': 'BE' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F', - 'p9': '00A7' - }, - '19': { - 'p5': '70', - 'p9': '00B6' - }, - '1A': { - 'p2': '5E', - 'p8': '5E', - 'p9': '5B' - }, - '1B': { - 'p2': 'A8', - 'p8': 'B8', - 'p9': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '3A', - 'p8': '3B', - 'p9': '7E' - }, - '28': { - 'p2': '60', - 'p8': '60', - 'p9': '7B' - }, - '29': { - 'p2': '7C', - 'p8': '23', - 'p9': '5C' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '3E', - 'p8': '3C', - 'p9': '7D' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D', - 'p9': '00B5' - }, - '33': { - 'p2': '27', - 'p8': '2C', - 'p9': 'AF' - }, - '34': { - 'p2': '2E', - 'p8': '2E', - 'p9': 'AD' - }, - '35': { - 'p2': 'C9', - 'p8': 'E9', - 'p9': 'B4' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': 'BB', - 'p8': 'AB', - 'p9': 'B0' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': '\u00e9chap'}, + '02': {'p2': '21', 'p8': '31', 'p9': 'B1'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '2F', 'p8': '33', 'p9': 'A3'}, + '05': {'p2': '24', 'p8': '34', 'p9': 'A2'}, + '06': {'p2': '25', 'p8': '35', 'p9': 'A4'}, + '07': {'p2': '3F', 'p8': '36', 'p9': 'AC'}, + '08': {'p2': '26', 'p8': '37', 'p9': 'A6'}, + '09': {'p2': '2A', 'p8': '38', 'p9': 'B2'}, + '0A': {'p2': '28', 'p8': '39', 'p9': 'B3'}, + '0B': {'p2': '29', 'p8': '30', 'p9': 'BC'}, + '0C': {'p2': '5F', 'p8': '2D', 'p9': 'BD'}, + '0D': {'p2': '2B', 'p8': '3D', 'p9': 'BE'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F', 'p9': '00A7'}, + '19': {'p5': '70', 'p9': '00B6'}, + '1A': {'p2': '5E', 'p8': '5E', 'p9': '5B'}, + '1B': {'p2': 'A8', 'p8': 'B8', 'p9': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '3A', 'p8': '3B', 'p9': '7E'}, + '28': {'p2': '60', 'p8': '60', 'p9': '7B'}, + '29': {'p2': '7C', 'p8': '23', 'p9': '5C'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '3E', 'p8': '3C', 'p9': '7D'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D', 'p9': '00B5'}, + '33': {'p2': '27', 'p8': '2C', 'p9': 'AF'}, + '34': {'p2': '2E', 'p8': '2E', 'p9': 'AD'}, + '35': {'p2': 'C9', 'p8': 'E9', 'p9': 'B4'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': 'BB', 'p8': 'AB', 'p9': 'B0'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'hi': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p3': '090D', - 'p7': '31', - 'p9': '967' - }, - '03': { - 'p1': '40', - 'p3': '945', - 'p7': '32', - 'p9': '968' - }, - '04': { - 'p1': '23', - 'p3': '094D0930', - 'p7': '33', - 'p9': '969' - }, - '05': { - 'p1': '24', - 'p3': '0930094D', - 'p7': '34', - 'p9': '96A' - }, - '06': { - 'p1': '25', - 'p3': '091C094D091E', - 'p7': '35', - 'p9': '96B' - }, - '07': { - 'p1': '5E', - 'p3': '0924094D0930', - 'p7': '36', - 'p9': '96C' - }, - '08': { - 'p1': '26', - 'p3': '0915094D0937', - 'p7': '37', - 'p9': '96D' - }, - '09': { - 'p1': '2A', - 'p3': '0936094D0930', - 'p7': '38', - 'p9': '96E' - }, - '0A': { - 'p1': '28', - 'p3': '28', - 'p7': '39', - 'p9': '96F' - }, - '0B': { - 'p1': '29', - 'p3': '29', - 'p7': '30', - 'p9': '966' - }, - '0C': { - 'p1': '5F', - 'p3': '903', - 'p7': '2D' - }, - '0D': { - 'p1': '2B', - 'p3': '090B', - 'p7': '3D', - 'p9': '943' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p3': '914', - 'p7': '71', - 'p9': '094C' - }, - '11': { - 'p3': '910', - 'p7': '77', - 'p9': '948' - }, - '12': { - 'p3': '906', - 'p7': '65', - 'p9': '093E' - }, - '13': { - 'p3': '908', - 'p7': '72', - 'p9': '940' - }, - '14': { - 'p3': '090A', - 'p7': '74', - 'p9': '942' - }, - '15': { - 'p3': '092D', - 'p7': '79', - 'p9': '092C' - }, - '16': { - 'p3': '919', - 'p7': '75', - 'p9': '939' - }, - '17': { - 'p3': '918', - 'p7': '69', - 'p9': '917' - }, - '18': { - 'p3': '927', - 'p7': '6F', - 'p9': '926' - }, - '19': { - 'p3': '091D', - 'p7': '70', - 'p9': '091C' - }, - '1A': { - 'p1': '7B', - 'p3': '922', - 'p7': '5B', - 'p9': '921' - }, - '1B': { - 'p1': '7D', - 'p3': '091E', - 'p7': '5D', - 'p9': '093C' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p3': '913', - 'p7': '61', - 'p9': '094B' - }, - '1F': { - 'p3': '090F', - 'p7': '73', - 'p9': '947' - }, - '20': { - 'p3': '905', - 'p7': '64', - 'p9': '094D' - }, - '21': { - 'p3': '907', - 'p7': '66', - 'p9': '093F' - }, - '22': { - 'p3': '909', - 'p7': '67', - 'p9': '941' - }, - '23': { - 'p3': '092B', - 'p7': '68', - 'p9': '092A' - }, - '24': { - 'p3': '931', - 'p7': '6A', - 'p9': '930' - }, - '25': { - 'p3': '916', - 'p7': '6B', - 'p9': '915' - }, - '26': { - 'p3': '925', - 'p7': '6C', - 'p9': '924' - }, - '27': { - 'p1': '3A', - 'p3': '091B', - 'p7': '3B', - 'p9': '091A' - }, - '28': { - 'p1': '22', - 'p3': '920', - 'p7': '27', - 'p9': '091F' - }, - '29': { - 'p1': '7E', - 'p3': '912', - 'p7': '60', - 'p9': '094A' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '7C', - 'p3': '911', - 'p7': '5C', - 'p9': '949' - }, - '2C': { - 'p3': '090E', - 'p7': '7A', - 'p9': '946' - }, - '2D': { - 'p3': '901', - 'p7': '78', - 'p9': '902' - }, - '2E': { - 'p3': '923', - 'p7': '63', - 'p9': '092E' - }, - '2F': { - 'p3': '929', - 'p7': '76', - 'p9': '928' - }, - '30': { - 'p3': '934', - 'p7': '62', - 'p9': '935' - }, - '31': { - 'p3': '933', - 'p7': '6E', - 'p9': '932' - }, - '32': { - 'p3': '936', - 'p7': '6D', - 'p9': '938' - }, - '33': { - 'p1': '3C', - 'p3': '937', - 'p7': '2C', - 'p9': '002C' - }, - '34': { - 'p1': '3E', - 'p3': '964', - 'p7': '2E', - 'p9': '002E' - }, - '35': { - 'p1': '3F', - 'p3': '095F', - 'p7': '2F', - 'p9': '092F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p3': '090D', 'p7': '31', 'p9': '967'}, + '03': {'p1': '40', 'p3': '945', 'p7': '32', 'p9': '968'}, + '04': {'p1': '23', 'p3': '094D0930', 'p7': '33', 'p9': '969'}, + '05': {'p1': '24', 'p3': '0930094D', 'p7': '34', 'p9': '96A'}, + '06': {'p1': '25', 'p3': '091C094D091E', 'p7': '35', 'p9': '96B'}, + '07': {'p1': '5E', 'p3': '0924094D0930', 'p7': '36', 'p9': '96C'}, + '08': {'p1': '26', 'p3': '0915094D0937', 'p7': '37', 'p9': '96D'}, + '09': {'p1': '2A', 'p3': '0936094D0930', 'p7': '38', 'p9': '96E'}, + '0A': {'p1': '28', 'p3': '28', 'p7': '39', 'p9': '96F'}, + '0B': {'p1': '29', 'p3': '29', 'p7': '30', 'p9': '966'}, + '0C': {'p1': '5F', 'p3': '903', 'p7': '2D'}, + '0D': {'p1': '2B', 'p3': '090B', 'p7': '3D', 'p9': '943'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p3': '914', 'p7': '71', 'p9': '094C'}, + '11': {'p3': '910', 'p7': '77', 'p9': '948'}, + '12': {'p3': '906', 'p7': '65', 'p9': '093E'}, + '13': {'p3': '908', 'p7': '72', 'p9': '940'}, + '14': {'p3': '090A', 'p7': '74', 'p9': '942'}, + '15': {'p3': '092D', 'p7': '79', 'p9': '092C'}, + '16': {'p3': '919', 'p7': '75', 'p9': '939'}, + '17': {'p3': '918', 'p7': '69', 'p9': '917'}, + '18': {'p3': '927', 'p7': '6F', 'p9': '926'}, + '19': {'p3': '091D', 'p7': '70', 'p9': '091C'}, + '1A': {'p1': '7B', 'p3': '922', 'p7': '5B', 'p9': '921'}, + '1B': {'p1': '7D', 'p3': '091E', 'p7': '5D', 'p9': '093C'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p3': '913', 'p7': '61', 'p9': '094B'}, + '1F': {'p3': '090F', 'p7': '73', 'p9': '947'}, + '20': {'p3': '905', 'p7': '64', 'p9': '094D'}, + '21': {'p3': '907', 'p7': '66', 'p9': '093F'}, + '22': {'p3': '909', 'p7': '67', 'p9': '941'}, + '23': {'p3': '092B', 'p7': '68', 'p9': '092A'}, + '24': {'p3': '931', 'p7': '6A', 'p9': '930'}, + '25': {'p3': '916', 'p7': '6B', 'p9': '915'}, + '26': {'p3': '925', 'p7': '6C', 'p9': '924'}, + '27': {'p1': '3A', 'p3': '091B', 'p7': '3B', 'p9': '091A'}, + '28': {'p1': '22', 'p3': '920', 'p7': '27', 'p9': '091F'}, + '29': {'p1': '7E', 'p3': '912', 'p7': '60', 'p9': '094A'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '7C', 'p3': '911', 'p7': '5C', 'p9': '949'}, + '2C': {'p3': '090E', 'p7': '7A', 'p9': '946'}, + '2D': {'p3': '901', 'p7': '78', 'p9': '902'}, + '2E': {'p3': '923', 'p7': '63', 'p9': '092E'}, + '2F': {'p3': '929', 'p7': '76', 'p9': '928'}, + '30': {'p3': '934', 'p7': '62', 'p9': '935'}, + '31': {'p3': '933', 'p7': '6E', 'p9': '932'}, + '32': {'p3': '936', 'p7': '6D', 'p9': '938'}, + '33': {'p1': '3C', 'p3': '937', 'p7': '2C', 'p9': '002C'}, + '34': {'p1': '3E', 'p3': '964', 'p7': '2E', 'p9': '002E'}, + '35': {'p1': '3F', 'p3': '095F', 'p7': '2F', 'p9': '092F'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'hr': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '007E' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '02C7' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': '005E' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '02D8' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': '02DA' - }, - '07': { - 'p2': '26', - 'p8': '36', - 'p9': '02DB' - }, - '08': { - 'p2': '002F', - 'p8': '37', - 'p9': '60' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '02D9' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '00B4' - }, - '0B': { - 'p2': '003D', - 'p8': '30', - 'p9': '02DD' - }, - '0C': { - 'p2': '003F', - 'p8': '27', - 'p9': '00A8' - }, - '0D': { - 'p2': '002A', - 'p8': '002B', - 'p9': '00B8' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '005C' - }, - '11': { - 'p5': '77', - 'p9': '007C' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '007A' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '161', - 'p9': '00F7' - }, - '1B': { - 'p5': '111', - 'p9': '00D7' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66', - 'p9': '005B' - }, - '22': { - 'p5': '67', - 'p9': '005D' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B', - 'p9': '142' - }, - '26': { - 'p5': '006C', - 'p9': '141' - }, - '27': { - 'p5': '10D' - }, - '28': { - 'p5': '107', - 'p9': '00DF' - }, - '29': { - 'p2': '00A8', - 'p8': '00B8' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p5': '17E', - 'p9': '00A4' - }, - '2C': { - 'p5': '79' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76', - 'p9': '40' - }, - '30': { - 'p5': '62', - 'p9': '007B' - }, - '31': { - 'p5': '006E', - 'p9': '007D' - }, - '32': { - 'p5': '006D', - 'p9': '00A7' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31', 'p9': '007E'}, + '03': {'p2': '22', 'p8': '32', 'p9': '02C7'}, + '04': {'p2': '23', 'p8': '33', 'p9': '005E'}, + '05': {'p2': '24', 'p8': '34', 'p9': '02D8'}, + '06': {'p2': '25', 'p8': '35', 'p9': '02DA'}, + '07': {'p2': '26', 'p8': '36', 'p9': '02DB'}, + '08': {'p2': '002F', 'p8': '37', 'p9': '60'}, + '09': {'p2': '28', 'p8': '38', 'p9': '02D9'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '00B4'}, + '0B': {'p2': '003D', 'p8': '30', 'p9': '02DD'}, + '0C': {'p2': '003F', 'p8': '27', 'p9': '00A8'}, + '0D': {'p2': '002A', 'p8': '002B', 'p9': '00B8'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '005C'}, + '11': {'p5': '77', 'p9': '007C'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '007A'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': '161', 'p9': '00F7'}, + '1B': {'p5': '111', 'p9': '00D7'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66', 'p9': '005B'}, + '22': {'p5': '67', 'p9': '005D'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B', 'p9': '142'}, + '26': {'p5': '006C', 'p9': '141'}, + '27': {'p5': '10D'}, + '28': {'p5': '107', 'p9': '00DF'}, + '29': {'p2': '00A8', 'p8': '00B8'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p5': '17E', 'p9': '00A4'}, + '2C': {'p5': '79'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76', 'p9': '40'}, + '30': {'p5': '62', 'p9': '007B'}, + '31': {'p5': '006E', 'p9': '007D'}, + '32': {'p5': '006D', 'p9': '00A7'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'hu': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '27', - 'p8': '31', - 'p9': '7e' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '2c7' - }, - '04': { - 'p2': '2b', - 'p8': '33', - 'p9': '5e' - }, - '05': { - 'p2': '21', - 'p8': '34', - 'p9': '2d8' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': '2da' - }, - '07': { - 'p2': '2f', - 'p8': '36', - 'p9': '2db' - }, - '08': { - 'p2': '3d', - 'p8': '37', - 'p9': '60' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '2d9' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': 'b4' - }, - '0B': { - 'p5': 'f6', - 'p9': '2dd' - }, - '0C': { - 'p5': 'fc', - 'p9': 'a8' - }, - '0D': { - 'p5': 'f3', - 'p9': 'b8' - }, - '0E': { - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '5c' - }, - '11': { - 'p5': '77', - 'p9': '7c' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '7a' - }, - '16': { - 'p5': '75', - 'p9': '20ac' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6f' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '151', - 'p9': 'f7' - }, - '1B': { - 'p5': 'fa', - 'p9': 'd7' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73', - 'p9': '111' - }, - '20': { - 'p5': '64', - 'p9': '110' - }, - '21': { - 'p5': '66', - 'p9': '5b' - }, - '22': { - 'p5': '67', - 'p9': '5d' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6a' - }, - '25': { - 'p5': '6b', - 'p9': '142' - }, - '26': { - 'p5': '6c', - 'p9': '141' - }, - '27': { - 'p5': 'e9', - 'p9': '24' - }, - '28': { - 'p5': 'e1', - 'p9': 'df' - }, - '29': { - 'p2': 'a7', - 'p8': '30' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p5': '171', - 'p9': 'a4' - }, - '2C': { - 'p5': '79', - 'p9': '3e' - }, - '2D': { - 'p5': '78', - 'p9': '23' - }, - '2E': { - 'p5': '63', - 'p9': '26' - }, - '2F': { - 'p5': '76', - 'p9': '40' - }, - '30': { - 'p5': '62', - 'p9': '7b' - }, - '31': { - 'p5': '6e', - 'p9': '7d' - }, - '32': { - 'p5': '6d' - }, - '33': { - 'p2': '3f', - 'p8': '2c', - 'p9': '3b' - }, - '34': { - 'p2': '3a', - 'p8': '2e' - }, - '35': { - 'p2': '5f', - 'p8': '2d', - 'p9': '2a' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p5': 'ed', - 'p9': '3c' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '27', 'p8': '31', 'p9': '7e'}, + '03': {'p2': '22', 'p8': '32', 'p9': '2c7'}, + '04': {'p2': '2b', 'p8': '33', 'p9': '5e'}, + '05': {'p2': '21', 'p8': '34', 'p9': '2d8'}, + '06': {'p2': '25', 'p8': '35', 'p9': '2da'}, + '07': {'p2': '2f', 'p8': '36', 'p9': '2db'}, + '08': {'p2': '3d', 'p8': '37', 'p9': '60'}, + '09': {'p2': '28', 'p8': '38', 'p9': '2d9'}, + '0A': {'p2': '29', 'p8': '39', 'p9': 'b4'}, + '0B': {'p5': 'f6', 'p9': '2dd'}, + '0C': {'p5': 'fc', 'p9': 'a8'}, + '0D': {'p5': 'f3', 'p9': 'b8'}, + '0E': {'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '5c'}, + '11': {'p5': '77', 'p9': '7c'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '7a'}, + '16': {'p5': '75', 'p9': '20ac'}, + '17': {'p5': '69'}, + '18': {'p5': '6f'}, + '19': {'p5': '70'}, + '1A': {'p5': '151', 'p9': 'f7'}, + '1B': {'p5': 'fa', 'p9': 'd7'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73', 'p9': '111'}, + '20': {'p5': '64', 'p9': '110'}, + '21': {'p5': '66', 'p9': '5b'}, + '22': {'p5': '67', 'p9': '5d'}, + '23': {'p5': '68'}, + '24': {'p5': '6a'}, + '25': {'p5': '6b', 'p9': '142'}, + '26': {'p5': '6c', 'p9': '141'}, + '27': {'p5': 'e9', 'p9': '24'}, + '28': {'p5': 'e1', 'p9': 'df'}, + '29': {'p2': 'a7', 'p8': '30'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p5': '171', 'p9': 'a4'}, + '2C': {'p5': '79', 'p9': '3e'}, + '2D': {'p5': '78', 'p9': '23'}, + '2E': {'p5': '63', 'p9': '26'}, + '2F': {'p5': '76', 'p9': '40'}, + '30': {'p5': '62', 'p9': '7b'}, + '31': {'p5': '6e', 'p9': '7d'}, + '32': {'p5': '6d'}, + '33': {'p2': '3f', 'p8': '2c', 'p9': '3b'}, + '34': {'p2': '3a', 'p8': '2e'}, + '35': {'p2': '5f', 'p8': '2d', 'p9': '2a'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p5': 'ed', 'p9': '3c'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller' - }, - 'E0 38': { - 'format': 'smaller' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller'}, + 'E0 38': {'format': 'smaller'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'it': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32' - }, - '04': { - 'p2': 'A3', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '2F', - 'p8': '37' - }, - '09': { - 'p2': '28', - 'p8': '38' - }, - '0A': { - 'p2': '29', - 'p8': '39' - }, - '0B': { - 'p2': '3D', - 'p8': '30' - }, - '0C': { - 'p2': '3F', - 'p8': '27' - }, - '0D': { - 'p2': '5E', - 'p8': 'EC' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': 'E9', - 'p8': 'E8', - 'p9': '5B' - }, - '1B': { - 'p2': '2A', - 'p8': '2B', - 'p9': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'invio' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': 'E7', - 'p8': 'F2', - 'p9': '40' - }, - '28': { - 'p2': 'B0', - 'p8': 'E0', - 'p9': '23' - }, - '29': { - 'p2': '7C', - 'p8': '5C' - }, - '2A': { - 'format': 'left', - 'label': 'maiusc' - }, - '2B': { - 'p2': 'A7', - 'p8': 'F9', - 'p9': '60' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3B', - 'p8': '2C' - }, - '34': { - 'p2': '3A', - 'p8': '2E' - }, - '35': { - 'p2': '5F', - 'p8': '2D' - }, - '36': { - 'format': 'right', - 'label': 'maiusc' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3E', - 'p8': '3C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32'}, + '04': {'p2': 'A3', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '2F', 'p8': '37'}, + '09': {'p2': '28', 'p8': '38'}, + '0A': {'p2': '29', 'p8': '39'}, + '0B': {'p2': '3D', 'p8': '30'}, + '0C': {'p2': '3F', 'p8': '27'}, + '0D': {'p2': '5E', 'p8': 'EC'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p2': 'E9', 'p8': 'E8', 'p9': '5B'}, + '1B': {'p2': '2A', 'p8': '2B', 'p9': '5D'}, + '1C': {'format': 'right', 'label': 'invio'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': 'E7', 'p8': 'F2', 'p9': '40'}, + '28': {'p2': 'B0', 'p8': 'E0', 'p9': '23'}, + '29': {'p2': '7C', 'p8': '5C'}, + '2A': {'format': 'left', 'label': 'maiusc'}, + '2B': {'p2': 'A7', 'p8': 'F9', 'p9': '60'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3B', 'p8': '2C'}, + '34': {'p2': '3A', 'p8': '2E'}, + '35': {'p2': '5F', 'p8': '2D'}, + '36': {'format': 'right', 'label': 'maiusc'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3E', 'p8': '3C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'iw': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '40', - 'p7': '32' - }, - '04': { - 'p1': '23', - 'p7': '33' - }, - '05': { - 'p1': '24', - 'p3': '20aa', - 'p7': '34' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '5E', - 'p7': '36' - }, - '08': { - 'p1': '26', - 'p7': '37' - }, - '09': { - 'p1': '2A', - 'p7': '38' - }, - '0A': { - 'p1': '28', - 'p7': '39' - }, - '0B': { - 'p1': '29', - 'p7': '30' - }, - '0C': { - 'p1': '5F', - 'p7': '2D' - }, - '0D': { - 'p1': '2B', - 'p7': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '2F' - }, - '11': { - 'p5': '77', - 'p9': '27' - }, - '12': { - 'p3': '20ac', - 'p5': '65', - 'p9': '5e7' - }, - '13': { - 'p5': '72', - 'p9': '5e8' - }, - '14': { - 'p5': '74', - 'p9': '5D0' - }, - '15': { - 'p5': '79', - 'p9': '5D8' - }, - '16': { - 'p5': '75', - 'p9': '5D5' - }, - '17': { - 'p5': '69', - 'p9': '5Df' - }, - '18': { - 'p5': '6F', - 'p9': '5dd' - }, - '19': { - 'p5': '70', - 'p9': '5e4' - }, - '1A': { - 'p1': '7b', - 'p7': '5B' - }, - '1B': { - 'p1': '7D', - 'p7': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61', - 'p9': '5e9' - }, - '1F': { - 'p5': '73', - 'p9': '5d3' - }, - '20': { - 'p5': '64', - 'p9': '5d2' - }, - '21': { - 'p5': '66', - 'p9': '5db' - }, - '22': { - 'p5': '67', - 'p9': '5e2' - }, - '23': { - 'p5': '68', - 'p9': '5d9' - }, - '24': { - 'p5': '6A', - 'p9': '5d7' - }, - '25': { - 'p5': '6B', - 'p9': '5dc' - }, - '26': { - 'p5': '6C', - 'p9': '5da' - }, - '27': { - 'p1': '3a', - 'p7': '3b', - 'p9': '5e3' - }, - '28': { - 'p1': '22', - 'p7': 'b4' - }, - '29': { - 'p1': '7E', - 'p7': '60', - 'p9': '3b' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': 'A6', - 'p7': '5C' - }, - '2C': { - 'p5': '7A', - 'p9': '5d6' - }, - '2D': { - 'p5': '78', - 'p9': '5e1' - }, - '2E': { - 'p5': '63', - 'p9': '5d1' - }, - '2F': { - 'p5': '76', - 'p9': '5d4' - }, - '30': { - 'p5': '62', - 'p9': '5e0' - }, - '31': { - 'p5': '6E', - 'p9': '5de' - }, - '32': { - 'p5': '6D', - 'p9': '5e6' - }, - '33': { - 'p1': '3c', - 'p7': 'b8', - 'p9': '5ea' - }, - '34': { - 'p1': '3e', - 'p7': '2e', - 'p9': '5e5' - }, - '35': { - 'p1': '3f', - 'p7': '2f', - 'p9': '2e' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '40', 'p7': '32'}, + '04': {'p1': '23', 'p7': '33'}, + '05': {'p1': '24', 'p3': '20aa', 'p7': '34'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '5E', 'p7': '36'}, + '08': {'p1': '26', 'p7': '37'}, + '09': {'p1': '2A', 'p7': '38'}, + '0A': {'p1': '28', 'p7': '39'}, + '0B': {'p1': '29', 'p7': '30'}, + '0C': {'p1': '5F', 'p7': '2D'}, + '0D': {'p1': '2B', 'p7': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '2F'}, + '11': {'p5': '77', 'p9': '27'}, + '12': {'p3': '20ac', 'p5': '65', 'p9': '5e7'}, + '13': {'p5': '72', 'p9': '5e8'}, + '14': {'p5': '74', 'p9': '5D0'}, + '15': {'p5': '79', 'p9': '5D8'}, + '16': {'p5': '75', 'p9': '5D5'}, + '17': {'p5': '69', 'p9': '5Df'}, + '18': {'p5': '6F', 'p9': '5dd'}, + '19': {'p5': '70', 'p9': '5e4'}, + '1A': {'p1': '7b', 'p7': '5B'}, + '1B': {'p1': '7D', 'p7': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61', 'p9': '5e9'}, + '1F': {'p5': '73', 'p9': '5d3'}, + '20': {'p5': '64', 'p9': '5d2'}, + '21': {'p5': '66', 'p9': '5db'}, + '22': {'p5': '67', 'p9': '5e2'}, + '23': {'p5': '68', 'p9': '5d9'}, + '24': {'p5': '6A', 'p9': '5d7'}, + '25': {'p5': '6B', 'p9': '5dc'}, + '26': {'p5': '6C', 'p9': '5da'}, + '27': {'p1': '3a', 'p7': '3b', 'p9': '5e3'}, + '28': {'p1': '22', 'p7': 'b4'}, + '29': {'p1': '7E', 'p7': '60', 'p9': '3b'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': 'A6', 'p7': '5C'}, + '2C': {'p5': '7A', 'p9': '5d6'}, + '2D': {'p5': '78', 'p9': '5e1'}, + '2E': {'p5': '63', 'p9': '5d1'}, + '2F': {'p5': '76', 'p9': '5d4'}, + '30': {'p5': '62', 'p9': '5e0'}, + '31': {'p5': '6E', 'p9': '5de'}, + '32': {'p5': '6D', 'p9': '5e6'}, + '33': {'p1': '3c', 'p7': 'b8', 'p9': '5ea'}, + '34': {'p1': '3e', 'p7': '2e', 'p9': '5e5'}, + '35': {'p1': '3f', 'p7': '2f', 'p9': '2e'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'ja': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31', - 'p9': '306C' - }, - '03': { - 'p1': '22', - 'p7': '32', - 'p9': '3075' - }, - '04': { - 'p1': '23', - 'p3': '3041', - 'p7': '33', - 'p9': '3042' - }, - '05': { - 'p1': '24', - 'p3': '3045', - 'p7': '34', - 'p9': '3046' - }, - '06': { - 'p1': '25', - 'p3': '3047', - 'p7': '35', - 'p9': '3048' - }, - '07': { - 'p1': '26', - 'p3': '3049', - 'p7': '36', - 'p9': '304A' - }, - '08': { - 'p1': '27', - 'p3': '3083', - 'p7': '37', - 'p9': '3084' - }, - '09': { - 'p1': '28', - 'p3': '3085', - 'p7': '38', - 'p9': '3086' - }, - '0A': { - 'p1': '29', - 'p3': '3087', - 'p7': '39', - 'p9': '3088' - }, - '0B': { - 'p3': '3092', - 'p7': '30', - 'p9': '308F' - }, - '0C': { - 'p1': '3D', - 'p7': '2D', - 'p9': '307B' - }, - '0D': { - 'p1': '7E', - 'p7': '5E', - 'p9': '3078' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p1': '71', - 'p9': '305F' - }, - '11': { - 'p1': '77', - 'p9': '3066' - }, - '12': { - 'p1': '65', - 'p3': '3043', - 'p9': '3044' - }, - '13': { - 'p1': '72', - 'p9': '3059' - }, - '14': { - 'p1': '74', - 'p9': '304B' - }, - '15': { - 'p1': '79', - 'p9': '3093' - }, - '16': { - 'p1': '75', - 'p9': '306A' - }, - '17': { - 'p1': '69', - 'p9': '306B' - }, - '18': { - 'p1': '6F', - 'p9': '3089' - }, - '19': { - 'p1': '70', - 'p9': '305B' - }, - '1A': { - 'p1': '60', - 'p7': '40', - 'p9': '3099' - }, - '1B': { - 'p1': '7B', - 'p3': '300C', - 'p7': '5B', - 'p9': '309A' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p1': '61', - 'p9': '3061' - }, - '1F': { - 'p1': '73', - 'p9': '3068' - }, - '20': { - 'p1': '64', - 'p9': '3057' - }, - '21': { - 'p1': '66', - 'p9': '306F' - }, - '22': { - 'p1': '67', - 'p9': '304D' - }, - '23': { - 'p1': '68', - 'p9': '304F' - }, - '24': { - 'p1': '6A', - 'p9': '307E' - }, - '25': { - 'p1': '6B', - 'p9': '306E' - }, - '26': { - 'p1': '6C', - 'p9': '308A' - }, - '27': { - 'p1': '2B', - 'p7': '3B', - 'p9': '308C' - }, - '28': { - 'p1': '2A', - 'p7': '3A', - 'p9': '3051' - }, - '29': { - 'label': '\u304b\u306a / \u82f1\u6570' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '7D', - 'p3': '300D', - 'p7': '5D', - 'p9': '3080' - }, - '2C': { - 'p1': '7A', - 'p9': '3064' - }, - '2D': { - 'p1': '78', - 'p9': '3055' - }, - '2E': { - 'p1': '63', - 'p9': '305D' - }, - '2F': { - 'p1': '76', - 'p9': '3072' - }, - '30': { - 'p1': '62', - 'p9': '3053' - }, - '31': { - 'p1': '6E', - 'p9': '307F' - }, - '32': { - 'p1': '6D', - 'p9': '3082' - }, - '33': { - 'p1': '3C', - 'p3': 'FF64', - 'p7': '2C', - 'p9': '306D' - }, - '34': { - 'p1': '3E', - 'p3': 'FF61', - 'p7': '2E', - 'p9': '308B' - }, - '35': { - 'p1': '3F', - 'p3': 'FF65', - 'p7': '2F', - 'p9': '3081' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '73': { - 'p1': '5F', - 'p7': '5C', - 'p9': '308D' - }, - '79': { - 'format': 'smaller', - 'label': '\u304b\u306a' - }, - '7B': { - 'format': 'smaller', - 'label': '\u82f1\u6570' - }, - '7D': { - 'p1': '7C', - 'p7': 'A5', - 'p9': '30FC' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31', 'p9': '306C'}, + '03': {'p1': '22', 'p7': '32', 'p9': '3075'}, + '04': {'p1': '23', 'p3': '3041', 'p7': '33', 'p9': '3042'}, + '05': {'p1': '24', 'p3': '3045', 'p7': '34', 'p9': '3046'}, + '06': {'p1': '25', 'p3': '3047', 'p7': '35', 'p9': '3048'}, + '07': {'p1': '26', 'p3': '3049', 'p7': '36', 'p9': '304A'}, + '08': {'p1': '27', 'p3': '3083', 'p7': '37', 'p9': '3084'}, + '09': {'p1': '28', 'p3': '3085', 'p7': '38', 'p9': '3086'}, + '0A': {'p1': '29', 'p3': '3087', 'p7': '39', 'p9': '3088'}, + '0B': {'p3': '3092', 'p7': '30', 'p9': '308F'}, + '0C': {'p1': '3D', 'p7': '2D', 'p9': '307B'}, + '0D': {'p1': '7E', 'p7': '5E', 'p9': '3078'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p1': '71', 'p9': '305F'}, + '11': {'p1': '77', 'p9': '3066'}, + '12': {'p1': '65', 'p3': '3043', 'p9': '3044'}, + '13': {'p1': '72', 'p9': '3059'}, + '14': {'p1': '74', 'p9': '304B'}, + '15': {'p1': '79', 'p9': '3093'}, + '16': {'p1': '75', 'p9': '306A'}, + '17': {'p1': '69', 'p9': '306B'}, + '18': {'p1': '6F', 'p9': '3089'}, + '19': {'p1': '70', 'p9': '305B'}, + '1A': {'p1': '60', 'p7': '40', 'p9': '3099'}, + '1B': {'p1': '7B', 'p3': '300C', 'p7': '5B', 'p9': '309A'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p1': '61', 'p9': '3061'}, + '1F': {'p1': '73', 'p9': '3068'}, + '20': {'p1': '64', 'p9': '3057'}, + '21': {'p1': '66', 'p9': '306F'}, + '22': {'p1': '67', 'p9': '304D'}, + '23': {'p1': '68', 'p9': '304F'}, + '24': {'p1': '6A', 'p9': '307E'}, + '25': {'p1': '6B', 'p9': '306E'}, + '26': {'p1': '6C', 'p9': '308A'}, + '27': {'p1': '2B', 'p7': '3B', 'p9': '308C'}, + '28': {'p1': '2A', 'p7': '3A', 'p9': '3051'}, + '29': {'label': '\u304b\u306a / \u82f1\u6570'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '7D', 'p3': '300D', 'p7': '5D', 'p9': '3080'}, + '2C': {'p1': '7A', 'p9': '3064'}, + '2D': {'p1': '78', 'p9': '3055'}, + '2E': {'p1': '63', 'p9': '305D'}, + '2F': {'p1': '76', 'p9': '3072'}, + '30': {'p1': '62', 'p9': '3053'}, + '31': {'p1': '6E', 'p9': '307F'}, + '32': {'p1': '6D', 'p9': '3082'}, + '33': {'p1': '3C', 'p3': 'FF64', 'p7': '2C', 'p9': '306D'}, + '34': {'p1': '3E', 'p3': 'FF61', 'p7': '2E', 'p9': '308B'}, + '35': {'p1': '3F', 'p3': 'FF65', 'p7': '2F', 'p9': '3081'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '73': {'p1': '5F', 'p7': '5C', 'p9': '308D'}, + '79': {'format': 'smaller', 'label': '\u304b\u306a'}, + '7B': {'format': 'smaller', 'label': '\u82f1\u6570'}, + '7D': {'p1': '7C', 'p7': 'A5', 'p9': '30FC'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'J' }, 'ko': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '005E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '002A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '005F', - 'p8': '002D' - }, - '0D': { - 'p2': '002B', - 'p8': '003D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p1': '71', - 'p3': '3143', - 'p9': '3142' - }, - '11': { - 'p1': '77', - 'p3': '3149', - 'p9': '3148' - }, - '12': { - 'p1': '65', - 'p3': '3138', - 'p9': '3137' - }, - '13': { - 'p1': '72', - 'p3': '3132', - 'p9': '3131' - }, - '14': { - 'p1': '74', - 'p3': '3146', - 'p9': '3145' - }, - '15': { - 'p1': '79', - 'p9': '315B' - }, - '16': { - 'p1': '75', - 'p9': '3155' - }, - '17': { - 'p1': '69', - 'p9': '3151' - }, - '18': { - 'p1': '6F', - 'p3': '3152', - 'p9': '3150' - }, - '19': { - 'p1': '70', - 'p3': '3156', - 'p9': '3154' - }, - '1A': { - 'p1': '007B', - 'p7': '005B' - }, - '1B': { - 'p1': '007D', - 'p7': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p1': '61', - 'p9': '3141' - }, - '1F': { - 'p1': '73', - 'p9': '3134' - }, - '20': { - 'p1': '64', - 'p9': '3147' - }, - '21': { - 'p1': '66', - 'p9': '3139' - }, - '22': { - 'p1': '67', - 'p9': '314E' - }, - '23': { - 'p1': '68', - 'p9': '3157' - }, - '24': { - 'p1': '6A', - 'p9': '3153' - }, - '25': { - 'p1': '6B', - 'p9': '314F' - }, - '26': { - 'p1': '6C', - 'p9': '3163' - }, - '27': { - 'p1': '003A', - 'p7': '003B' - }, - '28': { - 'p1': '22', - 'p7': '27' - }, - '29': { - 'p2': '007E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '007C', - 'p7': '005C', - 'p9': '20A9' - }, - '2C': { - 'p1': '7A', - 'p9': '314B' - }, - '2D': { - 'p1': '78', - 'p9': '314C' - }, - '2E': { - 'p1': '63', - 'p9': '314A' - }, - '2F': { - 'p1': '76', - 'p9': '314D' - }, - '30': { - 'p1': '62', - 'p9': '3160' - }, - '31': { - 'p1': '6E', - 'p9': '315C' - }, - '32': { - 'p1': '6D', - 'p9': '3161' - }, - '33': { - 'p1': '003C', - 'p7': '002C' - }, - '34': { - 'p1': '003E', - 'p7': '002E' - }, - '35': { - 'p1': '003F', - 'p7': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '005E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '002A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '005F', 'p8': '002D'}, + '0D': {'p2': '002B', 'p8': '003D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p1': '71', 'p3': '3143', 'p9': '3142'}, + '11': {'p1': '77', 'p3': '3149', 'p9': '3148'}, + '12': {'p1': '65', 'p3': '3138', 'p9': '3137'}, + '13': {'p1': '72', 'p3': '3132', 'p9': '3131'}, + '14': {'p1': '74', 'p3': '3146', 'p9': '3145'}, + '15': {'p1': '79', 'p9': '315B'}, + '16': {'p1': '75', 'p9': '3155'}, + '17': {'p1': '69', 'p9': '3151'}, + '18': {'p1': '6F', 'p3': '3152', 'p9': '3150'}, + '19': {'p1': '70', 'p3': '3156', 'p9': '3154'}, + '1A': {'p1': '007B', 'p7': '005B'}, + '1B': {'p1': '007D', 'p7': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p1': '61', 'p9': '3141'}, + '1F': {'p1': '73', 'p9': '3134'}, + '20': {'p1': '64', 'p9': '3147'}, + '21': {'p1': '66', 'p9': '3139'}, + '22': {'p1': '67', 'p9': '314E'}, + '23': {'p1': '68', 'p9': '3157'}, + '24': {'p1': '6A', 'p9': '3153'}, + '25': {'p1': '6B', 'p9': '314F'}, + '26': {'p1': '6C', 'p9': '3163'}, + '27': {'p1': '003A', 'p7': '003B'}, + '28': {'p1': '22', 'p7': '27'}, + '29': {'p2': '007E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '007C', 'p7': '005C', 'p9': '20A9'}, + '2C': {'p1': '7A', 'p9': '314B'}, + '2D': {'p1': '78', 'p9': '314C'}, + '2E': {'p1': '63', 'p9': '314A'}, + '2F': {'p1': '76', 'p9': '314D'}, + '30': {'p1': '62', 'p9': '3160'}, + '31': {'p1': '6E', 'p9': '315C'}, + '32': {'p1': '6D', 'p9': '3161'}, + '33': {'p1': '003C', 'p7': '002C'}, + '34': {'p1': '003E', 'p7': '002E'}, + '35': {'p1': '003F', 'p7': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller', - 'label': '\ud55c/\uc601' - }, - '7B': { - 'format': 'smaller', - 'label': '\ud55c\uc790' - }, + '79': {'format': 'smaller', 'label': '\ud55c/\uc601'}, + '7B': {'format': 'smaller', 'label': '\ud55c\uc790'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': ' \ud55c\uc790' - }, - 'E0 38': { - 'format': 'smaller', - 'label': '\ud55c/\uc601' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': ' \ud55c\uc790'}, + 'E0 38': {'format': 'smaller', 'label': '\ud55c/\uc601'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'lt': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '105' - }, - '03': { - 'p2': '40', - 'p8': '32', - 'p9': '10D' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': '119' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '117' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': '12F' - }, - '07': { - 'p2': '005E', - 'p8': '36', - 'p9': '161' - }, - '08': { - 'p2': '26', - 'p8': '37', - 'p9': '173' - }, - '09': { - 'p2': '002A', - 'p8': '38', - 'p9': '016B' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '005F', - 'p8': '002D' - }, - '0D': { - 'p2': '002B', - 'p8': '003D', - 'p9': '017E' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '007B', - 'p8': '005B' - }, - '1B': { - 'p2': '007D', - 'p8': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p2': '003A', - 'p8': '003B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '007E', - 'p8': '60', - 'p9': '00B4' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '005C', - 'p8': '007C' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p2': '003C', - 'p8': '002C', - 'p9': '201E' - }, - '34': { - 'p2': '003E', - 'p8': '002E', - 'p9': '201C' - }, - '35': { - 'p2': '003F', - 'p8': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31', 'p9': '105'}, + '03': {'p2': '40', 'p8': '32', 'p9': '10D'}, + '04': {'p2': '23', 'p8': '33', 'p9': '119'}, + '05': {'p2': '24', 'p8': '34', 'p9': '117'}, + '06': {'p2': '25', 'p8': '35', 'p9': '12F'}, + '07': {'p2': '005E', 'p8': '36', 'p9': '161'}, + '08': {'p2': '26', 'p8': '37', 'p9': '173'}, + '09': {'p2': '002A', 'p8': '38', 'p9': '016B'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '005F', 'p8': '002D'}, + '0D': {'p2': '002B', 'p8': '003D', 'p9': '017E'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p2': '007B', 'p8': '005B'}, + '1B': {'p2': '007D', 'p8': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p2': '003A', 'p8': '003B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '007E', 'p8': '60', 'p9': '00B4'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '005C', 'p8': '007C'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p2': '003C', 'p8': '002C', 'p9': '201E'}, + '34': {'p2': '003E', 'p8': '002E', 'p9': '201C'}, + '35': {'p2': '003F', 'p8': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, '79': {}, - '7B': { - 'format': 'smaller' - }, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'lv': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '005E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '002A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '005F', - 'p8': '002D' - }, - '0D': { - 'p2': '002B', - 'p8': '003D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '007B', - 'p8': '005B' - }, - '1B': { - 'p2': '007D', - 'p8': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '003A', - 'p8': '003B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '007E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '005C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '003C', - 'p8': '002C' - }, - '34': { - 'p2': '003E', - 'p8': '002E' - }, - '35': { - 'p2': '003F', - 'p8': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '007C', - 'p8': '005C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '005E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '002A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '005F', 'p8': '002D'}, + '0D': {'p2': '002B', 'p8': '003D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p2': '007B', 'p8': '005B'}, + '1B': {'p2': '007D', 'p8': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '003A', 'p8': '003B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '007E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '005C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '003C', 'p8': '002C'}, + '34': {'p2': '003E', 'p8': '002E'}, + '35': {'p2': '003F', 'p8': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '007C', 'p8': '005C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'nl': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': '20AC' - }, - '07': { - 'p2': '005E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '002A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '005F', - 'p8': '002D' - }, - '0D': { - 'p2': '002B', - 'p8': '003D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '007B', - 'p8': '005B' - }, - '1B': { - 'p2': '007D', - 'p8': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '003A', - 'p8': '003B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '007E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '007C', - 'p8': '005C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '003C', - 'p8': '002C' - }, - '34': { - 'p2': '003E', - 'p8': '002E' - }, - '35': { - 'p2': '003F', - 'p8': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35', 'p9': '20AC'}, + '07': {'p2': '005E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '002A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '005F', 'p8': '002D'}, + '0D': {'p2': '002B', 'p8': '003D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '007B', 'p8': '005B'}, + '1B': {'p2': '007D', 'p8': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '003A', 'p8': '003B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '007E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '007C', 'p8': '005C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '003C', 'p8': '002C'}, + '34': {'p2': '003E', 'p8': '002E'}, + '35': {'p2': '003F', 'p8': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'no': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '22', - 'p7': '32', - 'p9': '40' - }, - '04': { - 'p1': '23', - 'p7': '33', - 'p9': '00A3' - }, - '05': { - 'p1': '00A4', - 'p7': '34', - 'p9': '24' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '26', - 'p7': '36' - }, - '08': { - 'p1': '002F', - 'p7': '37', - 'p9': '007B' - }, - '09': { - 'p1': '28', - 'p7': '38', - 'p9': '005B' - }, - '0A': { - 'p1': '29', - 'p7': '39', - 'p9': '005D' - }, - '0B': { - 'p1': '003D', - 'p7': '30', - 'p9': '007D' - }, - '0C': { - 'p1': '003F', - 'p7': '002B' - }, - '0D': { - 'p1': '60', - 'p7': '005C', - 'p9': '00B4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': 'E5' - }, - '1B': { - 'p1': '5e', - 'p7': '00A8', - 'p9': '7e' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F8' - }, - '28': { - 'p5': 'E6' - }, - '29': { - 'p1': '00A7', - 'p7': '007C' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '2a', - 'p8': '27' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D', - 'p9': '3bc' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3e', - 'p8': '003C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '22', 'p7': '32', 'p9': '40'}, + '04': {'p1': '23', 'p7': '33', 'p9': '00A3'}, + '05': {'p1': '00A4', 'p7': '34', 'p9': '24'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '26', 'p7': '36'}, + '08': {'p1': '002F', 'p7': '37', 'p9': '007B'}, + '09': {'p1': '28', 'p7': '38', 'p9': '005B'}, + '0A': {'p1': '29', 'p7': '39', 'p9': '005D'}, + '0B': {'p1': '003D', 'p7': '30', 'p9': '007D'}, + '0C': {'p1': '003F', 'p7': '002B'}, + '0D': {'p1': '60', 'p7': '005C', 'p9': '00B4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': 'E5'}, + '1B': {'p1': '5e', 'p7': '00A8', 'p9': '7e'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F8'}, + '28': {'p5': 'E6'}, + '29': {'p1': '00A7', 'p7': '007C'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '2a', 'p8': '27'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D', 'p9': '3bc'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3e', 'p8': '003C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'pl': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '5E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '2A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '3D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'label': 'q', - 'p1': '51' - }, - '11': { - 'label': 'w', - 'p1': '57' - }, - '12': { - 'label': 'e', - 'p1': '45' - }, - '13': { - 'label': 'r', - 'p1': '52' - }, - '14': { - 'label': 't', - 'p1': '54' - }, - '15': { - 'label': 'y', - 'p1': '59' - }, - '16': { - 'label': 'u', - 'p1': '55' - }, - '17': { - 'label': 'i', - 'p1': '49' - }, - '18': { - 'label': 'o', - 'p1': '4F' - }, - '19': { - 'label': 'p', - 'p1': '50' - }, - '1A': { - 'p2': '7B', - 'p8': '5B' - }, - '1B': { - 'p2': '7D', - 'p8': '5D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'label': 'a', - 'p1': '41' - }, - '1F': { - 'label': 's', - 'p1': '53' - }, - '20': { - 'label': 'd', - 'p1': '44' - }, - '21': { - 'label': 'f', - 'p1': '46' - }, - '22': { - 'label': 'g', - 'p1': '47' - }, - '23': { - 'label': 'h', - 'p1': '48' - }, - '24': { - 'label': 'j', - 'p1': '4A' - }, - '25': { - 'label': 'k', - 'p1': '4B' - }, - '26': { - 'label': 'l', - 'p1': '4C' - }, - '27': { - 'p2': '3A', - 'p8': '3B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '7C', - 'p8': '5C' - }, - '2C': { - 'label': 'z', - 'p1': '5A' - }, - '2D': { - 'label': 'x', - 'p1': '58' - }, - '2E': { - 'label': 'c', - 'p1': '43' - }, - '2F': { - 'label': 'v', - 'p1': '56' - }, - '30': { - 'label': 'b', - 'p1': '42' - }, - '31': { - 'label': 'n', - 'p1': '4E' - }, - '32': { - 'label': 'm', - 'p1': '4D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '5E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '2A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '3D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'label': 'q', 'p1': '51'}, + '11': {'label': 'w', 'p1': '57'}, + '12': {'label': 'e', 'p1': '45'}, + '13': {'label': 'r', 'p1': '52'}, + '14': {'label': 't', 'p1': '54'}, + '15': {'label': 'y', 'p1': '59'}, + '16': {'label': 'u', 'p1': '55'}, + '17': {'label': 'i', 'p1': '49'}, + '18': {'label': 'o', 'p1': '4F'}, + '19': {'label': 'p', 'p1': '50'}, + '1A': {'p2': '7B', 'p8': '5B'}, + '1B': {'p2': '7D', 'p8': '5D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'label': 'a', 'p1': '41'}, + '1F': {'label': 's', 'p1': '53'}, + '20': {'label': 'd', 'p1': '44'}, + '21': {'label': 'f', 'p1': '46'}, + '22': {'label': 'g', 'p1': '47'}, + '23': {'label': 'h', 'p1': '48'}, + '24': {'label': 'j', 'p1': '4A'}, + '25': {'label': 'k', 'p1': '4B'}, + '26': {'label': 'l', 'p1': '4C'}, + '27': {'p2': '3A', 'p8': '3B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '7C', 'p8': '5C'}, + '2C': {'label': 'z', 'p1': '5A'}, + '2D': {'label': 'x', 'p1': '58'}, + '2E': {'label': 'c', 'p1': '43'}, + '2F': {'label': 'v', 'p1': '56'}, + '30': {'label': 'b', 'p1': '42'}, + '31': {'label': 'n', 'p1': '4E'}, + '32': {'label': 'm', 'p1': '4D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'pt_BR': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31', - 'p9': 'B9' - }, - '03': { - 'p1': '40', - 'p7': '32', - 'p9': 'B2' - }, - '04': { - 'p1': '23', - 'p7': '33', - 'p9': 'B3' - }, - '05': { - 'p1': '24', - 'p7': '34', - 'p9': 'A3' - }, - '06': { - 'p1': '25', - 'p7': '35', - 'p9': 'A2' - }, - '07': { - 'p1': 'A8', - 'p7': '36', - 'p9': '00AC' - }, - '08': { - 'p1': '26', - 'p7': '37' - }, - '09': { - 'p1': '2A', - 'p7': '38' - }, - '0A': { - 'p1': '28', - 'p7': '39' - }, - '0B': { - 'p1': '29', - 'p7': '30' - }, - '0C': { - 'p1': '5F', - 'p7': '2D' - }, - '0D': { - 'p1': '2B', - 'p7': '3D', - 'p9': 'A7' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '2F' - }, - '11': { - 'p5': '77', - 'p9': '3F' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p1': '60', - 'p7': 'B4' - }, - '1B': { - 'p1': '7B', - 'p7': '5B', - 'p9': 'AA0332' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p5': 'e7' - }, - '28': { - 'p1': '5E', - 'p7': '7E' - }, - '29': { - 'p1': '22', - 'p7': '27' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '7D', - 'p7': '5D', - 'p9': 'BA0332' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63', - 'p9': '20A2' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p1': '3C', - 'p7': '2C' - }, - '34': { - 'p1': '3E', - 'p7': '2E' - }, - '35': { - 'p1': '3A', - 'p7': '3B' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p1': '7C', - 'p7': '5C' - }, - '73': { - 'p1': '3F', - 'p7': '2f' - }, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31', 'p9': 'B9'}, + '03': {'p1': '40', 'p7': '32', 'p9': 'B2'}, + '04': {'p1': '23', 'p7': '33', 'p9': 'B3'}, + '05': {'p1': '24', 'p7': '34', 'p9': 'A3'}, + '06': {'p1': '25', 'p7': '35', 'p9': 'A2'}, + '07': {'p1': 'A8', 'p7': '36', 'p9': '00AC'}, + '08': {'p1': '26', 'p7': '37'}, + '09': {'p1': '2A', 'p7': '38'}, + '0A': {'p1': '28', 'p7': '39'}, + '0B': {'p1': '29', 'p7': '30'}, + '0C': {'p1': '5F', 'p7': '2D'}, + '0D': {'p1': '2B', 'p7': '3D', 'p9': 'A7'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '2F'}, + '11': {'p5': '77', 'p9': '3F'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p1': '60', 'p7': 'B4'}, + '1B': {'p1': '7B', 'p7': '5B', 'p9': 'AA0332'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p5': 'e7'}, + '28': {'p1': '5E', 'p7': '7E'}, + '29': {'p1': '22', 'p7': '27'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '7D', 'p7': '5D', 'p9': 'BA0332'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63', 'p9': '20A2'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p1': '3C', 'p7': '2C'}, + '34': {'p1': '3E', 'p7': '2E'}, + '35': {'p1': '3A', 'p7': '3B'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p1': '7C', 'p7': '5C'}, + '73': {'p1': '3F', 'p7': '2f'}, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'B' }, 'pt_PT': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': 'a3' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': 'a7' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '2f', - 'p8': '37', - 'p9': '7b' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '5b' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '5d' - }, - '0B': { - 'p2': '3d', - 'p8': '30', - 'p9': '7d' - }, - '0C': { - 'p2': '3f', - 'p8': '27' - }, - '0D': { - 'p2': 'bb', - 'p8': 'ab' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20ac' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '2a', - 'p8': '2b', - 'p9': 'a8' - }, - '1B': { - 'p2': '60', - 'p8': 'b4' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p5': 'e7' - }, - '28': { - 'p2': 'aa0332', - 'p8': 'ba0332' - }, - '29': { - 'p2': '7c', - 'p8': '5c' - }, - '2A': { - 'format': 'glyph_shift', - 'label': 'shift' - }, - '2B': { - 'p2': '5e', - 'p8': '7e' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3b', - 'p8': '2c' - }, - '34': { - 'p2': '3a', - 'p8': '2e' - }, - '35': { - 'p2': '5f', - 'p8': '2d' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '3e', - 'p8': '3c' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '23', 'p8': '33', 'p9': 'a3'}, + '05': {'p2': '24', 'p8': '34', 'p9': 'a7'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '2f', 'p8': '37', 'p9': '7b'}, + '09': {'p2': '28', 'p8': '38', 'p9': '5b'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '5d'}, + '0B': {'p2': '3d', 'p8': '30', 'p9': '7d'}, + '0C': {'p2': '3f', 'p8': '27'}, + '0D': {'p2': 'bb', 'p8': 'ab'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20ac'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '2a', 'p8': '2b', 'p9': 'a8'}, + '1B': {'p2': '60', 'p8': 'b4'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p5': 'e7'}, + '28': {'p2': 'aa0332', 'p8': 'ba0332'}, + '29': {'p2': '7c', 'p8': '5c'}, + '2A': {'format': 'glyph_shift', 'label': 'shift'}, + '2B': {'p2': '5e', 'p8': '7e'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3b', 'p8': '2c'}, + '34': {'p2': '3a', 'p8': '2e'}, + '35': {'p2': '5f', 'p8': '2d'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '3e', 'p8': '3c'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'ro': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31', - 'p9': '7E' - }, - '03': { - 'p1': '22', - 'p7': '32', - 'p9': '2C7' - }, - '04': { - 'p1': '23', - 'p7': '33', - 'p9': '5E' - }, - '05': { - 'p1': '24', - 'p7': '34', - 'p9': '2D8' - }, - '06': { - 'p1': '25', - 'p7': '35', - 'p9': '2DA' - }, - '07': { - 'p1': '26', - 'p7': '36', - 'p9': '2DB' - }, - '08': { - 'p1': '2F', - 'p7': '37', - 'p9': '60' - }, - '09': { - 'p1': '28', - 'p7': '38', - 'p9': '2D9' - }, - '0A': { - 'p1': '29', - 'p7': '39', - 'p9': 'B4' - }, - '0B': { - 'p1': '3D', - 'p7': '30', - 'p9': '2DD' - }, - '0C': { - 'p1': '3F', - 'p7': '2B', - 'p9': 'A8' - }, - '0D': { - 'p1': '2A', - 'p7': '27', - 'p9': 'B8' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '5c' - }, - '11': { - 'p5': '77', - 'p9': 'A6' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72', - 'p9': 'AE' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '103', - 'p9': '00F7' - }, - '1B': { - 'p5': '00EE', - 'p9': '00D7' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61', - 'p9': '201E' - }, - '1F': { - 'p5': '73', - 'p9': '201D' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C', - 'p9': 'A3' - }, - '27': { - 'p5': '219', - 'p9': '40' - }, - '28': { - 'p5': '021b', - 'p9': 'DF' - }, - '29': { - 'p1': '5B', - 'p7': '5D' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p5': 'E2' - }, - '2C': { - 'p5': '7a' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63', - 'p9': '00A9' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62', - 'p9': '7b' - }, - '31': { - 'p5': '6E', - 'p9': '7d' - }, - '32': { - 'p5': '6D', - 'p9': 'a7' - }, - '33': { - 'p1': '3B', - 'p7': '2C' - }, - '34': { - 'p1': '3A', - 'p7': '2E' - }, - '35': { - 'p1': '5F', - 'p7': '2D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p1': '3C', - 'p7': '3E' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31', 'p9': '7E'}, + '03': {'p1': '22', 'p7': '32', 'p9': '2C7'}, + '04': {'p1': '23', 'p7': '33', 'p9': '5E'}, + '05': {'p1': '24', 'p7': '34', 'p9': '2D8'}, + '06': {'p1': '25', 'p7': '35', 'p9': '2DA'}, + '07': {'p1': '26', 'p7': '36', 'p9': '2DB'}, + '08': {'p1': '2F', 'p7': '37', 'p9': '60'}, + '09': {'p1': '28', 'p7': '38', 'p9': '2D9'}, + '0A': {'p1': '29', 'p7': '39', 'p9': 'B4'}, + '0B': {'p1': '3D', 'p7': '30', 'p9': '2DD'}, + '0C': {'p1': '3F', 'p7': '2B', 'p9': 'A8'}, + '0D': {'p1': '2A', 'p7': '27', 'p9': 'B8'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '5c'}, + '11': {'p5': '77', 'p9': 'A6'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72', 'p9': 'AE'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p5': '103', 'p9': '00F7'}, + '1B': {'p5': '00EE', 'p9': '00D7'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61', 'p9': '201E'}, + '1F': {'p5': '73', 'p9': '201D'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C', 'p9': 'A3'}, + '27': {'p5': '219', 'p9': '40'}, + '28': {'p5': '021b', 'p9': 'DF'}, + '29': {'p1': '5B', 'p7': '5D'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p5': 'E2'}, + '2C': {'p5': '7a'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63', 'p9': '00A9'}, + '2F': {'p5': '76'}, + '30': {'p5': '62', 'p9': '7b'}, + '31': {'p5': '6E', 'p9': '7d'}, + '32': {'p5': '6D', 'p9': 'a7'}, + '33': {'p1': '3B', 'p7': '2C'}, + '34': {'p1': '3A', 'p7': '2E'}, + '35': {'p1': '5F', 'p7': '2D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p1': '3C', 'p7': '3E'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, - '7D': { - 'p5': 'E2' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, + '7D': {'p5': 'E2'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'ru': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '40', - 'p3': '22', - 'p7': '32' - }, - '04': { - 'p1': '23', - 'p3': '2116', - 'p7': '33' - }, - '05': { - 'p1': '24', - 'p3': '3b', - 'p7': '34' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '5e', - 'p3': '3a', - 'p7': '36' - }, - '08': { - 'p1': '26', - 'p3': '3f', - 'p7': '37' - }, - '09': { - 'p1': '2a', - 'p7': '38' - }, - '0A': { - 'p1': '28', - 'p7': '39' - }, - '0B': { - 'p1': '29', - 'p7': '30' - }, - '0C': { - 'p1': '5f', - 'p7': '2d' - }, - '0D': { - 'p1': '2b', - 'p7': '3d' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p1': '71', - 'p9': '439' - }, - '11': { - 'p1': '77', - 'p9': '446' - }, - '12': { - 'p1': '65', - 'p9': '443' - }, - '13': { - 'p1': '72', - 'p9': '43a' - }, - '14': { - 'p1': '74', - 'p9': '435' - }, - '15': { - 'p1': '79', - 'p9': '43d' - }, - '16': { - 'p1': '75', - 'p9': '433' - }, - '17': { - 'p1': '69', - 'p9': '448' - }, - '18': { - 'p1': '6F', - 'p9': '449' - }, - '19': { - 'p1': '70', - 'p9': '437' - }, - '1A': { - 'p1': '7b', - 'p7': '5b', - 'p9': '445' - }, - '1B': { - 'p1': '7d', - 'p7': '5d', - 'p9': '44a' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p1': '61', - 'p9': '444' - }, - '1F': { - 'p1': '73', - 'p9': '44b' - }, - '20': { - 'p1': '64', - 'p9': '432' - }, - '21': { - 'p1': '66', - 'p9': '430' - }, - '22': { - 'p1': '67', - 'p9': '43f' - }, - '23': { - 'p1': '68', - 'p9': '440' - }, - '24': { - 'p1': '6A', - 'p9': '43e' - }, - '25': { - 'p1': '6B', - 'p9': '43b' - }, - '26': { - 'p1': '6C', - 'p9': '434' - }, - '27': { - 'p1': '3a', - 'p7': '3b', - 'p9': '436' - }, - '28': { - 'p1': '22', - 'p7': '27', - 'p9': '44d' - }, - '29': { - 'p1': '7e', - 'p7': '60', - 'p9': '451' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '7c', - 'p3': '2f', - 'p7': '5c', - 'p9': '5c' - }, - '2C': { - 'p1': '7A', - 'p9': '44f' - }, - '2D': { - 'p1': '78', - 'p9': '447' - }, - '2E': { - 'p1': '63', - 'p9': '441' - }, - '2F': { - 'p1': '76', - 'p9': '43c' - }, - '30': { - 'p1': '62', - 'p9': '438' - }, - '31': { - 'p1': '6E', - 'p9': '442' - }, - '32': { - 'p1': '6D', - 'p9': '44c' - }, - '33': { - 'p1': '3c', - 'p7': '2c', - 'p9': '431' - }, - '34': { - 'p1': '3e', - 'p7': '2e', - 'p9': '44e' - }, - '35': { - 'p1': '3f', - 'p3': '2c', - 'p7': '2f', - 'p9': '2e' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '40', 'p3': '22', 'p7': '32'}, + '04': {'p1': '23', 'p3': '2116', 'p7': '33'}, + '05': {'p1': '24', 'p3': '3b', 'p7': '34'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '5e', 'p3': '3a', 'p7': '36'}, + '08': {'p1': '26', 'p3': '3f', 'p7': '37'}, + '09': {'p1': '2a', 'p7': '38'}, + '0A': {'p1': '28', 'p7': '39'}, + '0B': {'p1': '29', 'p7': '30'}, + '0C': {'p1': '5f', 'p7': '2d'}, + '0D': {'p1': '2b', 'p7': '3d'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p1': '71', 'p9': '439'}, + '11': {'p1': '77', 'p9': '446'}, + '12': {'p1': '65', 'p9': '443'}, + '13': {'p1': '72', 'p9': '43a'}, + '14': {'p1': '74', 'p9': '435'}, + '15': {'p1': '79', 'p9': '43d'}, + '16': {'p1': '75', 'p9': '433'}, + '17': {'p1': '69', 'p9': '448'}, + '18': {'p1': '6F', 'p9': '449'}, + '19': {'p1': '70', 'p9': '437'}, + '1A': {'p1': '7b', 'p7': '5b', 'p9': '445'}, + '1B': {'p1': '7d', 'p7': '5d', 'p9': '44a'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p1': '61', 'p9': '444'}, + '1F': {'p1': '73', 'p9': '44b'}, + '20': {'p1': '64', 'p9': '432'}, + '21': {'p1': '66', 'p9': '430'}, + '22': {'p1': '67', 'p9': '43f'}, + '23': {'p1': '68', 'p9': '440'}, + '24': {'p1': '6A', 'p9': '43e'}, + '25': {'p1': '6B', 'p9': '43b'}, + '26': {'p1': '6C', 'p9': '434'}, + '27': {'p1': '3a', 'p7': '3b', 'p9': '436'}, + '28': {'p1': '22', 'p7': '27', 'p9': '44d'}, + '29': {'p1': '7e', 'p7': '60', 'p9': '451'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '7c', 'p3': '2f', 'p7': '5c', 'p9': '5c'}, + '2C': {'p1': '7A', 'p9': '44f'}, + '2D': {'p1': '78', 'p9': '447'}, + '2E': {'p1': '63', 'p9': '441'}, + '2F': {'p1': '76', 'p9': '43c'}, + '30': {'p1': '62', 'p9': '438'}, + '31': {'p1': '6E', 'p9': '442'}, + '32': {'p1': '6D', 'p9': '44c'}, + '33': {'p1': '3c', 'p7': '2c', 'p9': '431'}, + '34': {'p1': '3e', 'p7': '2e', 'p9': '44e'}, + '35': {'p1': '3f', 'p3': '2c', 'p7': '2f', 'p9': '2e'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'sk': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p3': '31', - 'p7': '31', - 'p9': '002b' - }, - '03': { - 'p1': '40', - 'p3': '32', - 'p7': '32', - 'p9': '013E' - }, - '04': { - 'p1': '23', - 'p3': '33', - 'p7': '33', - 'p9': '161' - }, - '05': { - 'p1': '24', - 'p3': '34', - 'p7': '34', - 'p9': '010d' - }, - '06': { - 'p1': '25', - 'p3': '35', - 'p7': '35', - 'p9': '165' - }, - '07': { - 'p1': '5e', - 'p3': '36', - 'p7': '36', - 'p9': '017e' - }, - '08': { - 'p1': '26', - 'p3': '37', - 'p7': '37', - 'p9': 'fd' - }, - '09': { - 'p1': '2a', - 'p3': '38', - 'p7': '38', - 'p9': 'e1' - }, - '0A': { - 'p1': '28', - 'p3': '39', - 'p7': '39', - 'p9': 'ed' - }, - '0B': { - 'p1': '29', - 'p3': '30', - 'p7': '30', - 'p9': 'e9' - }, - '0C': { - 'p1': '5f', - 'p3': '25', - 'p7': '2d', - 'p9': '3d' - }, - '0D': { - 'p1': '2b', - 'p3': '2c7', - 'p7': '3d', - 'p9': 'b4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20ac' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6f' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p1': '7b', - 'p3': 'b4', - 'p7': '5b', - 'p9': 'fa' - }, - '1B': { - 'p1': '7d', - 'p3': '28', - 'p7': '5d', - 'p9': 'e4' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6a' - }, - '25': { - 'p5': '6b' - }, - '26': { - 'p5': '6c' - }, - '27': { - 'p1': '3a', - 'p3': '22', - 'p7': '3b', - 'p9': 'f4' - }, - '28': { - 'p1': '22', - 'p3': '21', - 'p7': '27', - 'p9': 'a7' - }, - '29': { - 'p1': '7e', - 'p3': 'b0', - 'p7': '60', - 'p9': '3b' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '7c', - 'p3': '29', - 'p7': '5c', - 'p9': '148' - }, - '2C': { - 'p5': '7a' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6e' - }, - '32': { - 'p5': '6d' - }, - '33': { - 'p1': '3c', - 'p3': '3f', - 'p7': '2c', - 'p9': '2c' - }, - '34': { - 'p1': '3e', - 'p3': '3a', - 'p7': '2e', - 'p9': '2e' - }, - '35': { - 'p1': '3f', - 'p3': '5f', - 'p7': '2f', - 'p9': '2d' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p1': '2a', - 'p3': '7c', - 'p7': '26', - 'p9': '5c' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p3': '31', 'p7': '31', 'p9': '002b'}, + '03': {'p1': '40', 'p3': '32', 'p7': '32', 'p9': '013E'}, + '04': {'p1': '23', 'p3': '33', 'p7': '33', 'p9': '161'}, + '05': {'p1': '24', 'p3': '34', 'p7': '34', 'p9': '010d'}, + '06': {'p1': '25', 'p3': '35', 'p7': '35', 'p9': '165'}, + '07': {'p1': '5e', 'p3': '36', 'p7': '36', 'p9': '017e'}, + '08': {'p1': '26', 'p3': '37', 'p7': '37', 'p9': 'fd'}, + '09': {'p1': '2a', 'p3': '38', 'p7': '38', 'p9': 'e1'}, + '0A': {'p1': '28', 'p3': '39', 'p7': '39', 'p9': 'ed'}, + '0B': {'p1': '29', 'p3': '30', 'p7': '30', 'p9': 'e9'}, + '0C': {'p1': '5f', 'p3': '25', 'p7': '2d', 'p9': '3d'}, + '0D': {'p1': '2b', 'p3': '2c7', 'p7': '3d', 'p9': 'b4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20ac'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6f'}, + '19': {'p5': '70'}, + '1A': {'p1': '7b', 'p3': 'b4', 'p7': '5b', 'p9': 'fa'}, + '1B': {'p1': '7d', 'p3': '28', 'p7': '5d', 'p9': 'e4'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6a'}, + '25': {'p5': '6b'}, + '26': {'p5': '6c'}, + '27': {'p1': '3a', 'p3': '22', 'p7': '3b', 'p9': 'f4'}, + '28': {'p1': '22', 'p3': '21', 'p7': '27', 'p9': 'a7'}, + '29': {'p1': '7e', 'p3': 'b0', 'p7': '60', 'p9': '3b'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '7c', 'p3': '29', 'p7': '5c', 'p9': '148'}, + '2C': {'p5': '7a'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6e'}, + '32': {'p5': '6d'}, + '33': {'p1': '3c', 'p3': '3f', 'p7': '2c', 'p9': '2c'}, + '34': {'p1': '3e', 'p3': '3a', 'p7': '2e', 'p9': '2e'}, + '35': {'p1': '3f', 'p3': '5f', 'p7': '2f', 'p9': '2d'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p1': '2a', 'p3': '7c', 'p7': '26', 'p9': '5c'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'sl': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '007E' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '02C7' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': '005E' - }, - '05': { - 'p2': '24', - 'p8': '34', - 'p9': '02D8' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': '02DA' - }, - '07': { - 'p2': '26', - 'p8': '36', - 'p9': '02DB' - }, - '08': { - 'p2': '002F', - 'p8': '37', - 'p9': '60' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '02D9' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '00B4' - }, - '0B': { - 'p2': '003D', - 'p8': '30', - 'p9': '02DD' - }, - '0C': { - 'p2': '003F', - 'p8': '27', - 'p9': '00A8' - }, - '0D': { - 'p2': '002A', - 'p8': '002B', - 'p9': '00B8' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '005C' - }, - '11': { - 'p5': '77', - 'p9': '007C' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '7A' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '161', - 'p9': '00F7' - }, - '1B': { - 'p5': '111', - 'p9': '00D7' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66', - 'p9': '005B' - }, - '22': { - 'p5': '67', - 'p9': '005D' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B', - 'p9': '142' - }, - '26': { - 'p5': '6C', - 'p9': '141' - }, - '27': { - 'p5': '10D' - }, - '28': { - 'p5': '107', - 'p9': '00DF' - }, - '29': { - 'p2': '00A8', - 'p8': '00B8' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p5': '17E', - 'p9': '00A4' - }, - '2C': { - 'p5': '79' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76', - 'p9': '40' - }, - '30': { - 'p5': '62', - 'p9': '007B' - }, - '31': { - 'p5': '6E', - 'p9': '007D' - }, - '32': { - 'p5': '6D', - 'p9': '00A7' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31', 'p9': '007E'}, + '03': {'p2': '22', 'p8': '32', 'p9': '02C7'}, + '04': {'p2': '23', 'p8': '33', 'p9': '005E'}, + '05': {'p2': '24', 'p8': '34', 'p9': '02D8'}, + '06': {'p2': '25', 'p8': '35', 'p9': '02DA'}, + '07': {'p2': '26', 'p8': '36', 'p9': '02DB'}, + '08': {'p2': '002F', 'p8': '37', 'p9': '60'}, + '09': {'p2': '28', 'p8': '38', 'p9': '02D9'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '00B4'}, + '0B': {'p2': '003D', 'p8': '30', 'p9': '02DD'}, + '0C': {'p2': '003F', 'p8': '27', 'p9': '00A8'}, + '0D': {'p2': '002A', 'p8': '002B', 'p9': '00B8'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '005C'}, + '11': {'p5': '77', 'p9': '007C'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '7A'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p5': '161', 'p9': '00F7'}, + '1B': {'p5': '111', 'p9': '00D7'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66', 'p9': '005B'}, + '22': {'p5': '67', 'p9': '005D'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B', 'p9': '142'}, + '26': {'p5': '6C', 'p9': '141'}, + '27': {'p5': '10D'}, + '28': {'p5': '107', 'p9': '00DF'}, + '29': {'p2': '00A8', 'p8': '00B8'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p5': '17E', 'p9': '00A4'}, + '2C': {'p5': '79'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76', 'p9': '40'}, + '30': {'p5': '62', 'p9': '007B'}, + '31': {'p5': '6E', 'p9': '007D'}, + '32': {'p5': '6D', 'p9': '00A7'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'sr': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': '\u0438\u0437\u043b' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '007E' - }, - '03': { - 'p2': '22', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': '005E' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '27', - 'p8': '37', - 'p9': '60' - }, - '09': { - 'p2': '28', - 'p8': '38' - }, - '0A': { - 'p2': '29', - 'p8': '39' - }, - '0B': { - 'p2': '003D', - 'p8': '30' - }, - '0C': { - 'p2': '003F', - 'p8': '27' - }, - '0D': { - 'p2': '002A', - 'p8': '002B' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p4': '71', - 'p6': '459' - }, - '11': { - 'p4': '77', - 'p6': '045A' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '7A' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p4': '161', - 'p6': '448' - }, - '1B': { - 'p4': '111', - 'p6': '442' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': '\u043a\u043d\u0442\u0440' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66', - 'p9': '005B' - }, - '22': { - 'p5': '67', - 'p9': '005D' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p4': '10D', - 'p6': '447' - }, - '28': { - 'p4': '107', - 'p6': '045B' - }, - '29': { - 'p2': '007C', - 'p8': '005C' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p4': '17E', - 'p6': '436' - }, - '2C': { - 'p5': '79' - }, - '2D': { - 'p4': '78', - 'p6': '045F' - }, - '2E': { - 'p4': '63', - 'p6': '446' - }, - '2F': { - 'p5': '76', - 'p9': '40' - }, - '30': { - 'p5': '62', - 'p9': '007B' - }, - '31': { - 'p5': '6E', - 'p9': '007D' - }, - '32': { - 'p5': '6D', - 'p9': '00A7' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': '\u0430\u043b\u0442' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': '\u0438\u0437\u043b'}, + '02': {'p2': '21', 'p8': '31', 'p9': '007E'}, + '03': {'p2': '22', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33', 'p9': '005E'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '27', 'p8': '37', 'p9': '60'}, + '09': {'p2': '28', 'p8': '38'}, + '0A': {'p2': '29', 'p8': '39'}, + '0B': {'p2': '003D', 'p8': '30'}, + '0C': {'p2': '003F', 'p8': '27'}, + '0D': {'p2': '002A', 'p8': '002B'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p4': '71', 'p6': '459'}, + '11': {'p4': '77', 'p6': '045A'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '7A'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p4': '161', 'p6': '448'}, + '1B': {'p4': '111', 'p6': '442'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': '\u043a\u043d\u0442\u0440'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66', 'p9': '005B'}, + '22': {'p5': '67', 'p9': '005D'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p4': '10D', 'p6': '447'}, + '28': {'p4': '107', 'p6': '045B'}, + '29': {'p2': '007C', 'p8': '005C'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p4': '17E', 'p6': '436'}, + '2C': {'p5': '79'}, + '2D': {'p4': '78', 'p6': '045F'}, + '2E': {'p4': '63', 'p6': '446'}, + '2F': {'p5': '76', 'p9': '40'}, + '30': {'p5': '62', 'p9': '007B'}, + '31': {'p5': '6E', 'p9': '007D'}, + '32': {'p5': '6D', 'p9': '00A7'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': '\u0430\u043b\u0442'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': '\u043a\u043d\u0442\u0440' - }, - 'E0 38': { - 'format': 'smaller', - 'label': '\u0430\u043b\u0442' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': '\u043a\u043d\u0442\u0440'}, + 'E0 38': {'format': 'smaller', 'label': '\u0430\u043b\u0442'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'sv': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '22', - 'p8': '32', - 'p9': '40' - }, - '04': { - 'p2': '23', - 'p8': '33', - 'p9': '00A3' - }, - '05': { - 'p2': '00A4', - 'p8': '34', - 'p9': '24' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '26', - 'p8': '36' - }, - '08': { - 'p2': '002F', - 'p8': '37', - 'p9': '007B' - }, - '09': { - 'p2': '28', - 'p8': '38', - 'p9': '005B' - }, - '0A': { - 'p2': '29', - 'p8': '39', - 'p9': '005D' - }, - '0B': { - 'p2': '003D', - 'p8': '30', - 'p9': '007D' - }, - '0C': { - 'p2': '003F', - 'p8': '002B', - 'p9': '005C' - }, - '0D': { - 'p2': '60', - 'p8': '00B4' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20AC' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '006F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': 'E5' - }, - '1B': { - 'p2': '005E', - 'p8': '00A8', - 'p9': '007E' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '006A' - }, - '25': { - 'p5': '006B' - }, - '26': { - 'p5': '006C' - }, - '27': { - 'p5': '00F6' - }, - '28': { - 'p5': 'E4' - }, - '29': { - 'p2': '00BD', - 'p8': '00A7' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '002A', - 'p8': '27' - }, - '2C': { - 'p5': '007A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '006E' - }, - '32': { - 'p5': '006D' - }, - '33': { - 'p2': '003B', - 'p8': '002C' - }, - '34': { - 'p2': '003A', - 'p8': '002E' - }, - '35': { - 'p2': '005F', - 'p8': '002D' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p2': '003E', - 'p8': '003C', - 'p9': '007C' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '22', 'p8': '32', 'p9': '40'}, + '04': {'p2': '23', 'p8': '33', 'p9': '00A3'}, + '05': {'p2': '00A4', 'p8': '34', 'p9': '24'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '26', 'p8': '36'}, + '08': {'p2': '002F', 'p8': '37', 'p9': '007B'}, + '09': {'p2': '28', 'p8': '38', 'p9': '005B'}, + '0A': {'p2': '29', 'p8': '39', 'p9': '005D'}, + '0B': {'p2': '003D', 'p8': '30', 'p9': '007D'}, + '0C': {'p2': '003F', 'p8': '002B', 'p9': '005C'}, + '0D': {'p2': '60', 'p8': '00B4'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20AC'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '006F'}, + '19': {'p5': '70'}, + '1A': {'p5': 'E5'}, + '1B': {'p2': '005E', 'p8': '00A8', 'p9': '007E'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '006A'}, + '25': {'p5': '006B'}, + '26': {'p5': '006C'}, + '27': {'p5': '00F6'}, + '28': {'p5': 'E4'}, + '29': {'p2': '00BD', 'p8': '00A7'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '002A', 'p8': '27'}, + '2C': {'p5': '007A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '006E'}, + '32': {'p5': '006D'}, + '33': {'p2': '003B', 'p8': '002C'}, + '34': {'p2': '003A', 'p8': '002E'}, + '35': {'p2': '005F', 'p8': '002D'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p2': '003E', 'p8': '003C', 'p9': '007C'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'th': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p3': '002B', - 'p7': '31', - 'p9': 'E45' - }, - '03': { - 'p1': '40', - 'p3': 'E51', - 'p7': '32', - 'p9': '002F' - }, - '04': { - 'p1': '23', - 'p3': 'E52', - 'p7': '33', - 'p9': '002D' - }, - '05': { - 'p1': '24', - 'p3': 'E53', - 'p7': '34', - 'p9': 'E20' - }, - '06': { - 'p1': '25', - 'p3': 'E54', - 'p7': '35', - 'p9': 'E16' - }, - '07': { - 'p1': '005E', - 'p3': 'E39', - 'p7': '36', - 'p9': 'E38' - }, - '08': { - 'p1': '26', - 'p3': '0E3F', - 'p7': '37', - 'p9': 'E36' - }, - '09': { - 'p1': '002A', - 'p3': 'E55', - 'p7': '38', - 'p9': 'E04' - }, - '0A': { - 'p1': '28', - 'p3': 'E56', - 'p7': '39', - 'p9': 'E15' - }, - '0B': { - 'p1': '29', - 'p3': 'E57', - 'p7': '30', - 'p9': 'E08' - }, - '0C': { - 'p1': '005F', - 'p3': 'E58', - 'p7': '002D', - 'p9': 'E02' - }, - '0D': { - 'p1': '002B', - 'p3': 'E59', - 'p7': '003D', - 'p9': '0E0A' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p3': 'E50', - 'p7': '71', - 'p9': 'E46' - }, - '11': { - 'p3': '22', - 'p7': '77', - 'p9': 'E44' - }, - '12': { - 'p3': '0E0E', - 'p7': '65', - 'p9': 'E33' - }, - '13': { - 'p3': 'E11', - 'p7': '72', - 'p9': '0E1E' - }, - '14': { - 'p3': 'E18', - 'p7': '74', - 'p9': 'E30' - }, - '15': { - 'p3': '0E4D', - 'p7': '79', - 'p9': 'E31' - }, - '16': { - 'p3': '0E4A', - 'p7': '75', - 'p9': 'E35' - }, - '17': { - 'p3': 'E13', - 'p7': '69', - 'p9': 'E23' - }, - '18': { - 'p3': '0E2F', - 'p7': '006F', - 'p9': 'E19' - }, - '19': { - 'p3': '0E0D', - 'p7': '70', - 'p9': 'E22' - }, - '1A': { - 'p1': '007B', - 'p3': 'E10', - 'p7': '005B', - 'p9': '0E1A' - }, - '1B': { - 'p1': '007D', - 'p3': '002C', - 'p7': '005D', - 'p9': 'E25' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p3': 'E24', - 'p7': '61', - 'p9': '0E1F' - }, - '1F': { - 'p3': 'E06', - 'p7': '73', - 'p9': '0E2B' - }, - '20': { - 'p3': '0E0F', - 'p7': '64', - 'p9': 'E01' - }, - '21': { - 'p3': 'E42', - 'p7': '66', - 'p9': 'E14' - }, - '22': { - 'p3': '0E0C', - 'p7': '67', - 'p9': 'E40' - }, - '23': { - 'p3': 'E47', - 'p7': '68', - 'p9': 'E49' - }, - '24': { - 'p3': '0E4B', - 'p7': '006A', - 'p9': 'E48' - }, - '25': { - 'p3': 'E29', - 'p7': '006B', - 'p9': 'E32' - }, - '26': { - 'p3': 'E28', - 'p7': '006C', - 'p9': '0E2A' - }, - '27': { - 'p1': '003A', - 'p3': '0E0B', - 'p7': '003B', - 'p9': 'E27' - }, - '28': { - 'p1': '22', - 'p3': '002E', - 'p7': '27', - 'p9': 'E07' - }, - '29': { - 'p1': '007E', - 'p3': '25', - 'p7': '60', - 'p9': '005F' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '00A6', - 'p3': 'E05', - 'p7': '005C', - 'p9': 'E03' - }, - '2C': { - 'p3': '28', - 'p7': '007A', - 'p9': '0E1C' - }, - '2D': { - 'p3': '29', - 'p7': '78', - 'p9': '0E1B' - }, - '2E': { - 'p3': 'E09', - 'p7': '63', - 'p9': 'E41' - }, - '2F': { - 'p3': '0E2E', - 'p7': '76', - 'p9': '0E2D' - }, - '30': { - 'p3': '0E3A', - 'p7': '62', - 'p9': 'E34' - }, - '31': { - 'p3': '0E4C', - 'p7': '006E', - 'p9': 'E37' - }, - '32': { - 'p3': '003F', - 'p7': '006D', - 'p9': 'E17' - }, - '33': { - 'p1': '003C', - 'p3': 'E12', - 'p7': '002C', - 'p9': 'E21' - }, - '34': { - 'p1': '003E', - 'p3': '0E2C', - 'p7': '002E', - 'p9': 'E43' - }, - '35': { - 'p1': '003F', - 'p3': 'E26', - 'p7': '002D', - 'p9': '0E1D' - }, - '36': { - 'format': 'right', - 'label': 'shirt' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p3': '002B', 'p7': '31', 'p9': 'E45'}, + '03': {'p1': '40', 'p3': 'E51', 'p7': '32', 'p9': '002F'}, + '04': {'p1': '23', 'p3': 'E52', 'p7': '33', 'p9': '002D'}, + '05': {'p1': '24', 'p3': 'E53', 'p7': '34', 'p9': 'E20'}, + '06': {'p1': '25', 'p3': 'E54', 'p7': '35', 'p9': 'E16'}, + '07': {'p1': '005E', 'p3': 'E39', 'p7': '36', 'p9': 'E38'}, + '08': {'p1': '26', 'p3': '0E3F', 'p7': '37', 'p9': 'E36'}, + '09': {'p1': '002A', 'p3': 'E55', 'p7': '38', 'p9': 'E04'}, + '0A': {'p1': '28', 'p3': 'E56', 'p7': '39', 'p9': 'E15'}, + '0B': {'p1': '29', 'p3': 'E57', 'p7': '30', 'p9': 'E08'}, + '0C': {'p1': '005F', 'p3': 'E58', 'p7': '002D', 'p9': 'E02'}, + '0D': {'p1': '002B', 'p3': 'E59', 'p7': '003D', 'p9': '0E0A'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p3': 'E50', 'p7': '71', 'p9': 'E46'}, + '11': {'p3': '22', 'p7': '77', 'p9': 'E44'}, + '12': {'p3': '0E0E', 'p7': '65', 'p9': 'E33'}, + '13': {'p3': 'E11', 'p7': '72', 'p9': '0E1E'}, + '14': {'p3': 'E18', 'p7': '74', 'p9': 'E30'}, + '15': {'p3': '0E4D', 'p7': '79', 'p9': 'E31'}, + '16': {'p3': '0E4A', 'p7': '75', 'p9': 'E35'}, + '17': {'p3': 'E13', 'p7': '69', 'p9': 'E23'}, + '18': {'p3': '0E2F', 'p7': '006F', 'p9': 'E19'}, + '19': {'p3': '0E0D', 'p7': '70', 'p9': 'E22'}, + '1A': {'p1': '007B', 'p3': 'E10', 'p7': '005B', 'p9': '0E1A'}, + '1B': {'p1': '007D', 'p3': '002C', 'p7': '005D', 'p9': 'E25'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p3': 'E24', 'p7': '61', 'p9': '0E1F'}, + '1F': {'p3': 'E06', 'p7': '73', 'p9': '0E2B'}, + '20': {'p3': '0E0F', 'p7': '64', 'p9': 'E01'}, + '21': {'p3': 'E42', 'p7': '66', 'p9': 'E14'}, + '22': {'p3': '0E0C', 'p7': '67', 'p9': 'E40'}, + '23': {'p3': 'E47', 'p7': '68', 'p9': 'E49'}, + '24': {'p3': '0E4B', 'p7': '006A', 'p9': 'E48'}, + '25': {'p3': 'E29', 'p7': '006B', 'p9': 'E32'}, + '26': {'p3': 'E28', 'p7': '006C', 'p9': '0E2A'}, + '27': {'p1': '003A', 'p3': '0E0B', 'p7': '003B', 'p9': 'E27'}, + '28': {'p1': '22', 'p3': '002E', 'p7': '27', 'p9': 'E07'}, + '29': {'p1': '007E', 'p3': '25', 'p7': '60', 'p9': '005F'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '00A6', 'p3': 'E05', 'p7': '005C', 'p9': 'E03'}, + '2C': {'p3': '28', 'p7': '007A', 'p9': '0E1C'}, + '2D': {'p3': '29', 'p7': '78', 'p9': '0E1B'}, + '2E': {'p3': 'E09', 'p7': '63', 'p9': 'E41'}, + '2F': {'p3': '0E2E', 'p7': '76', 'p9': '0E2D'}, + '30': {'p3': '0E3A', 'p7': '62', 'p9': 'E34'}, + '31': {'p3': '0E4C', 'p7': '006E', 'p9': 'E37'}, + '32': {'p3': '003F', 'p7': '006D', 'p9': 'E17'}, + '33': {'p1': '003C', 'p3': 'E12', 'p7': '002C', 'p9': 'E21'}, + '34': {'p1': '003E', 'p3': '0E2C', 'p7': '002E', 'p9': 'E43'}, + '35': {'p1': '003F', 'p3': 'E26', 'p7': '002D', 'p9': '0E1D'}, + '36': {'format': 'right', 'label': 'shirt'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'tr': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p7': '31' - }, - '03': { - 'p1': '27', - 'p7': '32' - }, - '04': { - 'p1': '5e', - 'p7': '33', - 'p9': '23' - }, - '05': { - 'p1': '2b', - 'p7': '34', - 'p9': '24' - }, - '06': { - 'p1': '25', - 'p7': '35' - }, - '07': { - 'p1': '26', - 'p7': '36' - }, - '08': { - 'p1': '2f', - 'p7': '37', - 'p9': '7b' - }, - '09': { - 'p1': '28', - 'p7': '38', - 'p9': '5b' - }, - '0A': { - 'p1': '29', - 'p7': '39', - 'p9': '5d' - }, - '0B': { - 'p1': '3d', - 'p7': '30', - 'p9': '7d' - }, - '0C': { - 'p1': '3f', - 'p7': '2a', - 'p9': '5c' - }, - '0D': { - 'p1': '5f', - 'p7': '2d' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '40' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65', - 'p9': '20ac' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '11F', - 'p9': 'A8' - }, - '1B': { - 'p5': '0FC', - 'p9': '7e' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p5': '15f', - 'p9': 'B4' - }, - '28': { - 'p5': '69' - }, - '29': { - 'p1': 'E9', - 'p7': '22' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '3b', - 'p7': '2c', - 'p9': '60' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p5': '0F6' - }, - '34': { - 'p5': 'E7' - }, - '35': { - 'p1': '3a', - 'p7': '2e' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - '56': { - 'p1': '3e', - 'p7': '3c', - 'p9': '7c' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p7': '31'}, + '03': {'p1': '27', 'p7': '32'}, + '04': {'p1': '5e', 'p7': '33', 'p9': '23'}, + '05': {'p1': '2b', 'p7': '34', 'p9': '24'}, + '06': {'p1': '25', 'p7': '35'}, + '07': {'p1': '26', 'p7': '36'}, + '08': {'p1': '2f', 'p7': '37', 'p9': '7b'}, + '09': {'p1': '28', 'p7': '38', 'p9': '5b'}, + '0A': {'p1': '29', 'p7': '39', 'p9': '5d'}, + '0B': {'p1': '3d', 'p7': '30', 'p9': '7d'}, + '0C': {'p1': '3f', 'p7': '2a', 'p9': '5c'}, + '0D': {'p1': '5f', 'p7': '2d'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '40'}, + '11': {'p5': '77'}, + '12': {'p5': '65', 'p9': '20ac'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p5': '11F', 'p9': 'A8'}, + '1B': {'p5': '0FC', 'p9': '7e'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p5': '15f', 'p9': 'B4'}, + '28': {'p5': '69'}, + '29': {'p1': 'E9', 'p7': '22'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '3b', 'p7': '2c', 'p9': '60'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p5': '0F6'}, + '34': {'p5': 'E7'}, + '35': {'p1': '3a', 'p7': '2e'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + '56': {'p1': '3e', 'p7': '3c', 'p9': '7c'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'E' }, 'uk': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31', - 'p9': '2013' - }, - '03': { - 'p2': '40', - 'p8': '32', - 'p9': '22' - }, - '04': { - 'p2': '2116', - 'p8': '33', - 'p9': '20AC' - }, - '05': { - 'p2': '003B', - 'p8': '34', - 'p9': '24' - }, - '06': { - 'p2': '25', - 'p8': '35', - 'p9': '00BA' - }, - '07': { - 'p2': '003A', - 'p8': '36' - }, - '08': { - 'p2': '003F', - 'p8': '37' - }, - '09': { - 'p2': '002A', - 'p8': '38', - 'p9': '00A7' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '005F', - 'p8': '002D', - 'p9': '005B' - }, - '0D': { - 'p2': '002B', - 'p8': '003D', - 'p9': '005D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71', - 'p9': '439' - }, - '11': { - 'p5': '77', - 'p9': '446' - }, - '12': { - 'p5': '65', - 'p9': '443' - }, - '13': { - 'p5': '72', - 'p9': '043A' - }, - '14': { - 'p5': '74', - 'p9': '435' - }, - '15': { - 'p5': '79', - 'p9': '043D' - }, - '16': { - 'p5': '75', - 'p9': '433' - }, - '17': { - 'p5': '69', - 'p9': '448' - }, - '18': { - 'p5': '006F', - 'p9': '449' - }, - '19': { - 'p5': '70', - 'p9': '437' - }, - '1A': { - 'p2': '007B', - 'p8': '445' - }, - '1B': { - 'p2': '007D', - 'p8': '044A', - 'p9': '457' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61', - 'p9': '444' - }, - '1F': { - 'p2': '73', - 'p8': '044B', - 'p9': '456' - }, - '20': { - 'p5': '64', - 'p9': '432' - }, - '21': { - 'p5': '66', - 'p9': '430' - }, - '22': { - 'p5': '67', - 'p9': '043F' - }, - '23': { - 'p5': '68', - 'p9': '440' - }, - '24': { - 'p5': '006A', - 'p9': '043E' - }, - '25': { - 'p5': '006B', - 'p9': '043B' - }, - '26': { - 'p5': '006C', - 'p9': '434' - }, - '27': { - 'p2': '003A', - 'p8': '003B', - 'p9': '436' - }, - '28': { - 'p1': '22', - 'p3': '454', - 'p7': '27', - 'p9': '044D' - }, - '29': { - 'p2': '491', - 'p8': '27', - 'p9': '20B4' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '00BB', - 'p3': '002F', - 'p7': '00AB', - 'p9': '005C' - }, - '2C': { - 'p5': '007A', - 'p9': '044F' - }, - '2D': { - 'p5': '78', - 'p9': '447' - }, - '2E': { - 'p5': '63', - 'p9': '441' - }, - '2F': { - 'p5': '76', - 'p9': '043C' - }, - '30': { - 'p5': '62', - 'p9': '438' - }, - '31': { - 'p5': '006E', - 'p9': '442' - }, - '32': { - 'p5': '006D', - 'p9': '044C' - }, - '33': { - 'p2': '003C', - 'p8': '002C', - 'p9': '431' - }, - '34': { - 'p2': '003E', - 'p8': '002E', - 'p9': '044E' - }, - '35': { - 'p1': '003F', - 'p3': '002C', - 'p7': '002F', - 'p9': '002E' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31', 'p9': '2013'}, + '03': {'p2': '40', 'p8': '32', 'p9': '22'}, + '04': {'p2': '2116', 'p8': '33', 'p9': '20AC'}, + '05': {'p2': '003B', 'p8': '34', 'p9': '24'}, + '06': {'p2': '25', 'p8': '35', 'p9': '00BA'}, + '07': {'p2': '003A', 'p8': '36'}, + '08': {'p2': '003F', 'p8': '37'}, + '09': {'p2': '002A', 'p8': '38', 'p9': '00A7'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '005F', 'p8': '002D', 'p9': '005B'}, + '0D': {'p2': '002B', 'p8': '003D', 'p9': '005D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71', 'p9': '439'}, + '11': {'p5': '77', 'p9': '446'}, + '12': {'p5': '65', 'p9': '443'}, + '13': {'p5': '72', 'p9': '043A'}, + '14': {'p5': '74', 'p9': '435'}, + '15': {'p5': '79', 'p9': '043D'}, + '16': {'p5': '75', 'p9': '433'}, + '17': {'p5': '69', 'p9': '448'}, + '18': {'p5': '006F', 'p9': '449'}, + '19': {'p5': '70', 'p9': '437'}, + '1A': {'p2': '007B', 'p8': '445'}, + '1B': {'p2': '007D', 'p8': '044A', 'p9': '457'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61', 'p9': '444'}, + '1F': {'p2': '73', 'p8': '044B', 'p9': '456'}, + '20': {'p5': '64', 'p9': '432'}, + '21': {'p5': '66', 'p9': '430'}, + '22': {'p5': '67', 'p9': '043F'}, + '23': {'p5': '68', 'p9': '440'}, + '24': {'p5': '006A', 'p9': '043E'}, + '25': {'p5': '006B', 'p9': '043B'}, + '26': {'p5': '006C', 'p9': '434'}, + '27': {'p2': '003A', 'p8': '003B', 'p9': '436'}, + '28': {'p1': '22', 'p3': '454', 'p7': '27', 'p9': '044D'}, + '29': {'p2': '491', 'p8': '27', 'p9': '20B4'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '00BB', 'p3': '002F', 'p7': '00AB', 'p9': '005C'}, + '2C': {'p5': '007A', 'p9': '044F'}, + '2D': {'p5': '78', 'p9': '447'}, + '2E': {'p5': '63', 'p9': '441'}, + '2F': {'p5': '76', 'p9': '043C'}, + '30': {'p5': '62', 'p9': '438'}, + '31': {'p5': '006E', 'p9': '442'}, + '32': {'p5': '006D', 'p9': '044C'}, + '33': {'p2': '003C', 'p8': '002C', 'p9': '431'}, + '34': {'p2': '003E', 'p8': '002E', 'p9': '044E'}, + '35': {'p1': '003F', 'p3': '002C', 'p7': '002F', 'p9': '002E'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, '7D': {}, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt gr' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt gr'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'vi': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p5': '103' - }, - '03': { - 'p5': 'E2' - }, - '04': { - 'p5': 'EA' - }, - '05': { - 'p5': 'F4' - }, - '06': { - 'p2': '300' - }, - '07': { - 'p2': '309' - }, - '08': { - 'p2': '303' - }, - '09': { - 'p2': '301' - }, - '0A': { - 'p2': '323' - }, - '0B': { - 'p5': '111' - }, - '0C': { - 'p2': '5F', - 'p8': '2D' - }, - '0D': { - 'p2': '2B', - 'p8': '20AB' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p5': '1B0' - }, - '1B': { - 'p5': '1A1' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '3A', - 'p8': '3B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '7E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p5': '103'}, + '03': {'p5': 'E2'}, + '04': {'p5': 'EA'}, + '05': {'p5': 'F4'}, + '06': {'p2': '300'}, + '07': {'p2': '309'}, + '08': {'p2': '303'}, + '09': {'p2': '301'}, + '0A': {'p2': '323'}, + '0B': {'p5': '111'}, + '0C': {'p2': '5F', 'p8': '2D'}, + '0D': {'p2': '2B', 'p8': '20AB'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p5': '1B0'}, + '1B': {'p5': '1A1'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '3A', 'p8': '3B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '7E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, '2B': {}, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '3C', - 'p8': '2C' - }, - '34': { - 'p2': '3E', - 'p8': '2E' - }, - '35': { - 'p2': '3F', - 'p8': '2F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '3C', 'p8': '2C'}, + '34': {'p2': '3E', 'p8': '2E'}, + '35': {'p2': '3F', 'p8': '2F'}, + '36': {'format': 'right', 'label': 'shift'}, '37': {}, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, '73': {}, - '79': { - 'format': 'smaller' - }, - '7B': { - 'format': 'smaller' - }, - '7D': { - 'p2': 'A6', - 'p8': '5C' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '79': {'format': 'smaller'}, + '7B': {'format': 'smaller'}, + '7D': {'p2': 'A6', 'p8': '5C'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'zh_CN': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p2': '21', - 'p8': '31' - }, - '03': { - 'p2': '40', - 'p8': '32' - }, - '04': { - 'p2': '23', - 'p8': '33' - }, - '05': { - 'p2': '24', - 'p8': '34' - }, - '06': { - 'p2': '25', - 'p8': '35' - }, - '07': { - 'p2': '005E', - 'p8': '36' - }, - '08': { - 'p2': '26', - 'p8': '37' - }, - '09': { - 'p2': '002A', - 'p8': '38' - }, - '0A': { - 'p2': '28', - 'p8': '39' - }, - '0B': { - 'p2': '29', - 'p8': '30' - }, - '0C': { - 'p2': '005F', - 'p8': '002D' - }, - '0D': { - 'p2': '002B', - 'p8': '003D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p5': '71' - }, - '11': { - 'p5': '77' - }, - '12': { - 'p5': '65' - }, - '13': { - 'p5': '72' - }, - '14': { - 'p5': '74' - }, - '15': { - 'p5': '79' - }, - '16': { - 'p5': '75' - }, - '17': { - 'p5': '69' - }, - '18': { - 'p5': '6F' - }, - '19': { - 'p5': '70' - }, - '1A': { - 'p2': '007B', - 'p8': '005B' - }, - '1B': { - 'p2': '007D', - 'p8': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p5': '61' - }, - '1F': { - 'p5': '73' - }, - '20': { - 'p5': '64' - }, - '21': { - 'p5': '66' - }, - '22': { - 'p5': '67' - }, - '23': { - 'p5': '68' - }, - '24': { - 'p5': '6A' - }, - '25': { - 'p5': '6B' - }, - '26': { - 'p5': '6C' - }, - '27': { - 'p2': '003A', - 'p8': '003B' - }, - '28': { - 'p2': '22', - 'p8': '27' - }, - '29': { - 'p2': '007E', - 'p8': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p2': '007C', - 'p8': '005C' - }, - '2C': { - 'p5': '7A' - }, - '2D': { - 'p5': '78' - }, - '2E': { - 'p5': '63' - }, - '2F': { - 'p5': '76' - }, - '30': { - 'p5': '62' - }, - '31': { - 'p5': '6E' - }, - '32': { - 'p5': '6D' - }, - '33': { - 'p2': '003C', - 'p8': '002C' - }, - '34': { - 'p2': '003E', - 'p8': '002E' - }, - '35': { - 'p2': '003F', - 'p8': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p2': '21', 'p8': '31'}, + '03': {'p2': '40', 'p8': '32'}, + '04': {'p2': '23', 'p8': '33'}, + '05': {'p2': '24', 'p8': '34'}, + '06': {'p2': '25', 'p8': '35'}, + '07': {'p2': '005E', 'p8': '36'}, + '08': {'p2': '26', 'p8': '37'}, + '09': {'p2': '002A', 'p8': '38'}, + '0A': {'p2': '28', 'p8': '39'}, + '0B': {'p2': '29', 'p8': '30'}, + '0C': {'p2': '005F', 'p8': '002D'}, + '0D': {'p2': '002B', 'p8': '003D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p5': '71'}, + '11': {'p5': '77'}, + '12': {'p5': '65'}, + '13': {'p5': '72'}, + '14': {'p5': '74'}, + '15': {'p5': '79'}, + '16': {'p5': '75'}, + '17': {'p5': '69'}, + '18': {'p5': '6F'}, + '19': {'p5': '70'}, + '1A': {'p2': '007B', 'p8': '005B'}, + '1B': {'p2': '007D', 'p8': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p5': '61'}, + '1F': {'p5': '73'}, + '20': {'p5': '64'}, + '21': {'p5': '66'}, + '22': {'p5': '67'}, + '23': {'p5': '68'}, + '24': {'p5': '6A'}, + '25': {'p5': '6B'}, + '26': {'p5': '6C'}, + '27': {'p2': '003A', 'p8': '003B'}, + '28': {'p2': '22', 'p8': '27'}, + '29': {'p2': '007E', 'p8': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p2': '007C', 'p8': '005C'}, + '2C': {'p5': '7A'}, + '2D': {'p5': '78'}, + '2E': {'p5': '63'}, + '2F': {'p5': '76'}, + '30': {'p5': '62'}, + '31': {'p5': '6E'}, + '32': {'p5': '6D'}, + '33': {'p2': '003C', 'p8': '002C'}, + '34': {'p2': '003E', 'p8': '002E'}, + '35': {'p2': '003F', 'p8': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' }, 'zh_TW': { 'keys': { - '00': { - 'label': 'power' - }, - '01': { - 'format': 'smaller', - 'label': 'esc' - }, - '02': { - 'p1': '21', - 'p3': '3105', - 'p7': '31' - }, - '03': { - 'p1': '40', - 'p3': '3109', - 'p7': '32' - }, - '04': { - 'p1': '23', - 'p3': '02C7', - 'p7': '33' - }, - '05': { - 'p1': '24', - 'p3': '02CB', - 'p7': '34' - }, - '06': { - 'p1': '25', - 'p3': '3113', - 'p7': '35' - }, - '07': { - 'p1': '005E', - 'p3': '02CA', - 'p7': '36' - }, - '08': { - 'p1': '26', - 'p3': '02D9', - 'p7': '37' - }, - '09': { - 'p1': '002A', - 'p3': '311A', - 'p7': '38' - }, - '0A': { - 'p1': '28', - 'p3': '311E', - 'p7': '39' - }, - '0B': { - 'p1': '29', - 'p3': '3122', - 'p7': '30' - }, - '0C': { - 'p1': '005F', - 'p3': '3126', - 'p7': '002D' - }, - '0D': { - 'p1': '002B', - 'p7': '003D' - }, - '0E': { - 'format': 'right', - 'label': 'backspace' - }, - '0F': { - 'format': 'left', - 'label': 'tab' - }, - '10': { - 'p1': '71', - 'p3': '3106', - 'p7': '624B' - }, - '11': { - 'p1': '77', - 'p3': '310A', - 'p7': '7530' - }, - '12': { - 'p1': '65', - 'p3': '310D', - 'p7': '6C34' - }, - '13': { - 'p1': '72', - 'p3': '3110', - 'p7': '53E3' - }, - '14': { - 'p1': '74', - 'p3': '3114', - 'p7': '5EFF' - }, - '15': { - 'p1': '79', - 'p3': '3117', - 'p7': '535C' - }, - '16': { - 'p1': '75', - 'p3': '3127', - 'p7': '5C71' - }, - '17': { - 'p1': '69', - 'p3': '311B', - 'p7': '6208' - }, - '18': { - 'p1': '6F', - 'p3': '311F', - 'p7': '4EBA' - }, - '19': { - 'p1': '70', - 'p3': '3123', - 'p7': '5FC3' - }, - '1A': { - 'p1': '007B', - 'p7': '005B' - }, - '1B': { - 'p1': '007D', - 'p7': '005D' - }, - '1C': { - 'format': 'right', - 'label': 'enter' - }, - '1D': { - 'format': 'left', - 'label': 'ctrl' - }, - '1E': { - 'p1': '61', - 'p3': '3107', - 'p7': '65E5' - }, - '1F': { - 'p1': '73', - 'p3': '310B', - 'p7': '5C38' - }, - '20': { - 'p1': '64', - 'p3': '310E', - 'p7': '6728' - }, - '21': { - 'p1': '66', - 'p3': '3111', - 'p7': '706B' - }, - '22': { - 'p1': '67', - 'p3': '3115', - 'p7': '571F' - }, - '23': { - 'p1': '68', - 'p3': '3118', - 'p7': '7AF9' - }, - '24': { - 'p1': '6A', - 'p3': '3128', - 'p7': '5341' - }, - '25': { - 'p1': '6B', - 'p3': '311C', - 'p7': '5927' - }, - '26': { - 'p1': '6C', - 'p3': '3120', - 'p7': '4E2D' - }, - '27': { - 'p1': '003A', - 'p3': '3124', - 'p7': '003B' - }, - '28': { - 'p1': '22', - 'p7': '27' - }, - '29': { - 'p1': '007E', - 'p7': '60' - }, - '2A': { - 'format': 'left', - 'label': 'shift' - }, - '2B': { - 'p1': '007C', - 'p7': '005C' - }, - '2C': { - 'p1': '7A', - 'p3': '3108', - 'p7': '91CD' - }, - '2D': { - 'p1': '78', - 'p3': '310C', - 'p7': '96E3' - }, - '2E': { - 'p1': '63', - 'p3': '310F', - 'p7': '91D1' - }, - '2F': { - 'p1': '76', - 'p3': '3112', - 'p7': '5973' - }, - '30': { - 'p1': '62', - 'p3': '3116', - 'p7': '6708' - }, - '31': { - 'p1': '6E', - 'p3': '3119', - 'p7': '5F13' - }, - '32': { - 'p1': '6D', - 'p3': '3129', - 'p7': '4E00' - }, - '33': { - 'p1': '003C', - 'p3': '311D', - 'p7': '002C' - }, - '34': { - 'p1': '003E', - 'p3': '3121', - 'p7': '002E' - }, - '35': { - 'p1': '003F', - 'p3': '3125', - 'p7': '002F' - }, - '36': { - 'format': 'right', - 'label': 'shift' - }, - '38': { - 'format': 'left', - 'label': 'alt' - }, - '39': { - 'label': 'space' - }, - '3B': { - 'label': 'back' - }, - '3C': { - 'label': 'forward' - }, - '3D': { - 'label': 'reload' - }, - '3E': { - 'label': 'full screen' - }, - '3F': { - 'label': 'switch window' - }, - '40': { - 'label': 'bright down' - }, - '41': { - 'label': 'bright up' - }, - '42': { - 'label': 'mute' - }, - '43': { - 'label': 'vol. down' - }, - '44': { - 'label': 'vol. up' - }, - 'E0 1D': { - 'format': 'smaller', - 'label': 'ctrl' - }, - 'E0 38': { - 'format': 'smaller', - 'label': 'alt' - }, - 'E0 48': { - 'label': 'up' - }, - 'E0 4B': { - 'label': 'left' - }, - 'E0 4D': { - 'label': 'right' - }, - 'E0 50': { - 'label': 'down' - }, - 'E0 5B': { - 'format': 'left', - 'label': 'search' - } + '00': {'label': 'power'}, + '01': {'format': 'smaller', 'label': 'esc'}, + '02': {'p1': '21', 'p3': '3105', 'p7': '31'}, + '03': {'p1': '40', 'p3': '3109', 'p7': '32'}, + '04': {'p1': '23', 'p3': '02C7', 'p7': '33'}, + '05': {'p1': '24', 'p3': '02CB', 'p7': '34'}, + '06': {'p1': '25', 'p3': '3113', 'p7': '35'}, + '07': {'p1': '005E', 'p3': '02CA', 'p7': '36'}, + '08': {'p1': '26', 'p3': '02D9', 'p7': '37'}, + '09': {'p1': '002A', 'p3': '311A', 'p7': '38'}, + '0A': {'p1': '28', 'p3': '311E', 'p7': '39'}, + '0B': {'p1': '29', 'p3': '3122', 'p7': '30'}, + '0C': {'p1': '005F', 'p3': '3126', 'p7': '002D'}, + '0D': {'p1': '002B', 'p7': '003D'}, + '0E': {'format': 'right', 'label': 'backspace'}, + '0F': {'format': 'left', 'label': 'tab'}, + '10': {'p1': '71', 'p3': '3106', 'p7': '624B'}, + '11': {'p1': '77', 'p3': '310A', 'p7': '7530'}, + '12': {'p1': '65', 'p3': '310D', 'p7': '6C34'}, + '13': {'p1': '72', 'p3': '3110', 'p7': '53E3'}, + '14': {'p1': '74', 'p3': '3114', 'p7': '5EFF'}, + '15': {'p1': '79', 'p3': '3117', 'p7': '535C'}, + '16': {'p1': '75', 'p3': '3127', 'p7': '5C71'}, + '17': {'p1': '69', 'p3': '311B', 'p7': '6208'}, + '18': {'p1': '6F', 'p3': '311F', 'p7': '4EBA'}, + '19': {'p1': '70', 'p3': '3123', 'p7': '5FC3'}, + '1A': {'p1': '007B', 'p7': '005B'}, + '1B': {'p1': '007D', 'p7': '005D'}, + '1C': {'format': 'right', 'label': 'enter'}, + '1D': {'format': 'left', 'label': 'ctrl'}, + '1E': {'p1': '61', 'p3': '3107', 'p7': '65E5'}, + '1F': {'p1': '73', 'p3': '310B', 'p7': '5C38'}, + '20': {'p1': '64', 'p3': '310E', 'p7': '6728'}, + '21': {'p1': '66', 'p3': '3111', 'p7': '706B'}, + '22': {'p1': '67', 'p3': '3115', 'p7': '571F'}, + '23': {'p1': '68', 'p3': '3118', 'p7': '7AF9'}, + '24': {'p1': '6A', 'p3': '3128', 'p7': '5341'}, + '25': {'p1': '6B', 'p3': '311C', 'p7': '5927'}, + '26': {'p1': '6C', 'p3': '3120', 'p7': '4E2D'}, + '27': {'p1': '003A', 'p3': '3124', 'p7': '003B'}, + '28': {'p1': '22', 'p7': '27'}, + '29': {'p1': '007E', 'p7': '60'}, + '2A': {'format': 'left', 'label': 'shift'}, + '2B': {'p1': '007C', 'p7': '005C'}, + '2C': {'p1': '7A', 'p3': '3108', 'p7': '91CD'}, + '2D': {'p1': '78', 'p3': '310C', 'p7': '96E3'}, + '2E': {'p1': '63', 'p3': '310F', 'p7': '91D1'}, + '2F': {'p1': '76', 'p3': '3112', 'p7': '5973'}, + '30': {'p1': '62', 'p3': '3116', 'p7': '6708'}, + '31': {'p1': '6E', 'p3': '3119', 'p7': '5F13'}, + '32': {'p1': '6D', 'p3': '3129', 'p7': '4E00'}, + '33': {'p1': '003C', 'p3': '311D', 'p7': '002C'}, + '34': {'p1': '003E', 'p3': '3121', 'p7': '002E'}, + '35': {'p1': '003F', 'p3': '3125', 'p7': '002F'}, + '36': {'format': 'right', 'label': 'shift'}, + '38': {'format': 'left', 'label': 'alt'}, + '39': {'label': 'space'}, + '3B': {'label': 'back'}, + '3C': {'label': 'forward'}, + '3D': {'label': 'reload'}, + '3E': {'label': 'full screen'}, + '3F': {'label': 'switch window'}, + '40': {'label': 'bright down'}, + '41': {'label': 'bright up'}, + '42': {'label': 'mute'}, + '43': {'label': 'vol. down'}, + '44': {'label': 'vol. up'}, + 'E0 1D': {'format': 'smaller', 'label': 'ctrl'}, + 'E0 38': {'format': 'smaller', 'label': 'alt'}, + 'E0 48': {'label': 'up'}, + 'E0 4B': {'label': 'left'}, + 'E0 4D': {'label': 'right'}, + 'E0 50': {'label': 'down'}, + 'E0 5B': {'format': 'left', 'label': 'search'} }, 'layoutName': 'U' } }, 'layouts': { 'B': [ - [ - '43', - 658.0, - 6.0, - 72.0, - 35.0 - ], - [ - '44', - 730.0, - 6.0, - 73.0, - 35.0 - ], - [ - '42', - 585.0, - 6.0, - 73.0, - 35.0 - ], - [ - '41', - 513.0, - 6.0, - 72.0, - 35.0 - ], - [ - '40', - 440.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3F', - 368.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3D', - 223.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3E', - 295.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3C', - 150.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3B', - 77.0, - 6.0, - 73.0, - 35.0 - ], - [ - '00', - 803.0, - 6.0, - 72.0, - 35.0 - ], - [ - '01', - 5.0, - 6.0, - 72.0, - 35.0 - ], - [ - '', - 815.0, - 107.0, - 30.0, - 60.0 - ], - [ - '73', - 740.0, - 227.0, - 60.0, - 60.0 - ], - [ - '56', - 80.0, - 227.0, - 60.0, - 60.0 - ], - [ - '39', - 245.0, - 287.0, - 330.0, - 60.0 - ], - [ - '0E', - 785.0, - 47.0, - 90.0, - 60.0 - ], - [ - '1C', - 830.0, - 107.0, - 45.0, - 120.0 - ], - [ - '36', - 800.0, - 227.0, - 75.0, - 60.0 - ], - [ - '0F', - 5.0, - 107.0, - 90.0, - 60.0 - ], - [ - '2A', - 5.0, - 227.0, - 75.0, - 60.0 - ], - [ - 'E0 50', - 755.0, - 318.0, - 60.0, - 29.0 - ], - [ - 'E0 48', - 755.0, - 287.0, - 60.0, - 31.0 - ], - [ - 'E0 4D', - 815.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 4B', - 695.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 5B', - 5.0, - 167.0, - 105.0, - 60.0 - ], - [ - '38', - 125.0, - 287.0, - 120.0, - 60.0 - ], - [ - '1D', - 5.0, - 287.0, - 120.0, - 60.0 - ], - [ - 'E0 1D', - 635.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 38', - 575.0, - 287.0, - 60.0, - 60.0 - ], - [ - '2B', - 770.0, - 167.0, - 60.0, - 60.0 - ], - [ - '0D', - 725.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0C', - 665.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0B', - 605.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0A', - 545.0, - 47.0, - 60.0, - 60.0 - ], - [ - '09', - 485.0, - 47.0, - 60.0, - 60.0 - ], - [ - '08', - 425.0, - 47.0, - 60.0, - 60.0 - ], - [ - '07', - 365.0, - 47.0, - 60.0, - 60.0 - ], - [ - '06', - 305.0, - 47.0, - 60.0, - 60.0 - ], - [ - '05', - 245.0, - 47.0, - 60.0, - 60.0 - ], - [ - '04', - 185.0, - 47.0, - 60.0, - 60.0 - ], - [ - '03', - 125.0, - 47.0, - 60.0, - 60.0 - ], - [ - '02', - 65.0, - 47.0, - 60.0, - 60.0 - ], - [ - '29', - 5.0, - 47.0, - 60.0, - 60.0 - ], - [ - '35', - 680.0, - 227.0, - 60.0, - 60.0 - ], - [ - '34', - 620.0, - 227.0, - 60.0, - 60.0 - ], - [ - '33', - 560.0, - 227.0, - 60.0, - 60.0 - ], - [ - '32', - 500.0, - 227.0, - 60.0, - 60.0 - ], - [ - '31', - 440.0, - 227.0, - 60.0, - 60.0 - ], - [ - '30', - 380.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2F', - 320.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2E', - 260.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2D', - 200.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2C', - 140.0, - 227.0, - 60.0, - 60.0 - ], - [ - '28', - 710.0, - 167.0, - 60.0, - 60.0 - ], - [ - '27', - 650.0, - 167.0, - 60.0, - 60.0 - ], - [ - '26', - 590.0, - 167.0, - 60.0, - 60.0 - ], - [ - '25', - 530.0, - 167.0, - 60.0, - 60.0 - ], - [ - '24', - 470.0, - 167.0, - 60.0, - 60.0 - ], - [ - '23', - 410.0, - 167.0, - 60.0, - 60.0 - ], - [ - '22', - 350.0, - 167.0, - 60.0, - 60.0 - ], - [ - '21', - 290.0, - 167.0, - 60.0, - 60.0 - ], - [ - '20', - 230.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1F', - 170.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1E', - 110.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1B', - 755.0, - 107.0, - 60.0, - 60.0 - ], - [ - '1A', - 695.0, - 107.0, - 60.0, - 60.0 - ], - [ - '19', - 635.0, - 107.0, - 60.0, - 60.0 - ], - [ - '18', - 575.0, - 107.0, - 60.0, - 60.0 - ], - [ - '17', - 515.0, - 107.0, - 60.0, - 60.0 - ], - [ - '16', - 455.0, - 107.0, - 60.0, - 60.0 - ], - [ - '15', - 395.0, - 107.0, - 60.0, - 60.0 - ], - [ - '14', - 335.0, - 107.0, - 60.0, - 60.0 - ], - [ - '13', - 275.0, - 107.0, - 60.0, - 60.0 - ], - [ - '12', - 215.0, - 107.0, - 60.0, - 60.0 - ], - [ - '11', - 155.0, - 107.0, - 60.0, - 60.0 - ], - [ - '10', - 95.0, - 107.0, - 60.0, - 60.0 - ] + ['43', 658.0, 6.0, 72.0, 35.0], ['44', 730.0, 6.0, 73.0, 35.0], + ['42', 585.0, 6.0, 73.0, 35.0], ['41', 513.0, 6.0, 72.0, 35.0], + ['40', 440.0, 6.0, 73.0, 35.0], ['3F', 368.0, 6.0, 72.0, 35.0], + ['3D', 223.0, 6.0, 72.0, 35.0], ['3E', 295.0, 6.0, 73.0, 35.0], + ['3C', 150.0, 6.0, 73.0, 35.0], ['3B', 77.0, 6.0, 73.0, 35.0], + ['00', 803.0, 6.0, 72.0, 35.0], ['01', 5.0, 6.0, 72.0, 35.0], + ['', 815.0, 107.0, 30.0, 60.0], ['73', 740.0, 227.0, 60.0, 60.0], + ['56', 80.0, 227.0, 60.0, 60.0], ['39', 245.0, 287.0, 330.0, 60.0], + ['0E', 785.0, 47.0, 90.0, 60.0], ['1C', 830.0, 107.0, 45.0, 120.0], + ['36', 800.0, 227.0, 75.0, 60.0], ['0F', 5.0, 107.0, 90.0, 60.0], + ['2A', 5.0, 227.0, 75.0, 60.0], ['E0 50', 755.0, 318.0, 60.0, 29.0], + ['E0 48', 755.0, 287.0, 60.0, 31.0], ['E0 4D', 815.0, 287.0, 60.0, 60.0], + ['E0 4B', 695.0, 287.0, 60.0, 60.0], ['E0 5B', 5.0, 167.0, 105.0, 60.0], + ['38', 125.0, 287.0, 120.0, 60.0], ['1D', 5.0, 287.0, 120.0, 60.0], + ['E0 1D', 635.0, 287.0, 60.0, 60.0], ['E0 38', 575.0, 287.0, 60.0, 60.0], + ['2B', 770.0, 167.0, 60.0, 60.0], ['0D', 725.0, 47.0, 60.0, 60.0], + ['0C', 665.0, 47.0, 60.0, 60.0], ['0B', 605.0, 47.0, 60.0, 60.0], + ['0A', 545.0, 47.0, 60.0, 60.0], ['09', 485.0, 47.0, 60.0, 60.0], + ['08', 425.0, 47.0, 60.0, 60.0], ['07', 365.0, 47.0, 60.0, 60.0], + ['06', 305.0, 47.0, 60.0, 60.0], ['05', 245.0, 47.0, 60.0, 60.0], + ['04', 185.0, 47.0, 60.0, 60.0], ['03', 125.0, 47.0, 60.0, 60.0], + ['02', 65.0, 47.0, 60.0, 60.0], ['29', 5.0, 47.0, 60.0, 60.0], + ['35', 680.0, 227.0, 60.0, 60.0], ['34', 620.0, 227.0, 60.0, 60.0], + ['33', 560.0, 227.0, 60.0, 60.0], ['32', 500.0, 227.0, 60.0, 60.0], + ['31', 440.0, 227.0, 60.0, 60.0], ['30', 380.0, 227.0, 60.0, 60.0], + ['2F', 320.0, 227.0, 60.0, 60.0], ['2E', 260.0, 227.0, 60.0, 60.0], + ['2D', 200.0, 227.0, 60.0, 60.0], ['2C', 140.0, 227.0, 60.0, 60.0], + ['28', 710.0, 167.0, 60.0, 60.0], ['27', 650.0, 167.0, 60.0, 60.0], + ['26', 590.0, 167.0, 60.0, 60.0], ['25', 530.0, 167.0, 60.0, 60.0], + ['24', 470.0, 167.0, 60.0, 60.0], ['23', 410.0, 167.0, 60.0, 60.0], + ['22', 350.0, 167.0, 60.0, 60.0], ['21', 290.0, 167.0, 60.0, 60.0], + ['20', 230.0, 167.0, 60.0, 60.0], ['1F', 170.0, 167.0, 60.0, 60.0], + ['1E', 110.0, 167.0, 60.0, 60.0], ['1B', 755.0, 107.0, 60.0, 60.0], + ['1A', 695.0, 107.0, 60.0, 60.0], ['19', 635.0, 107.0, 60.0, 60.0], + ['18', 575.0, 107.0, 60.0, 60.0], ['17', 515.0, 107.0, 60.0, 60.0], + ['16', 455.0, 107.0, 60.0, 60.0], ['15', 395.0, 107.0, 60.0, 60.0], + ['14', 335.0, 107.0, 60.0, 60.0], ['13', 275.0, 107.0, 60.0, 60.0], + ['12', 215.0, 107.0, 60.0, 60.0], ['11', 155.0, 107.0, 60.0, 60.0], + ['10', 95.0, 107.0, 60.0, 60.0] ], 'E': [ - [ - '43', - 658.0, - 6.0, - 72.0, - 35.0 - ], - [ - '44', - 730.0, - 6.0, - 73.0, - 35.0 - ], - [ - '42', - 585.0, - 6.0, - 73.0, - 35.0 - ], - [ - '41', - 513.0, - 6.0, - 72.0, - 35.0 - ], - [ - '40', - 440.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3F', - 368.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3D', - 223.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3E', - 295.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3C', - 150.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3B', - 77.0, - 6.0, - 73.0, - 35.0 - ], - [ - '00', - 803.0, - 6.0, - 72.0, - 35.0 - ], - [ - '01', - 5.0, - 6.0, - 72.0, - 35.0 - ], - [ - '56', - 80.0, - 227.0, - 60.0, - 60.0 - ], - [ - '39', - 245.0, - 287.0, - 330.0, - 60.0 - ], - [ - '0E', - 785.0, - 47.0, - 90.0, - 60.0 - ], - [ - '1C', - 'COMPOUND_ENTER_KEY' - ], - [ - '36', - 740.0, - 227.0, - 135.0, - 60.0 - ], - [ - '0F', - 5.0, - 107.0, - 90.0, - 60.0 - ], - [ - '2A', - 5.0, - 227.0, - 75.0, - 60.0 - ], - [ - 'E0 50', - 755.0, - 318.0, - 60.0, - 29.0 - ], - [ - 'E0 48', - 755.0, - 287.0, - 60.0, - 31.0 - ], - [ - 'E0 4D', - 815.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 4B', - 695.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 5B', - 5.0, - 167.0, - 105.0, - 60.0 - ], - [ - '38', - 125.0, - 287.0, - 120.0, - 60.0 - ], - [ - '1D', - 5.0, - 287.0, - 120.0, - 60.0 - ], - [ - 'E0 1D', - 635.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 38', - 575.0, - 287.0, - 60.0, - 60.0 - ], - [ - '2B', - 770.5, - 167.0, - 60.0, - 60.0 - ], - [ - '0D', - 725.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0C', - 665.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0B', - 605.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0A', - 545.0, - 47.0, - 60.0, - 60.0 - ], - [ - '09', - 485.0, - 47.0, - 60.0, - 60.0 - ], - [ - '08', - 425.0, - 47.0, - 60.0, - 60.0 - ], - [ - '07', - 365.0, - 47.0, - 60.0, - 60.0 - ], - [ - '06', - 305.0, - 47.0, - 60.0, - 60.0 - ], - [ - '05', - 245.0, - 47.0, - 60.0, - 60.0 - ], - [ - '04', - 185.0, - 47.0, - 60.0, - 60.0 - ], - [ - '03', - 125.0, - 47.0, - 60.0, - 60.0 - ], - [ - '02', - 65.0, - 47.0, - 60.0, - 60.0 - ], - [ - '29', - 5.0, - 47.0, - 60.0, - 60.0 - ], - [ - '35', - 680.0, - 227.0, - 60.0, - 60.0 - ], - [ - '34', - 620.0, - 227.0, - 60.0, - 60.0 - ], - [ - '33', - 560.0, - 227.0, - 60.0, - 60.0 - ], - [ - '32', - 500.0, - 227.0, - 60.0, - 60.0 - ], - [ - '31', - 440.0, - 227.0, - 60.0, - 60.0 - ], - [ - '30', - 380.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2F', - 320.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2E', - 260.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2D', - 200.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2C', - 140.0, - 227.0, - 60.0, - 60.0 - ], - [ - '28', - 710.0, - 167.0, - 60.0, - 60.0 - ], - [ - '27', - 650.0, - 167.0, - 60.0, - 60.0 - ], - [ - '26', - 590.0, - 167.0, - 60.0, - 60.0 - ], - [ - '25', - 530.0, - 167.0, - 60.0, - 60.0 - ], - [ - '24', - 470.0, - 167.0, - 60.0, - 60.0 - ], - [ - '23', - 410.0, - 167.0, - 60.0, - 60.0 - ], - [ - '22', - 350.0, - 167.0, - 60.0, - 60.0 - ], - [ - '21', - 290.0, - 167.0, - 60.0, - 60.0 - ], - [ - '20', - 230.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1F', - 170.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1E', - 110.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1B', - 755.0, - 107.0, - 60.0, - 60.0 - ], - [ - '1A', - 695.0, - 107.0, - 60.0, - 60.0 - ], - [ - '19', - 635.0, - 107.0, - 60.0, - 60.0 - ], - [ - '18', - 575.0, - 107.0, - 60.0, - 60.0 - ], - [ - '17', - 515.0, - 107.0, - 60.0, - 60.0 - ], - [ - '16', - 455.0, - 107.0, - 60.0, - 60.0 - ], - [ - '15', - 395.0, - 107.0, - 60.0, - 60.0 - ], - [ - '14', - 335.0, - 107.0, - 60.0, - 60.0 - ], - [ - '13', - 275.0, - 107.0, - 60.0, - 60.0 - ], - [ - '12', - 215.0, - 107.0, - 60.0, - 60.0 - ], - [ - '11', - 155.0, - 107.0, - 60.0, - 60.0 - ], - [ - '10', - 95.0, - 107.0, - 60.0, - 60.0 - ] + ['43', 658.0, 6.0, 72.0, 35.0], ['44', 730.0, 6.0, 73.0, 35.0], + ['42', 585.0, 6.0, 73.0, 35.0], ['41', 513.0, 6.0, 72.0, 35.0], + ['40', 440.0, 6.0, 73.0, 35.0], ['3F', 368.0, 6.0, 72.0, 35.0], + ['3D', 223.0, 6.0, 72.0, 35.0], ['3E', 295.0, 6.0, 73.0, 35.0], + ['3C', 150.0, 6.0, 73.0, 35.0], ['3B', 77.0, 6.0, 73.0, 35.0], + ['00', 803.0, 6.0, 72.0, 35.0], ['01', 5.0, 6.0, 72.0, 35.0], + ['56', 80.0, 227.0, 60.0, 60.0], ['39', 245.0, 287.0, 330.0, 60.0], + ['0E', 785.0, 47.0, 90.0, 60.0], ['1C', 'COMPOUND_ENTER_KEY'], + ['36', 740.0, 227.0, 135.0, 60.0], ['0F', 5.0, 107.0, 90.0, 60.0], + ['2A', 5.0, 227.0, 75.0, 60.0], ['E0 50', 755.0, 318.0, 60.0, 29.0], + ['E0 48', 755.0, 287.0, 60.0, 31.0], ['E0 4D', 815.0, 287.0, 60.0, 60.0], + ['E0 4B', 695.0, 287.0, 60.0, 60.0], ['E0 5B', 5.0, 167.0, 105.0, 60.0], + ['38', 125.0, 287.0, 120.0, 60.0], ['1D', 5.0, 287.0, 120.0, 60.0], + ['E0 1D', 635.0, 287.0, 60.0, 60.0], ['E0 38', 575.0, 287.0, 60.0, 60.0], + ['2B', 770.5, 167.0, 60.0, 60.0], ['0D', 725.0, 47.0, 60.0, 60.0], + ['0C', 665.0, 47.0, 60.0, 60.0], ['0B', 605.0, 47.0, 60.0, 60.0], + ['0A', 545.0, 47.0, 60.0, 60.0], ['09', 485.0, 47.0, 60.0, 60.0], + ['08', 425.0, 47.0, 60.0, 60.0], ['07', 365.0, 47.0, 60.0, 60.0], + ['06', 305.0, 47.0, 60.0, 60.0], ['05', 245.0, 47.0, 60.0, 60.0], + ['04', 185.0, 47.0, 60.0, 60.0], ['03', 125.0, 47.0, 60.0, 60.0], + ['02', 65.0, 47.0, 60.0, 60.0], ['29', 5.0, 47.0, 60.0, 60.0], + ['35', 680.0, 227.0, 60.0, 60.0], ['34', 620.0, 227.0, 60.0, 60.0], + ['33', 560.0, 227.0, 60.0, 60.0], ['32', 500.0, 227.0, 60.0, 60.0], + ['31', 440.0, 227.0, 60.0, 60.0], ['30', 380.0, 227.0, 60.0, 60.0], + ['2F', 320.0, 227.0, 60.0, 60.0], ['2E', 260.0, 227.0, 60.0, 60.0], + ['2D', 200.0, 227.0, 60.0, 60.0], ['2C', 140.0, 227.0, 60.0, 60.0], + ['28', 710.0, 167.0, 60.0, 60.0], ['27', 650.0, 167.0, 60.0, 60.0], + ['26', 590.0, 167.0, 60.0, 60.0], ['25', 530.0, 167.0, 60.0, 60.0], + ['24', 470.0, 167.0, 60.0, 60.0], ['23', 410.0, 167.0, 60.0, 60.0], + ['22', 350.0, 167.0, 60.0, 60.0], ['21', 290.0, 167.0, 60.0, 60.0], + ['20', 230.0, 167.0, 60.0, 60.0], ['1F', 170.0, 167.0, 60.0, 60.0], + ['1E', 110.0, 167.0, 60.0, 60.0], ['1B', 755.0, 107.0, 60.0, 60.0], + ['1A', 695.0, 107.0, 60.0, 60.0], ['19', 635.0, 107.0, 60.0, 60.0], + ['18', 575.0, 107.0, 60.0, 60.0], ['17', 515.0, 107.0, 60.0, 60.0], + ['16', 455.0, 107.0, 60.0, 60.0], ['15', 395.0, 107.0, 60.0, 60.0], + ['14', 335.0, 107.0, 60.0, 60.0], ['13', 275.0, 107.0, 60.0, 60.0], + ['12', 215.0, 107.0, 60.0, 60.0], ['11', 155.0, 107.0, 60.0, 60.0], + ['10', 95.0, 107.0, 60.0, 60.0] ], 'J': [ - [ - '43', - 658.0, - 6.0, - 72.0, - 35.0 - ], - [ - '44', - 730.0, - 6.0, - 73.0, - 35.0 - ], - [ - '42', - 585.0, - 6.0, - 73.0, - 35.0 - ], - [ - '41', - 513.0, - 6.0, - 72.0, - 35.0 - ], - [ - '40', - 440.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3F', - 368.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3D', - 223.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3E', - 295.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3C', - 150.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3B', - 77.0, - 6.0, - 73.0, - 35.0 - ], - [ - '00', - 803.0, - 6.0, - 72.0, - 35.0 - ], - [ - '01', - 5.0, - 6.0, - 72.0, - 35.0 - ], - [ - '', - 800.0, - 107.0, - 30.0, - 60.0 - ], - [ - '73', - 725.0, - 227.0, - 60.0, - 60.0 - ], - [ - '39', - 260.0, - 287.0, - 240.0, - 60.0 - ], - [ - '79', - 500.0, - 287.0, - 75.0, - 60.0 - ], - [ - '7B', - 185.0, - 287.0, - 75.0, - 60.0 - ], - [ - '7D', - 759.0, - 47.0, - 56.0, - 60.0 - ], - [ - '0E', - 815.0, - 47.0, - 60.0, - 60.0 - ], - [ - '1C', - 815.0, - 107.0, - 60.0, - 120.0 - ], - [ - '36', - 785.0, - 227.0, - 90.0, - 60.0 - ], - [ - '0F', - 5.0, - 107.0, - 75.0, - 60.0 - ], - [ - '2A', - 5.0, - 227.0, - 120.0, - 60.0 - ], - [ - 'E0 50', - 755.0, - 318.0, - 60.0, - 29.0 - ], - [ - 'E0 48', - 755.0, - 287.0, - 60.0, - 31.0 - ], - [ - 'E0 4D', - 815.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 4B', - 695.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 5B', - 5.0, - 167.0, - 90.0, - 60.0 - ], - [ - '38', - 95.0, - 287.0, - 90.0, - 60.0 - ], - [ - '1D', - 5.0, - 287.0, - 90.0, - 60.0 - ], - [ - 'E0 1D', - 635.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 38', - 575.0, - 287.0, - 60.0, - 60.0 - ], - [ - '2B', - 755.0, - 167.0, - 60.0, - 60.0 - ], - [ - '0D', - 701.0, - 47.0, - 58.0, - 60.0 - ], - [ - '0C', - 643.0, - 47.0, - 58.0, - 60.0 - ], - [ - '0B', - 585.0, - 47.0, - 58.0, - 60.0 - ], - [ - '0A', - 527.0, - 47.0, - 58.0, - 60.0 - ], - [ - '09', - 469.0, - 47.0, - 58.0, - 60.0 - ], - [ - '08', - 411.0, - 47.0, - 58.0, - 60.0 - ], - [ - '07', - 353.0, - 47.0, - 58.0, - 60.0 - ], - [ - '06', - 295.0, - 47.0, - 58.0, - 60.0 - ], - [ - '05', - 237.0, - 47.0, - 58.0, - 60.0 - ], - [ - '04', - 179.0, - 47.0, - 58.0, - 60.0 - ], - [ - '03', - 121.0, - 47.0, - 58.0, - 60.0 - ], - [ - '02', - 63.0, - 47.0, - 58.0, - 60.0 - ], - [ - '29', - 5.0, - 47.0, - 58.0, - 60.0 - ], - [ - '35', - 665.0, - 227.0, - 60.0, - 60.0 - ], - [ - '34', - 605.0, - 227.0, - 60.0, - 60.0 - ], - [ - '33', - 545.0, - 227.0, - 60.0, - 60.0 - ], - [ - '32', - 485.0, - 227.0, - 60.0, - 60.0 - ], - [ - '31', - 425.0, - 227.0, - 60.0, - 60.0 - ], - [ - '30', - 365.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2F', - 305.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2E', - 245.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2D', - 185.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2C', - 125.0, - 227.0, - 60.0, - 60.0 - ], - [ - '28', - 695.0, - 167.0, - 60.0, - 60.0 - ], - [ - '27', - 635.0, - 167.0, - 60.0, - 60.0 - ], - [ - '26', - 575.0, - 167.0, - 60.0, - 60.0 - ], - [ - '25', - 515.0, - 167.0, - 60.0, - 60.0 - ], - [ - '24', - 455.0, - 167.0, - 60.0, - 60.0 - ], - [ - '23', - 395.0, - 167.0, - 60.0, - 60.0 - ], - [ - '22', - 335.0, - 167.0, - 60.0, - 60.0 - ], - [ - '21', - 275.0, - 167.0, - 60.0, - 60.0 - ], - [ - '20', - 215.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1F', - 155.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1E', - 95.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1B', - 740.0, - 107.0, - 60.0, - 60.0 - ], - [ - '1A', - 680.0, - 107.0, - 60.0, - 60.0 - ], - [ - '19', - 620.0, - 107.0, - 60.0, - 60.0 - ], - [ - '18', - 560.0, - 107.0, - 60.0, - 60.0 - ], - [ - '17', - 500.0, - 107.0, - 60.0, - 60.0 - ], - [ - '16', - 440.0, - 107.0, - 60.0, - 60.0 - ], - [ - '15', - 380.0, - 107.0, - 60.0, - 60.0 - ], - [ - '14', - 320.0, - 107.0, - 60.0, - 60.0 - ], - [ - '13', - 260.0, - 107.0, - 60.0, - 60.0 - ], - [ - '12', - 200.0, - 107.0, - 60.0, - 60.0 - ], - [ - '11', - 140.0, - 107.0, - 60.0, - 60.0 - ], - [ - '10', - 80.0, - 107.0, - 60.0, - 60.0 - ] + ['43', 658.0, 6.0, 72.0, 35.0], ['44', 730.0, 6.0, 73.0, 35.0], + ['42', 585.0, 6.0, 73.0, 35.0], ['41', 513.0, 6.0, 72.0, 35.0], + ['40', 440.0, 6.0, 73.0, 35.0], ['3F', 368.0, 6.0, 72.0, 35.0], + ['3D', 223.0, 6.0, 72.0, 35.0], ['3E', 295.0, 6.0, 73.0, 35.0], + ['3C', 150.0, 6.0, 73.0, 35.0], ['3B', 77.0, 6.0, 73.0, 35.0], + ['00', 803.0, 6.0, 72.0, 35.0], ['01', 5.0, 6.0, 72.0, 35.0], + ['', 800.0, 107.0, 30.0, 60.0], ['73', 725.0, 227.0, 60.0, 60.0], + ['39', 260.0, 287.0, 240.0, 60.0], ['79', 500.0, 287.0, 75.0, 60.0], + ['7B', 185.0, 287.0, 75.0, 60.0], ['7D', 759.0, 47.0, 56.0, 60.0], + ['0E', 815.0, 47.0, 60.0, 60.0], ['1C', 815.0, 107.0, 60.0, 120.0], + ['36', 785.0, 227.0, 90.0, 60.0], ['0F', 5.0, 107.0, 75.0, 60.0], + ['2A', 5.0, 227.0, 120.0, 60.0], ['E0 50', 755.0, 318.0, 60.0, 29.0], + ['E0 48', 755.0, 287.0, 60.0, 31.0], ['E0 4D', 815.0, 287.0, 60.0, 60.0], + ['E0 4B', 695.0, 287.0, 60.0, 60.0], ['E0 5B', 5.0, 167.0, 90.0, 60.0], + ['38', 95.0, 287.0, 90.0, 60.0], ['1D', 5.0, 287.0, 90.0, 60.0], + ['E0 1D', 635.0, 287.0, 60.0, 60.0], ['E0 38', 575.0, 287.0, 60.0, 60.0], + ['2B', 755.0, 167.0, 60.0, 60.0], ['0D', 701.0, 47.0, 58.0, 60.0], + ['0C', 643.0, 47.0, 58.0, 60.0], ['0B', 585.0, 47.0, 58.0, 60.0], + ['0A', 527.0, 47.0, 58.0, 60.0], ['09', 469.0, 47.0, 58.0, 60.0], + ['08', 411.0, 47.0, 58.0, 60.0], ['07', 353.0, 47.0, 58.0, 60.0], + ['06', 295.0, 47.0, 58.0, 60.0], ['05', 237.0, 47.0, 58.0, 60.0], + ['04', 179.0, 47.0, 58.0, 60.0], ['03', 121.0, 47.0, 58.0, 60.0], + ['02', 63.0, 47.0, 58.0, 60.0], ['29', 5.0, 47.0, 58.0, 60.0], + ['35', 665.0, 227.0, 60.0, 60.0], ['34', 605.0, 227.0, 60.0, 60.0], + ['33', 545.0, 227.0, 60.0, 60.0], ['32', 485.0, 227.0, 60.0, 60.0], + ['31', 425.0, 227.0, 60.0, 60.0], ['30', 365.0, 227.0, 60.0, 60.0], + ['2F', 305.0, 227.0, 60.0, 60.0], ['2E', 245.0, 227.0, 60.0, 60.0], + ['2D', 185.0, 227.0, 60.0, 60.0], ['2C', 125.0, 227.0, 60.0, 60.0], + ['28', 695.0, 167.0, 60.0, 60.0], ['27', 635.0, 167.0, 60.0, 60.0], + ['26', 575.0, 167.0, 60.0, 60.0], ['25', 515.0, 167.0, 60.0, 60.0], + ['24', 455.0, 167.0, 60.0, 60.0], ['23', 395.0, 167.0, 60.0, 60.0], + ['22', 335.0, 167.0, 60.0, 60.0], ['21', 275.0, 167.0, 60.0, 60.0], + ['20', 215.0, 167.0, 60.0, 60.0], ['1F', 155.0, 167.0, 60.0, 60.0], + ['1E', 95.0, 167.0, 60.0, 60.0], ['1B', 740.0, 107.0, 60.0, 60.0], + ['1A', 680.0, 107.0, 60.0, 60.0], ['19', 620.0, 107.0, 60.0, 60.0], + ['18', 560.0, 107.0, 60.0, 60.0], ['17', 500.0, 107.0, 60.0, 60.0], + ['16', 440.0, 107.0, 60.0, 60.0], ['15', 380.0, 107.0, 60.0, 60.0], + ['14', 320.0, 107.0, 60.0, 60.0], ['13', 260.0, 107.0, 60.0, 60.0], + ['12', 200.0, 107.0, 60.0, 60.0], ['11', 140.0, 107.0, 60.0, 60.0], + ['10', 80.0, 107.0, 60.0, 60.0] ], 'U': [ - [ - '39', - 245.0, - 287.0, - 330.0, - 60.0 - ], - [ - '43', - 658.0, - 6.0, - 72.0, - 35.0 - ], - [ - '44', - 730.0, - 6.0, - 73.0, - 35.0 - ], - [ - '42', - 585.0, - 6.0, - 73.0, - 35.0 - ], - [ - '41', - 513.0, - 6.0, - 72.0, - 35.0 - ], - [ - '40', - 440.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3F', - 368.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3D', - 223.0, - 6.0, - 72.0, - 35.0 - ], - [ - '3E', - 295.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3C', - 150.0, - 6.0, - 73.0, - 35.0 - ], - [ - '3B', - 77.0, - 6.0, - 73.0, - 35.0 - ], - [ - '00', - 803.0, - 6.0, - 72.0, - 35.0 - ], - [ - '01', - 5.0, - 6.0, - 72.0, - 35.0 - ], - [ - '0E', - 785.0, - 47.0, - 90.0, - 60.0 - ], - [ - '1C', - 770.0, - 167.0, - 105.0, - 60.0 - ], - [ - '36', - 740.0, - 227.0, - 135.0, - 60.0 - ], - [ - '0F', - 5.0, - 107.0, - 90.0, - 60.0 - ], - [ - '2A', - 5.0, - 227.0, - 135.0, - 60.0 - ], - [ - 'E0 50', - 755.0, - 318.0, - 60.0, - 29.0 - ], - [ - 'E0 48', - 755.0, - 287.0, - 60.0, - 31.0 - ], - [ - 'E0 4D', - 815.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 4B', - 695.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 5B', - 5.0, - 167.0, - 105.0, - 60.0 - ], - [ - '38', - 125.0, - 287.0, - 120.0, - 60.0 - ], - [ - '1D', - 5.0, - 287.0, - 120.0, - 60.0 - ], - [ - 'E0 1D', - 635.0, - 287.0, - 60.0, - 60.0 - ], - [ - 'E0 38', - 575.0, - 287.0, - 60.0, - 60.0 - ], - [ - '2B', - 815.0, - 107.0, - 60.0, - 60.0 - ], - [ - '0D', - 725.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0C', - 665.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0B', - 605.0, - 47.0, - 60.0, - 60.0 - ], - [ - '0A', - 545.0, - 47.0, - 60.0, - 60.0 - ], - [ - '09', - 485.0, - 47.0, - 60.0, - 60.0 - ], - [ - '08', - 425.0, - 47.0, - 60.0, - 60.0 - ], - [ - '07', - 365.0, - 47.0, - 60.0, - 60.0 - ], - [ - '06', - 305.0, - 47.0, - 60.0, - 60.0 - ], - [ - '05', - 245.0, - 47.0, - 60.0, - 60.0 - ], - [ - '04', - 185.0, - 47.0, - 60.0, - 60.0 - ], - [ - '03', - 125.0, - 47.0, - 60.0, - 60.0 - ], - [ - '02', - 65.0, - 47.0, - 60.0, - 60.0 - ], - [ - '29', - 5.0, - 47.0, - 60.0, - 60.0 - ], - [ - '35', - 680.0, - 227.0, - 60.0, - 60.0 - ], - [ - '34', - 620.0, - 227.0, - 60.0, - 60.0 - ], - [ - '33', - 560.0, - 227.0, - 60.0, - 60.0 - ], - [ - '32', - 500.0, - 227.0, - 60.0, - 60.0 - ], - [ - '31', - 440.0, - 227.0, - 60.0, - 60.0 - ], - [ - '30', - 380.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2F', - 320.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2E', - 260.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2D', - 200.0, - 227.0, - 60.0, - 60.0 - ], - [ - '2C', - 140.0, - 227.0, - 60.0, - 60.0 - ], - [ - '28', - 710.0, - 167.0, - 60.0, - 60.0 - ], - [ - '27', - 650.0, - 167.0, - 60.0, - 60.0 - ], - [ - '26', - 590.0, - 167.0, - 60.0, - 60.0 - ], - [ - '25', - 530.0, - 167.0, - 60.0, - 60.0 - ], - [ - '24', - 470.0, - 167.0, - 60.0, - 60.0 - ], - [ - '23', - 410.0, - 167.0, - 60.0, - 60.0 - ], - [ - '22', - 350.0, - 167.0, - 60.0, - 60.0 - ], - [ - '21', - 290.0, - 167.0, - 60.0, - 60.0 - ], - [ - '20', - 230.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1F', - 170.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1E', - 110.0, - 167.0, - 60.0, - 60.0 - ], - [ - '1B', - 755.0, - 107.0, - 60.0, - 60.0 - ], - [ - '1A', - 695.0, - 107.0, - 60.0, - 60.0 - ], - [ - '19', - 635.0, - 107.0, - 60.0, - 60.0 - ], - [ - '18', - 575.0, - 107.0, - 60.0, - 60.0 - ], - [ - '17', - 515.0, - 107.0, - 60.0, - 60.0 - ], - [ - '16', - 455.0, - 107.0, - 60.0, - 60.0 - ], - [ - '15', - 395.0, - 107.0, - 60.0, - 60.0 - ], - [ - '14', - 335.0, - 107.0, - 60.0, - 60.0 - ], - [ - '13', - 275.0, - 107.0, - 60.0, - 60.0 - ], - [ - '12', - 215.0, - 107.0, - 60.0, - 60.0 - ], - [ - '11', - 155.0, - 107.0, - 60.0, - 60.0 - ], - [ - '10', - 95.0, - 107.0, - 60.0, - 60.0 - ] + ['39', 245.0, 287.0, 330.0, 60.0], ['43', 658.0, 6.0, 72.0, 35.0], + ['44', 730.0, 6.0, 73.0, 35.0], ['42', 585.0, 6.0, 73.0, 35.0], + ['41', 513.0, 6.0, 72.0, 35.0], ['40', 440.0, 6.0, 73.0, 35.0], + ['3F', 368.0, 6.0, 72.0, 35.0], ['3D', 223.0, 6.0, 72.0, 35.0], + ['3E', 295.0, 6.0, 73.0, 35.0], ['3C', 150.0, 6.0, 73.0, 35.0], + ['3B', 77.0, 6.0, 73.0, 35.0], ['00', 803.0, 6.0, 72.0, 35.0], + ['01', 5.0, 6.0, 72.0, 35.0], ['0E', 785.0, 47.0, 90.0, 60.0], + ['1C', 770.0, 167.0, 105.0, 60.0], ['36', 740.0, 227.0, 135.0, 60.0], + ['0F', 5.0, 107.0, 90.0, 60.0], ['2A', 5.0, 227.0, 135.0, 60.0], + ['E0 50', 755.0, 318.0, 60.0, 29.0], ['E0 48', 755.0, 287.0, 60.0, 31.0], + ['E0 4D', 815.0, 287.0, 60.0, 60.0], ['E0 4B', 695.0, 287.0, 60.0, 60.0], + ['E0 5B', 5.0, 167.0, 105.0, 60.0], ['38', 125.0, 287.0, 120.0, 60.0], + ['1D', 5.0, 287.0, 120.0, 60.0], ['E0 1D', 635.0, 287.0, 60.0, 60.0], + ['E0 38', 575.0, 287.0, 60.0, 60.0], ['2B', 815.0, 107.0, 60.0, 60.0], + ['0D', 725.0, 47.0, 60.0, 60.0], ['0C', 665.0, 47.0, 60.0, 60.0], + ['0B', 605.0, 47.0, 60.0, 60.0], ['0A', 545.0, 47.0, 60.0, 60.0], + ['09', 485.0, 47.0, 60.0, 60.0], ['08', 425.0, 47.0, 60.0, 60.0], + ['07', 365.0, 47.0, 60.0, 60.0], ['06', 305.0, 47.0, 60.0, 60.0], + ['05', 245.0, 47.0, 60.0, 60.0], ['04', 185.0, 47.0, 60.0, 60.0], + ['03', 125.0, 47.0, 60.0, 60.0], ['02', 65.0, 47.0, 60.0, 60.0], + ['29', 5.0, 47.0, 60.0, 60.0], ['35', 680.0, 227.0, 60.0, 60.0], + ['34', 620.0, 227.0, 60.0, 60.0], ['33', 560.0, 227.0, 60.0, 60.0], + ['32', 500.0, 227.0, 60.0, 60.0], ['31', 440.0, 227.0, 60.0, 60.0], + ['30', 380.0, 227.0, 60.0, 60.0], ['2F', 320.0, 227.0, 60.0, 60.0], + ['2E', 260.0, 227.0, 60.0, 60.0], ['2D', 200.0, 227.0, 60.0, 60.0], + ['2C', 140.0, 227.0, 60.0, 60.0], ['28', 710.0, 167.0, 60.0, 60.0], + ['27', 650.0, 167.0, 60.0, 60.0], ['26', 590.0, 167.0, 60.0, 60.0], + ['25', 530.0, 167.0, 60.0, 60.0], ['24', 470.0, 167.0, 60.0, 60.0], + ['23', 410.0, 167.0, 60.0, 60.0], ['22', 350.0, 167.0, 60.0, 60.0], + ['21', 290.0, 167.0, 60.0, 60.0], ['20', 230.0, 167.0, 60.0, 60.0], + ['1F', 170.0, 167.0, 60.0, 60.0], ['1E', 110.0, 167.0, 60.0, 60.0], + ['1B', 755.0, 107.0, 60.0, 60.0], ['1A', 695.0, 107.0, 60.0, 60.0], + ['19', 635.0, 107.0, 60.0, 60.0], ['18', 575.0, 107.0, 60.0, 60.0], + ['17', 515.0, 107.0, 60.0, 60.0], ['16', 455.0, 107.0, 60.0, 60.0], + ['15', 395.0, 107.0, 60.0, 60.0], ['14', 335.0, 107.0, 60.0, 60.0], + ['13', 275.0, 107.0, 60.0, 60.0], ['12', 215.0, 107.0, 60.0, 60.0], + ['11', 155.0, 107.0, 60.0, 60.0], ['10', 95.0, 107.0, 60.0, 60.0] ] }, 'shortcut': { @@ -15849,7 +4202,7 @@ 'f4<>SEARCH': 'keyboardOverlayFullScreenKeyLabel', 'f5<>CTRL<>SEARCH': 'keyboardOverlayTakeScreenshot', 'f5<>CTRL<>SEARCH<>SHIFT': 'keyboardOverlayScreenshotRegion', - 'f5<>ALT<>CTRL<>SEARCH' : 'keyboardOverlayScreenshotWindow', + 'f5<>ALT<>CTRL<>SEARCH': 'keyboardOverlayScreenshotWindow', 'f5<>SEARCH': 'keyboardOverlaySwitchWinKeyLabel', 'f6<>ALT<>SEARCH': 'keyboardOverlayDecreaseKeyBrightness', 'f6<>ALT<>CTRL<>SEARCH': 'keyboardOverlayMagnifierDecreaseZoom',
diff --git a/chrome/browser/resources/chromeos/login/apps_menu.js b/chrome/browser/resources/chromeos/login/apps_menu.js index 7fe35f5..cec900db 100644 --- a/chrome/browser/resources/chromeos/login/apps_menu.js +++ b/chrome/browser/resources/chromeos/login/apps_menu.js
@@ -110,8 +110,8 @@ } this.confirmDiagnosticMode_.show( - loadTimeData.getStringF('confirmKioskAppDiagnosticModeFormat', - app.label), + loadTimeData.getStringF( + 'confirmKioskAppDiagnosticModeFormat', app.label), function() { chrome.send('launchKioskApp', [app.id, true]); }); @@ -150,11 +150,9 @@ AppsMenuButton.showError = function(message) { /** @const */ var BUBBLE_OFFSET = 25; /** @const */ var BUBBLE_PADDING = 12; - $('bubble').showTextForElement($('show-apps-button'), - message, - cr.ui.Bubble.Attachment.TOP, - BUBBLE_OFFSET, - BUBBLE_PADDING); + $('bubble').showTextForElement( + $('show-apps-button'), message, cr.ui.Bubble.Attachment.TOP, + BUBBLE_OFFSET, BUBBLE_PADDING); }; @@ -168,7 +166,5 @@ $('show-apps-button').findAndRunAppForTesting(id, opt_diagnostic_mode); }; - return { - AppsMenuButton: AppsMenuButton - }; + return {AppsMenuButton: AppsMenuButton}; });
diff --git a/chrome/browser/resources/chromeos/login/arc_terms_of_service.js b/chrome/browser/resources/chromeos/login/arc_terms_of_service.js index a4cce26..a54a0a9 100644 --- a/chrome/browser/resources/chromeos/login/arc_terms_of_service.js +++ b/chrome/browser/resources/chromeos/login/arc_terms_of_service.js
@@ -40,7 +40,7 @@ * * @private */ - onAccept_ : function() { + onAccept_: function() { this.screen.onAccept(); }, @@ -49,7 +49,7 @@ * * @private */ - onRetry_ : function() { + onRetry_: function() { this.screen.reloadPlayStore(); }, @@ -58,7 +58,7 @@ * * @private */ - onSkip_ : function() { + onSkip_: function() { this.screen.onSkip(); } });
diff --git a/chrome/browser/resources/chromeos/login/controller-pairing-screen.js b/chrome/browser/resources/chromeos/login/controller-pairing-screen.js index 5bcf30f..f3808be 100644 --- a/chrome/browser/resources/chromeos/login/controller-pairing-screen.js +++ b/chrome/browser/resources/chromeos/login/controller-pairing-screen.js
@@ -3,24 +3,19 @@ // found in the LICENSE file. Polymer((function() { - /** @const */ var ICON_COLORS = ['#F0B9CB', '#F0ACC3', '#F098B6', '#F084A9', - '#F06D99', '#F05287', '#F0467F', '#F03473', - '#F01E65', '#F00051']; + /** @const */ var ICON_COLORS = [ + '#F0B9CB', '#F0ACC3', '#F098B6', '#F084A9', '#F06D99', '#F05287', '#F0467F', + '#F03473', '#F01E65', '#F00051' + ]; return { is: 'pairing-device-list', properties: { devices: Array, - selected: { - type: String, - notify: true - }, + selected: {type: String, notify: true}, - connecting: { - type: Boolean, - reflectToAttribute: true - } + connecting: {type: Boolean, reflectToAttribute: true} }, getStyleForDeviceIcon_: function(deviceName) { @@ -46,15 +41,9 @@ animationConfig: { value: function() { return { - 'entry': [{ - name: 'fade-in-animation', - node: this - }], + 'entry': [{name: 'fade-in-animation', node: this}], - 'exit': [{ - name: 'fade-out-animation', - node: this - }] + 'exit': [{name: 'fade-out-animation', node: this}] }; } } @@ -77,20 +66,12 @@ return { is: 'controller-pairing-screen', - behaviors: [ - login.OobeScreenBehavior - ], + behaviors: [login.OobeScreenBehavior], - properties: { - selectedDevice: { - type: String, - observer: 'selectedDeviceChanged_' - } - }, + properties: + {selectedDevice: {type: String, observer: 'selectedDeviceChanged_'}}, - observers: [ - 'deviceListChanged_(C.devices)' - ], + observers: ['deviceListChanged_(C.devices)'], ready: function() { /** @@ -100,17 +81,17 @@ */ var pages = this.$.pages; delete pages._squelchNextFinishEvent; - Object.defineProperty(pages, '_squelchNextFinishEvent', - { get: function() { return false; } }); + Object.defineProperty(pages, '_squelchNextFinishEvent', { + get: function() { + return false; + } + }); }, /** @override */ initialize: function() { - ['code', - 'controlsDisabled', - 'devices', - 'enrollmentDomain', - 'page'].forEach(this.registerBoundContextField, this); + ['code', 'controlsDisabled', 'devices', 'enrollmentDomain', 'page'] + .forEach(this.registerBoundContextField, this); this.context.set(CONTEXT_KEY_CONTROLS_DISABLED, true); this.commitContextChanges(); }, @@ -124,8 +105,8 @@ }, selectedDeviceChanged_: function(selectedDevice) { - this.context.set(CONTEXT_KEY_SELECTED_DEVICE, - selectedDevice ? selectedDevice : ''); + this.context.set( + CONTEXT_KEY_SELECTED_DEVICE, selectedDevice ? selectedDevice : ''); this.commitContextChanges(); }, @@ -134,13 +115,13 @@ }, getHostEnrollmentStepTitle_: function(domain) { - return this.i18n(['loginControllerPairingScreenEnrollmentInProgress', - domain]); + return this.i18n( + ['loginControllerPairingScreenEnrollmentInProgress', domain]); }, getSuccessMessage_: function(selectedDevice) { - return this.i18n(['loginControllerPairingScreenSuccessText', - selectedDevice]); + return this.i18n( + ['loginControllerPairingScreenSuccessText', selectedDevice]); } }; })());
diff --git a/chrome/browser/resources/chromeos/login/encryption_migration.js b/chrome/browser/resources/chromeos/login/encryption_migration.js index c166910..eb750895 100644 --- a/chrome/browser/resources/chromeos/login/encryption_migration.js +++ b/chrome/browser/resources/chromeos/login/encryption_migration.js
@@ -30,67 +30,43 @@ * Current UI state which corresponds to a sub step in migration process. * @type {EncryptionMigrationUIState} */ - uiState: { - type: Number, - value: 0 - }, + uiState: {type: Number, value: 0}, /** * Current migration progress in range [0, 1]. Negative value means that * the progress is unknown. */ - progress: { - type: Number, - value: -1 - }, + progress: {type: Number, value: -1}, /** * Whether the current migration is resuming the previous one. */ - isResuming: { - type: Boolean, - value: false - }, + isResuming: {type: Boolean, value: false}, /** * Battery level. */ - batteryPercent: { - type: Number, - value: 0 - }, + batteryPercent: {type: Number, value: 0}, /** * True if the battery level is enough to start migration. */ - isEnoughBattery: { - type: Boolean, - value: true - }, + isEnoughBattery: {type: Boolean, value: true}, /** * True if the device is charging. */ - isCharging: { - type: Boolean, - value: false - }, + isCharging: {type: Boolean, value: false}, /** * Formatted string of the current available space size. */ - availableSpaceInString: { - type: String, - value: '' - }, + availableSpaceInString: {type: String, value: ''}, /** * Formatted string of the necessary space size for migration. */ - necessarySpaceInString: { - type: String, - value: '' - }, + necessarySpaceInString: {type: String, value: ''}, }, /**
diff --git a/chrome/browser/resources/chromeos/login/gaia_buttons.js b/chrome/browser/resources/chromeos/login/gaia_buttons.js index 2c371d2..5e91f9f3 100644 --- a/chrome/browser/resources/chromeos/login/gaia_buttons.js +++ b/chrome/browser/resources/chromeos/login/gaia_buttons.js
@@ -6,11 +6,7 @@ is: 'gaia-button', properties: { - disabled: { - type: Boolean, - value: false, - reflectToAttribute: true - }, + disabled: {type: Boolean, value: false, reflectToAttribute: true}, type: { type: String, @@ -21,7 +17,7 @@ }, focus: function() { - this.$.button.focus(); + this.$.button.focus(); }, focusedChanged_: function() { @@ -47,11 +43,7 @@ is: 'gaia-icon-button', properties: { - disabled: { - type: Boolean, - value: false, - reflectToAttribute: true - }, + disabled: {type: Boolean, value: false, reflectToAttribute: true}, icon: String,
diff --git a/chrome/browser/resources/chromeos/login/gaia_card.js b/chrome/browser/resources/chromeos/login/gaia_card.js index 7dd2a42..aa2d135 100644 --- a/chrome/browser/resources/chromeos/login/gaia_card.js +++ b/chrome/browser/resources/chromeos/login/gaia_card.js
@@ -2,6 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -Polymer({ - is: 'gaia-card' -}); +Polymer({is: 'gaia-card'});
diff --git a/chrome/browser/resources/chromeos/login/gaia_header.js b/chrome/browser/resources/chromeos/login/gaia_header.js index 69898a4..b5ee3dee 100644 --- a/chrome/browser/resources/chromeos/login/gaia_header.js +++ b/chrome/browser/resources/chromeos/login/gaia_header.js
@@ -5,7 +5,5 @@ Polymer({ is: 'gaia-header', - properties: { - email: String - } + properties: {email: String} });
diff --git a/chrome/browser/resources/chromeos/login/gaia_input.js b/chrome/browser/resources/chromeos/login/gaia_input.js index d36f52a..208ce578 100644 --- a/chrome/browser/resources/chromeos/login/gaia_input.js +++ b/chrome/browser/resources/chromeos/login/gaia_input.js
@@ -3,28 +3,18 @@ // found in the LICENSE file. Polymer((function() { - var INPUT_EMAIL_PATTERN = "^[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+(@[^\\s@]+)?$"; + var INPUT_EMAIL_PATTERN = '^[a-zA-Z0-9.!#$%&\'*+=?^_`{|}~-]+(@[^\\s@]+)?$'; return { is: 'gaia-input', properties: { label: String, - value: { - notify: true, - observer: 'updateDomainVisibility_', - type: String - }, + value: {notify: true, observer: 'updateDomainVisibility_', type: String}, - type: { - observer: 'typeChanged_', - type: String - }, + type: {observer: 'typeChanged_', type: String}, - domain: { - observer: 'updateDomainVisibility_', - type: String - }, + domain: {observer: 'updateDomainVisibility_', type: String}, disabled: Boolean,
diff --git a/chrome/browser/resources/chromeos/login/gaia_password_changed.js b/chrome/browser/resources/chromeos/login/gaia_password_changed.js index 5206090..803bf134 100644 --- a/chrome/browser/resources/chromeos/login/gaia_password_changed.js +++ b/chrome/browser/resources/chromeos/login/gaia_password_changed.js
@@ -8,10 +8,7 @@ properties: { email: String, - disabled: { - type: Boolean, - value: false - } + disabled: {type: Boolean, value: false} }, ready: function() { @@ -22,8 +19,11 @@ */ var pages = this.$.animatedPages; delete pages._squelchNextFinishEvent; - Object.defineProperty(pages, '_squelchNextFinishEvent', - { get: function() { return false; } }); + Object.defineProperty(pages, '_squelchNextFinishEvent', { + get: function() { + return false; + } + }); }, invalidate: function() {
diff --git a/chrome/browser/resources/chromeos/login/header_bar.js b/chrome/browser/resources/chromeos/login/header_bar.js index f02ba20c..e93405a 100644 --- a/chrome/browser/resources/chromeos/login/header_bar.js +++ b/chrome/browser/resources/chromeos/login/header_bar.js
@@ -49,32 +49,28 @@ /** @override */ decorate: function() { document.addEventListener('click', this.handleClick_.bind(this)); - $('shutdown-header-bar-item').addEventListener('click', - this.handleShutdownClick_); - $('shutdown-button').addEventListener('click', - this.handleShutdownClick_); - $('restart-header-bar-item').addEventListener('click', - this.handleShutdownClick_); - $('restart-button').addEventListener('click', - this.handleShutdownClick_); - $('add-user-button').addEventListener('click', - this.handleAddUserClick_); - $('more-settings-button').addEventListener('click', - this.handleMoreSettingsClick_.bind(this)); - $('guest-user-header-bar-item').addEventListener('click', - this.handleGuestClick_); - $('guest-user-button').addEventListener('click', - this.handleGuestClick_); - $('sign-out-user-button').addEventListener('click', - this.handleSignoutClick_); - $('cancel-multiple-sign-in-button').addEventListener('click', - this.handleCancelMultipleSignInClick_); - $('unlock-user-button').addEventListener('click', - this.handleUnlockUserClick_); - this.addSupervisedUserMenu.addEventListener('click', - this.handleAddSupervisedUserClick_.bind(this)); - this.addSupervisedUserMenu.addEventListener('keydown', - this.handleAddSupervisedUserKeyDown_.bind(this)); + $('shutdown-header-bar-item') + .addEventListener('click', this.handleShutdownClick_); + $('shutdown-button').addEventListener('click', this.handleShutdownClick_); + $('restart-header-bar-item') + .addEventListener('click', this.handleShutdownClick_); + $('restart-button').addEventListener('click', this.handleShutdownClick_); + $('add-user-button').addEventListener('click', this.handleAddUserClick_); + $('more-settings-button') + .addEventListener('click', this.handleMoreSettingsClick_.bind(this)); + $('guest-user-header-bar-item') + .addEventListener('click', this.handleGuestClick_); + $('guest-user-button').addEventListener('click', this.handleGuestClick_); + $('sign-out-user-button') + .addEventListener('click', this.handleSignoutClick_); + $('cancel-multiple-sign-in-button') + .addEventListener('click', this.handleCancelMultipleSignInClick_); + $('unlock-user-button') + .addEventListener('click', this.handleUnlockUserClick_); + this.addSupervisedUserMenu.addEventListener( + 'click', this.handleAddSupervisedUserClick_.bind(this)); + this.addSupervisedUserMenu.addEventListener( + 'keydown', this.handleAddSupervisedUserKeyDown_.bind(this)); if (Oobe.getInstance().displayType == DISPLAY_TYPE.LOGIN || Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) { if (Oobe.getInstance().newKioskUI) @@ -241,8 +237,8 @@ * @private */ handleUnlockUserClick_: function(e) { - chrome.send('setLockScreenAppsState', - [LOCK_SCREEN_APPS_STATE.BACKGROUND]); + chrome.send( + 'setLockScreenAppsState', [LOCK_SCREEN_APPS_STATE.BACKGROUND]); e.preventDefault(); }, @@ -328,7 +324,7 @@ (this.signinUIState_ == SIGNIN_UI_STATE.ACCOUNT_PICKER); var supervisedUserCreationDialogIsActive = (this.signinUIState_ == - SIGNIN_UI_STATE.SUPERVISED_USER_CREATION_FLOW); + SIGNIN_UI_STATE.SUPERVISED_USER_CREATION_FLOW); var wrongHWIDWarningIsActive = (this.signinUIState_ == SIGNIN_UI_STATE.WRONG_HWID_WARNING); var isSamlPasswordConfirm = @@ -337,48 +333,32 @@ (this.signinUIState_ == SIGNIN_UI_STATE.PASSWORD_CHANGED); var isMultiProfilesUI = (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING); - var isLockScreen = - (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK); - var errorScreenIsActive = - (this.signinUIState_ == SIGNIN_UI_STATE.ERROR); + var isLockScreen = (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK); + var errorScreenIsActive = (this.signinUIState_ == SIGNIN_UI_STATE.ERROR); - $('add-user-button').hidden = - !accountPickerIsActive || - isMultiProfilesUI || - isLockScreen || - errorScreenIsActive; - $('more-settings-header-bar-item').hidden = - !this.showCreateSupervised_ || - gaiaIsActive || - isLockScreen || - errorScreenIsActive || + $('add-user-button').hidden = !accountPickerIsActive || + isMultiProfilesUI || isLockScreen || errorScreenIsActive; + $('more-settings-header-bar-item').hidden = !this.showCreateSupervised_ || + gaiaIsActive || isLockScreen || errorScreenIsActive || supervisedUserCreationDialogIsActive; - $('guest-user-header-bar-item').hidden = - !this.showGuest_ || - isLockScreen || - supervisedUserCreationDialogIsActive || - wrongHWIDWarningIsActive || - isSamlPasswordConfirm || - isMultiProfilesUI || - (gaiaIsActive && $('gaia-signin').closable) || + $('guest-user-header-bar-item').hidden = !this.showGuest_ || + isLockScreen || supervisedUserCreationDialogIsActive || + wrongHWIDWarningIsActive || isSamlPasswordConfirm || + isMultiProfilesUI || (gaiaIsActive && $('gaia-signin').closable) || (enrollmentIsActive && !$('oauth-enrollment').isAtTheBeginning()) || (gaiaIsActive && !$('gaia-signin').isAtTheBeginning()); - $('restart-header-bar-item').hidden = - !this.showReboot_ || + $('restart-header-bar-item').hidden = !this.showReboot_ || this.lockScreenAppsState_ == LOCK_SCREEN_APPS_STATE.FOREGROUND; - $('shutdown-header-bar-item').hidden = - !this.showShutdown_ || + $('shutdown-header-bar-item').hidden = !this.showShutdown_ || this.lockScreenAppsState_ == LOCK_SCREEN_APPS_STATE.FOREGROUND; - $('sign-out-user-item').hidden = - !isLockScreen || + $('sign-out-user-item').hidden = !isLockScreen || this.lockScreenAppsState_ == LOCK_SCREEN_APPS_STATE.FOREGROUND; - $('unlock-user-header-bar-item').hidden = - !isLockScreen || + $('unlock-user-header-bar-item').hidden = !isLockScreen || this.lockScreenAppsState_ != LOCK_SCREEN_APPS_STATE.FOREGROUND; $('add-user-header-bar-item').hidden = $('add-user-button').hidden; - $('apps-header-bar-item').hidden = !this.hasApps_ || - (!gaiaIsActive && !accountPickerIsActive); + $('apps-header-bar-item').hidden = + !this.hasApps_ || (!gaiaIsActive && !accountPickerIsActive); $('cancel-multiple-sign-in-item').hidden = !isMultiProfilesUI; if (!Oobe.getInstance().newKioskUI) { @@ -401,11 +381,10 @@ */ animateOut: function(callback) { var launcher = this; - launcher.addEventListener( - 'transitionend', function f(e) { - launcher.removeEventListener('transitionend', f); - callback(); - }); + launcher.addEventListener('transitionend', function f(e) { + launcher.removeEventListener('transitionend', f); + callback(); + }); // Guard timer for 2 seconds + 200 ms + epsilon. ensureTransitionEndEvent(launcher, 2250); @@ -424,11 +403,10 @@ animateIn: function(fast, callback) { if (callback) { var launcher = this; - launcher.addEventListener( - 'transitionend', function f(e) { - launcher.removeEventListener('transitionend', f); - callback(); - }); + launcher.addEventListener('transitionend', function f(e) { + launcher.removeEventListener('transitionend', f); + callback(); + }); // Guard timer for 2 seconds + 200 ms + epsilon. ensureTransitionEndEvent(launcher, 2250); } @@ -459,7 +437,5 @@ $('login-header-bar').animateIn(fast, callback); }; - return { - HeaderBar: HeaderBar - }; + return {HeaderBar: HeaderBar}; });
diff --git a/chrome/browser/resources/chromeos/login/host-pairing-screen.js b/chrome/browser/resources/chromeos/login/host-pairing-screen.js index 8e08a44c..e1866061 100644 --- a/chrome/browser/resources/chromeos/login/host-pairing-screen.js +++ b/chrome/browser/resources/chromeos/login/host-pairing-screen.js
@@ -24,11 +24,8 @@ /** @override */ initialize: function() { - ['code', - 'deviceName', - 'enrollmentDomain', - 'page', - 'enrollmentError'].forEach(this.registerBoundContextField, this); + ['code', 'deviceName', 'enrollmentDomain', 'page', 'enrollmentError'] + .forEach(this.registerBoundContextField, this); this.send(CALLBACK_CONTEXT_READY); }, @@ -37,8 +34,8 @@ }, getEnrollmentStepTitle_: function(enrollmentDomain) { - return this.i18n(['loginHostPairingScreenEnrollingTitle', - enrollmentDomain]); + return this.i18n( + ['loginHostPairingScreenEnrollingTitle', enrollmentDomain]); } }; })());
diff --git a/chrome/browser/resources/chromeos/login/html-echo.js b/chrome/browser/resources/chromeos/login/html-echo.js index 25821c8..77a00d1 100644 --- a/chrome/browser/resources/chromeos/login/html-echo.js +++ b/chrome/browser/resources/chromeos/login/html-echo.js
@@ -5,12 +5,7 @@ Polymer({ is: 'html-echo', - properties: { - content: { - type: String, - observer: 'contentChanged_' - } - }, + properties: {content: {type: String, observer: 'contentChanged_'}}, contentChanged_: function(content) { this.innerHTML = content;
diff --git a/chrome/browser/resources/chromeos/login/lock.js b/chrome/browser/resources/chromeos/login/lock.js index 12493dc..e967056 100644 --- a/chrome/browser/resources/chromeos/login/lock.js +++ b/chrome/browser/resources/chromeos/login/lock.js
@@ -23,15 +23,15 @@ // Do not reload assets if they are already loaded. Run |onLoaded| once assets // are done loading, though. if (cr.ui.login.ResourceLoader.hasDeferredAssets('custom-elements')) { - cr.ui.login.ResourceLoader.waitUntilLayoutComplete(getPinKeyboard, - onLoaded); + cr.ui.login.ResourceLoader.waitUntilLayoutComplete( + getPinKeyboard, onLoaded); return; } // Register loader for custom elements. cr.ui.login.ResourceLoader.registerAssets({ id: 'custom-elements', - html: [{ url: 'chrome://oobe/custom_elements.html' }] + html: [{url: 'chrome://oobe/custom_elements.html'}] }); // We only load the PIN element when it is actually shown so that lock screen @@ -41,8 +41,8 @@ // animations. We load the PIN after an idle notification to allow the pod // fly-in animation to complete without interruption. cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements', function() { - cr.ui.login.ResourceLoader.waitUntilLayoutComplete(getPinKeyboard, - onLoaded); + cr.ui.login.ResourceLoader.waitUntilLayoutComplete( + getPinKeyboard, onLoaded); }); }
diff --git a/chrome/browser/resources/chromeos/login/login_non_lock_shared.js b/chrome/browser/resources/chromeos/login/login_non_lock_shared.js index 8a4a08b..5c77bef2 100644 --- a/chrome/browser/resources/chromeos/login/login_non_lock_shared.js +++ b/chrome/browser/resources/chromeos/login/login_non_lock_shared.js
@@ -39,21 +39,21 @@ // Register assets for async loading. [{ id: SCREEN_OOBE_ENROLLMENT, - html: [{ url: 'chrome://oobe/enrollment.html', targetID: 'inner-container' }], + html: [{url: 'chrome://oobe/enrollment.html', targetID: 'inner-container'}], css: ['chrome://oobe/enrollment.css'], js: ['chrome://oobe/enrollment.js'] }].forEach(cr.ui.login.ResourceLoader.registerAssets); (function() { - 'use strict'; +'use strict'; - document.addEventListener('DOMContentLoaded', function() { - // Immediately load async assets. - cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { - // This screen is async-loaded so we manually trigger i18n processing. - i18nTemplate.process($('oauth-enrollment'), loadTimeData); - // Delayed binding since this isn't defined yet. - login.OAuthEnrollmentScreen.register(); - }); +document.addEventListener('DOMContentLoaded', function() { + // Immediately load async assets. + cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { + // This screen is async-loaded so we manually trigger i18n processing. + i18nTemplate.process($('oauth-enrollment'), loadTimeData); + // Delayed binding since this isn't defined yet. + login.OAuthEnrollmentScreen.register(); }); +}); })();
diff --git a/chrome/browser/resources/chromeos/login/login_shared.js b/chrome/browser/resources/chromeos/login/login_shared.js index e073b61e..b6035a49 100644 --- a/chrome/browser/resources/chromeos/login/login_shared.js +++ b/chrome/browser/resources/chromeos/login/login_shared.js
@@ -21,7 +21,8 @@ // <include src="../../../../../ui/login/display_manager.js"> // <include src="header_bar.js"> -// <include src="../../../../../ui/login/account_picker/screen_account_picker.js"> +// <include +// src="../../../../../ui/login/account_picker/screen_account_picker.js"> // <include src="../../../../../ui/login/login_ui_tools.js"> // <include src="../../../../../ui/login/account_picker/user_pod_row.js"> @@ -31,13 +32,12 @@ var DisplayManager = cr.ui.login.DisplayManager; /** - * Constructs an Out of box controller. It manages initialization of screens, - * transitions, error messages display. - * @extends {DisplayManager} - * @constructor - */ - function Oobe() { - } + * Constructs an Out of box controller. It manages initialization of screens, + * transitions, error messages display. + * @extends {DisplayManager} + * @constructor + */ + function Oobe() {} /** * Delay in milliseconds between start of OOBE animation and start of @@ -311,8 +311,8 @@ * @param {string} password Login password. * @param {boolean} enterpriseEnroll Login as an enterprise enrollment? */ - Oobe.loginForTesting = function(username, password, gaia_id, - enterpriseEnroll = false) { + Oobe.loginForTesting = function( + username, password, gaia_id, enterpriseEnroll = false) { // Helper method that runs |fn| after |screenName| is visible. function waitForOobeScreen(screenName, fn) { if (Oobe.getInstance().currentScreen && @@ -408,8 +408,8 @@ if (document.querySelector('.oauth-enroll-state-attribute-prompt')) chrome.send('oauthEnrollAttributes', ['', '']); - return $('oauth-enrollment').classList.contains( - 'oauth-enroll-state-success'); + return $('oauth-enrollment') + .classList.contains('oauth-enroll-state-success'); }; /** @@ -437,9 +437,7 @@ }; // Export - return { - Oobe: Oobe - }; + return {Oobe: Oobe}; }); var Oobe = cr.ui.Oobe; @@ -449,30 +447,29 @@ disableTextSelectAndDrag(function(e) { var src = e.target; return src instanceof HTMLTextAreaElement || - src instanceof HTMLInputElement && - /text|password|search/.test(src.type); + src instanceof HTMLInputElement && /text|password|search/.test(src.type); }); (function() { - 'use strict'; +'use strict'; - document.addEventListener('DOMContentLoaded', function() { - try { - Oobe.initialize(); - } finally { - // TODO(crbug.com/712078): Do not set readyForTesting in case of that - // initialize() is failed. Currently, in some situation, initialize() - // raises an exception unexpectedly. It means testing APIs should not - // be called then. However, checking it here now causes bots failures - // unfortunately. So, as a short term workaround, here set - // readyForTesting even on failures, just to make test bots happy. - Oobe.readyForTesting = true; - } - }); +document.addEventListener('DOMContentLoaded', function() { + try { + Oobe.initialize(); + } finally { + // TODO(crbug.com/712078): Do not set readyForTesting in case of that + // initialize() is failed. Currently, in some situation, initialize() + // raises an exception unexpectedly. It means testing APIs should not + // be called then. However, checking it here now causes bots failures + // unfortunately. So, as a short term workaround, here set + // readyForTesting even on failures, just to make test bots happy. + Oobe.readyForTesting = true; + } +}); - // Install a global error handler so stack traces are included in logs. - window.onerror = function(message, file, line, column, error) { - console.error(error.stack); - }; +// Install a global error handler so stack traces are included in logs. +window.onerror = function(message, file, line, column, error) { + console.error(error.stack); +}; })();
diff --git a/chrome/browser/resources/chromeos/login/md_header_bar.js b/chrome/browser/resources/chromeos/login/md_header_bar.js index d219926..f7429fa 100644 --- a/chrome/browser/resources/chromeos/login/md_header_bar.js +++ b/chrome/browser/resources/chromeos/login/md_header_bar.js
@@ -49,32 +49,28 @@ /** @override */ decorate: function() { document.addEventListener('click', this.handleClick_.bind(this)); - $('shutdown-header-bar-item').addEventListener('click', - this.handleShutdownClick_); - $('shutdown-button').addEventListener('click', - this.handleShutdownClick_); - $('restart-header-bar-item').addEventListener('click', - this.handleShutdownClick_); - $('restart-button').addEventListener('click', - this.handleShutdownClick_); - $('add-user-button').addEventListener('click', - this.handleAddUserClick_); - $('more-settings-button').addEventListener('click', - this.handleMoreSettingsClick_.bind(this)); - $('guest-user-header-bar-item').addEventListener('click', - this.handleGuestClick_); - $('guest-user-button').addEventListener('click', - this.handleGuestClick_); - $('sign-out-user-button').addEventListener('click', - this.handleSignoutClick_); - $('cancel-multiple-sign-in-button').addEventListener('click', - this.handleCancelMultipleSignInClick_); - $('unlock-user-button').addEventListener('click', - this.handleUnlockUserClick_); - this.addSupervisedUserMenu.addEventListener('click', - this.handleAddSupervisedUserClick_.bind(this)); - this.addSupervisedUserMenu.addEventListener('keydown', - this.handleAddSupervisedUserKeyDown_.bind(this)); + $('shutdown-header-bar-item') + .addEventListener('click', this.handleShutdownClick_); + $('shutdown-button').addEventListener('click', this.handleShutdownClick_); + $('restart-header-bar-item') + .addEventListener('click', this.handleShutdownClick_); + $('restart-button').addEventListener('click', this.handleShutdownClick_); + $('add-user-button').addEventListener('click', this.handleAddUserClick_); + $('more-settings-button') + .addEventListener('click', this.handleMoreSettingsClick_.bind(this)); + $('guest-user-header-bar-item') + .addEventListener('click', this.handleGuestClick_); + $('guest-user-button').addEventListener('click', this.handleGuestClick_); + $('sign-out-user-button') + .addEventListener('click', this.handleSignoutClick_); + $('cancel-multiple-sign-in-button') + .addEventListener('click', this.handleCancelMultipleSignInClick_); + $('unlock-user-button') + .addEventListener('click', this.handleUnlockUserClick_); + this.addSupervisedUserMenu.addEventListener( + 'click', this.handleAddSupervisedUserClick_.bind(this)); + this.addSupervisedUserMenu.addEventListener( + 'keydown', this.handleAddSupervisedUserKeyDown_.bind(this)); if (Oobe.getInstance().displayType == DISPLAY_TYPE.LOGIN || Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) { if (Oobe.getInstance().newKioskUI) @@ -241,8 +237,8 @@ * @private */ handleUnlockUserClick_: function(e) { - chrome.send('setLockScreenAppsState', - [LOCK_SCREEN_APPS_STATE.BACKGROUND]); + chrome.send( + 'setLockScreenAppsState', [LOCK_SCREEN_APPS_STATE.BACKGROUND]); e.preventDefault(); }, @@ -328,7 +324,7 @@ (this.signinUIState_ == SIGNIN_UI_STATE.ACCOUNT_PICKER); var supervisedUserCreationDialogIsActive = (this.signinUIState_ == - SIGNIN_UI_STATE.SUPERVISED_USER_CREATION_FLOW); + SIGNIN_UI_STATE.SUPERVISED_USER_CREATION_FLOW); var wrongHWIDWarningIsActive = (this.signinUIState_ == SIGNIN_UI_STATE.WRONG_HWID_WARNING); var isSamlPasswordConfirm = @@ -337,48 +333,32 @@ (this.signinUIState_ == SIGNIN_UI_STATE.PASSWORD_CHANGED); var isMultiProfilesUI = (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING); - var isLockScreen = - (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK); - var errorScreenIsActive = - (this.signinUIState_ == SIGNIN_UI_STATE.ERROR); + var isLockScreen = (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK); + var errorScreenIsActive = (this.signinUIState_ == SIGNIN_UI_STATE.ERROR); - $('add-user-button').hidden = - !accountPickerIsActive || - isMultiProfilesUI || - isLockScreen || - errorScreenIsActive; - $('more-settings-header-bar-item').hidden = - !this.showCreateSupervised_ || - gaiaIsActive || - isLockScreen || - errorScreenIsActive || + $('add-user-button').hidden = !accountPickerIsActive || + isMultiProfilesUI || isLockScreen || errorScreenIsActive; + $('more-settings-header-bar-item').hidden = !this.showCreateSupervised_ || + gaiaIsActive || isLockScreen || errorScreenIsActive || supervisedUserCreationDialogIsActive; - $('guest-user-header-bar-item').hidden = - !this.showGuest_ || - isLockScreen || - supervisedUserCreationDialogIsActive || - wrongHWIDWarningIsActive || - isSamlPasswordConfirm || - isMultiProfilesUI || - (gaiaIsActive && $('gaia-signin').closable) || + $('guest-user-header-bar-item').hidden = !this.showGuest_ || + isLockScreen || supervisedUserCreationDialogIsActive || + wrongHWIDWarningIsActive || isSamlPasswordConfirm || + isMultiProfilesUI || (gaiaIsActive && $('gaia-signin').closable) || (enrollmentIsActive && !$('oauth-enrollment').isAtTheBeginning()) || (gaiaIsActive && !$('gaia-signin').isAtTheBeginning()); - $('restart-header-bar-item').hidden = - !this.showReboot_ || + $('restart-header-bar-item').hidden = !this.showReboot_ || this.lockScreenAppsState_ == LOCK_SCREEN_APPS_STATE.FOREGROUND; - $('shutdown-header-bar-item').hidden = - !this.showShutdown_ || + $('shutdown-header-bar-item').hidden = !this.showShutdown_ || this.lockScreenAppsState_ == LOCK_SCREEN_APPS_STATE.FOREGROUND; - $('sign-out-user-item').hidden = - !isLockScreen || + $('sign-out-user-item').hidden = !isLockScreen || this.lockScreenAppsState_ == LOCK_SCREEN_APPS_STATE.FOREGROUND; - $('unlock-user-header-bar-item').hidden = - !isLockScreen || + $('unlock-user-header-bar-item').hidden = !isLockScreen || this.lockScreenAppsState_ != LOCK_SCREEN_APPS_STATE.FOREGROUND; $('add-user-header-bar-item').hidden = $('add-user-button').hidden; - $('apps-header-bar-item').hidden = !this.hasApps_ || - (!gaiaIsActive && !accountPickerIsActive); + $('apps-header-bar-item').hidden = + !this.hasApps_ || (!gaiaIsActive && !accountPickerIsActive); $('cancel-multiple-sign-in-item').hidden = !isMultiProfilesUI; if (!Oobe.getInstance().newKioskUI) { @@ -401,11 +381,10 @@ */ animateOut: function(callback) { var launcher = this; - launcher.addEventListener( - 'transitionend', function f(e) { - launcher.removeEventListener('transitionend', f); - callback(); - }); + launcher.addEventListener('transitionend', function f(e) { + launcher.removeEventListener('transitionend', f); + callback(); + }); // Guard timer for 2 seconds + 200 ms + epsilon. ensureTransitionEndEvent(launcher, 2250); @@ -424,11 +403,10 @@ animateIn: function(fast, callback) { if (callback) { var launcher = this; - launcher.addEventListener( - 'transitionend', function f(e) { - launcher.removeEventListener('transitionend', f); - callback(); - }); + launcher.addEventListener('transitionend', function f(e) { + launcher.removeEventListener('transitionend', f); + callback(); + }); // Guard timer for 2 seconds + 200 ms + epsilon. ensureTransitionEndEvent(launcher, 2250); } @@ -459,7 +437,5 @@ $('login-header-bar').animateIn(fast, callback); }; - return { - HeaderBar: HeaderBar - }; + return {HeaderBar: HeaderBar}; });
diff --git a/chrome/browser/resources/chromeos/login/md_lock.js b/chrome/browser/resources/chromeos/login/md_lock.js index ad0e8ba..c983b2c7 100644 --- a/chrome/browser/resources/chromeos/login/md_lock.js +++ b/chrome/browser/resources/chromeos/login/md_lock.js
@@ -23,15 +23,15 @@ // Do not reload assets if they are already loaded. Run |onLoaded| once assets // are done loading, though. if (cr.ui.login.ResourceLoader.hasDeferredAssets('custom-elements')) { - cr.ui.login.ResourceLoader.waitUntilLayoutComplete(getPinKeyboard, - onLoaded); + cr.ui.login.ResourceLoader.waitUntilLayoutComplete( + getPinKeyboard, onLoaded); return; } // Register loader for custom elements. cr.ui.login.ResourceLoader.registerAssets({ id: 'custom-elements', - html: [{ url: 'chrome://oobe/custom_elements.html' }] + html: [{url: 'chrome://oobe/custom_elements.html'}] }); // We only load the PIN element when it is actually shown so that lock screen @@ -41,8 +41,8 @@ // animations. We load the PIN after an idle notification to allow the pod // fly-in animation to complete without interruption. cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements', function() { - cr.ui.login.ResourceLoader.waitUntilLayoutComplete(getPinKeyboard, - onLoaded); + cr.ui.login.ResourceLoader.waitUntilLayoutComplete( + getPinKeyboard, onLoaded); }); }
diff --git a/chrome/browser/resources/chromeos/login/md_login_shared.js b/chrome/browser/resources/chromeos/login/md_login_shared.js index 195102d..24f2bec0 100644 --- a/chrome/browser/resources/chromeos/login/md_login_shared.js +++ b/chrome/browser/resources/chromeos/login/md_login_shared.js
@@ -21,7 +21,8 @@ // <include src="../../../../../ui/login/display_manager.js"> // <include src="md_header_bar.js"> -// <include src="../../../../../ui/login/account_picker/md_screen_account_picker.js"> +// <include +// src="../../../../../ui/login/account_picker/md_screen_account_picker.js"> // <include src="../../../../../ui/login/login_ui_tools.js"> // <include src="../../../../../ui/login/account_picker/md_user_pod_row.js"> @@ -31,13 +32,12 @@ var DisplayManager = cr.ui.login.DisplayManager; /** - * Constructs an Out of box controller. It manages initialization of screens, - * transitions, error messages display. - * @extends {DisplayManager} - * @constructor - */ - function Oobe() { - } + * Constructs an Out of box controller. It manages initialization of screens, + * transitions, error messages display. + * @extends {DisplayManager} + * @constructor + */ + function Oobe() {} /** * Delay in milliseconds between start of OOBE animation and start of @@ -311,8 +311,8 @@ * @param {string} password Login password. * @param {boolean} enterpriseEnroll Login as an enterprise enrollment? */ - Oobe.loginForTesting = function(username, password, gaia_id, - enterpriseEnroll = false) { + Oobe.loginForTesting = function( + username, password, gaia_id, enterpriseEnroll = false) { // Helper method that runs |fn| after |screenName| is visible. function waitForOobeScreen(screenName, fn) { if (Oobe.getInstance().currentScreen && @@ -408,8 +408,8 @@ if (document.querySelector('.oauth-enroll-state-attribute-prompt')) chrome.send('oauthEnrollAttributes', ['', '']); - return $('oauth-enrollment').classList.contains( - 'oauth-enroll-state-success'); + return $('oauth-enrollment') + .classList.contains('oauth-enroll-state-success'); }; /** @@ -443,9 +443,7 @@ }; // Export - return { - Oobe: Oobe - }; + return {Oobe: Oobe}; }); var Oobe = cr.ui.Oobe; @@ -455,30 +453,29 @@ disableTextSelectAndDrag(function(e) { var src = e.target; return src instanceof HTMLTextAreaElement || - src instanceof HTMLInputElement && - /text|password|search/.test(src.type); + src instanceof HTMLInputElement && /text|password|search/.test(src.type); }); (function() { - 'use strict'; +'use strict'; - document.addEventListener('DOMContentLoaded', function() { - try { - Oobe.initialize(); - } finally { - // TODO(crbug.com/712078): Do not set readyForTesting in case of that - // initialize() is failed. Currently, in some situation, initialize() - // raises an exception unexpectedly. It means testing APIs should not - // be called then. However, checking it here now causes bots failures - // unfortunately. So, as a short term workaround, here set - // readyForTesting even on failures, just to make test bots happy. - Oobe.readyForTesting = true; - } - }); +document.addEventListener('DOMContentLoaded', function() { + try { + Oobe.initialize(); + } finally { + // TODO(crbug.com/712078): Do not set readyForTesting in case of that + // initialize() is failed. Currently, in some situation, initialize() + // raises an exception unexpectedly. It means testing APIs should not + // be called then. However, checking it here now causes bots failures + // unfortunately. So, as a short term workaround, here set + // readyForTesting even on failures, just to make test bots happy. + Oobe.readyForTesting = true; + } +}); - // Install a global error handler so stack traces are included in logs. - window.onerror = function(message, file, line, column, error) { - console.error(error.stack); - }; +// Install a global error handler so stack traces are included in logs. +window.onerror = function(message, file, line, column, error) { + console.error(error.stack); +}; })();
diff --git a/chrome/browser/resources/chromeos/login/navigation_bar.js b/chrome/browser/resources/chromeos/login/navigation_bar.js index c428afc..84cbb02 100644 --- a/chrome/browser/resources/chromeos/login/navigation_bar.js +++ b/chrome/browser/resources/chromeos/login/navigation_bar.js
@@ -6,25 +6,19 @@ is: 'navigation-bar', properties: { - backVisible: { - type: Boolean, - value: false - }, - closeVisible: { - type: Boolean, - value: false - }, - refreshVisible: { - type: Boolean, - value: false - }, - disabled: { - type: Boolean, - value: false - } + backVisible: {type: Boolean, value: false}, + closeVisible: {type: Boolean, value: false}, + refreshVisible: {type: Boolean, value: false}, + disabled: {type: Boolean, value: false} }, - onBack_: function() { this.fire('back'); }, - onClose_: function() { this.fire('close'); }, - onRefresh_: function() { this.fire('refresh'); } + onBack_: function() { + this.fire('back'); + }, + onClose_: function() { + this.fire('close'); + }, + onRefresh_: function() { + this.fire('refresh'); + } });
diff --git a/chrome/browser/resources/chromeos/login/network_dropdown.js b/chrome/browser/resources/chromeos/login/network_dropdown.js index 042def52..469d159 100644 --- a/chrome/browser/resources/chromeos/login/network_dropdown.js +++ b/chrome/browser/resources/chromeos/login/network_dropdown.js
@@ -45,8 +45,10 @@ var thisBottom = thisTop + this.offsetHeight; var itemTop = item.offsetTop; var itemBottom = itemTop + item.offsetHeight; - if (itemTop <= thisTop) return -1; - if (itemBottom >= thisBottom) return 1; + if (itemTop <= thisTop) + return -1; + if (itemBottom >= thisBottom) + return 1; return 0; }, @@ -170,8 +172,8 @@ } this.container.selectItem(this.container.firstItem, false); - var maxHeight = cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping( - this.container); + var maxHeight = + cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping(this.container); if (maxHeight < this.container.offsetHeight) this.container.style.maxHeight = maxHeight + 'px'; }, @@ -300,8 +302,9 @@ if (this.inFocus && !this.controller.isShown && (e.keyCode == DropDown.KEYCODE_ENTER || e.keyCode == DropDown.KEYCODE_SPACE || - (!useKeyboardFlow && (e.keyCode == DropDown.KEYCODE_UP || - e.keyCode == DropDown.KEYCODE_DOWN)))) { + (!useKeyboardFlow && + (e.keyCode == DropDown.KEYCODE_UP || + e.keyCode == DropDown.KEYCODE_DOWN)))) { this.opening = true; this.controller.isShown = true; e.stopPropagation(); @@ -433,7 +436,5 @@ useKeyboardFlow = true; }; - return { - DropDown: DropDown - }; + return {DropDown: DropDown}; });
diff --git a/chrome/browser/resources/chromeos/login/notification_card.js b/chrome/browser/resources/chromeos/login/notification_card.js index 880ded8..fd0c129e 100644 --- a/chrome/browser/resources/chromeos/login/notification_card.js +++ b/chrome/browser/resources/chromeos/login/notification_card.js
@@ -6,20 +6,11 @@ is: 'notification-card', properties: { - buttonLabel: { - type: String, - value: '' - }, + buttonLabel: {type: String, value: ''}, - linkLabel: { - type: String, - value: '' - }, + linkLabel: {type: String, value: ''}, - type: { - type: String, - value: '' - } + type: {type: String, value: ''} }, iconNameByType_: function(type) {
diff --git a/chrome/browser/resources/chromeos/login/offline_ad_login.js b/chrome/browser/resources/chromeos/login/offline_ad_login.js index 6c202bc..9947ff33 100644 --- a/chrome/browser/resources/chromeos/login/offline_ad_login.js +++ b/chrome/browser/resources/chromeos/login/offline_ad_login.js
@@ -23,25 +23,15 @@ /** * Whether the UI disabled. */ - disabled: { - type: Boolean, - value: false, - observer: 'disabledChanged_' - }, + disabled: {type: Boolean, value: false, observer: 'disabledChanged_'}, /** * Whether to show machine name input field. */ - showMachineInput: { - type: Boolean, - value: false - }, + showMachineInput: {type: Boolean, value: false}, /** * The kerberos realm (AD Domain), the machine is part of. */ - realm: { - type: String, - observer: 'realmChanged_' - }, + realm: {type: String, observer: 'realmChanged_'}, /** * The user kerberos default realm. Used for autocompletion. */ @@ -68,8 +58,8 @@ }, focus: function() { - if (this.showMachineInput && /** @type {string} */ ( - this.$.machineNameInput.value) == '') { + if (this.showMachineInput && + /** @type {string} */ (this.$.machineNameInput.value) == '') { this.$.machineNameInput.focus(); } else if (/** @type {string} */ (this.$.userInput.value) == '') { this.$.userInput.focus();
diff --git a/chrome/browser/resources/chromeos/login/offline_gaia.js b/chrome/browser/resources/chromeos/login/offline_gaia.js index 2b61208bb..30983ac 100644 --- a/chrome/browser/resources/chromeos/login/offline_gaia.js +++ b/chrome/browser/resources/chromeos/login/offline_gaia.js
@@ -5,30 +5,17 @@ Polymer((function() { var DEFAULT_EMAIL_DOMAIN = '@gmail.com'; - var TRANSITION_TYPE = { - FORWARD: 0, - BACKWARD: 1, - NONE: 2 - }; + var TRANSITION_TYPE = {FORWARD: 0, BACKWARD: 1, NONE: 2}; return { is: 'offline-gaia', properties: { - disabled: { - type: Boolean, - value: false - }, + disabled: {type: Boolean, value: false}, - showEnterpriseMessage: { - type: Boolean, - value: false - }, + showEnterpriseMessage: {type: Boolean, value: false}, - domain: { - type: String, - observer: 'onDomainChanged_' - }, + domain: {type: String, observer: 'onDomainChanged_'}, emailDomain: String }, @@ -41,8 +28,11 @@ */ var pages = this.$.animatedPages; delete pages._squelchNextFinishEvent; - Object.defineProperty(pages, '_squelchNextFinishEvent', - { get: function() { return false; } }); + Object.defineProperty(pages, '_squelchNextFinishEvent', { + get: function() { + return false; + } + }); }, focus: function() { @@ -58,7 +48,7 @@ onDomainChanged_: function() { this.$.managedBy.textContent = - loadTimeData.getStringF('enterpriseInfoMessage', this.domain); + loadTimeData.getStringF('enterpriseInfoMessage', this.domain); this.showEnterpriseMessage = !!this.domain.length; }, @@ -157,9 +147,8 @@ } var isForward = transitionType === TRANSITION_TYPE.FORWARD; var isRTL = this.isRTL_(); - this.$.animatedPages.entryAnimation = - 'slide-from-' + (isForward === isRTL ? 'left' : 'right') + - '-animation'; + this.$.animatedPages.entryAnimation = 'slide-from-' + + (isForward === isRTL ? 'left' : 'right') + '-animation'; this.$.animatedPages.exitAnimation = 'slide-' + (isForward === isRTL ? 'right' : 'left') + '-animation'; }
diff --git a/chrome/browser/resources/chromeos/login/oobe-screen.js b/chrome/browser/resources/chromeos/login/oobe-screen.js index b79784d..c7e8fd7 100644 --- a/chrome/browser/resources/chromeos/login/oobe-screen.js +++ b/chrome/browser/resources/chromeos/login/oobe-screen.js
@@ -54,8 +54,9 @@ }, userActed: function(e) { - this.send(CALLBACK_USER_ACTED, - e.detail.sourceEvent.target.getAttribute('action')); + this.send( + CALLBACK_USER_ACTED, + e.detail.sourceEvent.target.getAttribute('action')); }, i18n: function(args) { @@ -227,8 +228,5 @@ } }; - return { - OobeScreenBehavior: OobeScreenBehavior - }; + return {OobeScreenBehavior: OobeScreenBehavior}; }); -
diff --git a/chrome/browser/resources/chromeos/login/oobe.js b/chrome/browser/resources/chromeos/login/oobe.js index e240b1d2..1e4b50a 100644 --- a/chrome/browser/resources/chromeos/login/oobe.js +++ b/chrome/browser/resources/chromeos/login/oobe.js
@@ -55,7 +55,7 @@ select.addEventListener('click', runCallback); select.addEventListener('keyup', function(event) { var keycodeInterested = [ - 9, // Tab + 9, // Tab 13, // Enter 27, // Escape ]; @@ -149,34 +149,30 @@ */ initializeA11yMenu: function() { cr.ui.Bubble.decorate($('accessibility-menu')); - $('connect-accessibility-link').addEventListener( - 'click', Oobe.handleAccessibilityLinkClick); - $('eula-accessibility-link').addEventListener( - 'click', Oobe.handleAccessibilityLinkClick); - $('update-accessibility-link').addEventListener( - 'click', Oobe.handleAccessibilityLinkClick); + $('connect-accessibility-link') + .addEventListener('click', Oobe.handleAccessibilityLinkClick); + $('eula-accessibility-link') + .addEventListener('click', Oobe.handleAccessibilityLinkClick); + $('update-accessibility-link') + .addEventListener('click', Oobe.handleAccessibilityLinkClick); // Same behaviour on hitting spacebar. See crbug.com/342991. function reactOnSpace(event) { if (event.keyCode == 32) Oobe.handleAccessibilityLinkClick(event); } - $('connect-accessibility-link').addEventListener( - 'keyup', reactOnSpace); - $('eula-accessibility-link').addEventListener( - 'keyup', reactOnSpace); - $('update-accessibility-link').addEventListener( - 'keyup', reactOnSpace); + $('connect-accessibility-link').addEventListener('keyup', reactOnSpace); + $('eula-accessibility-link').addEventListener('keyup', reactOnSpace); + $('update-accessibility-link').addEventListener('keyup', reactOnSpace); - $('high-contrast').addEventListener('click', - Oobe.handleHighContrastClick); - $('large-cursor').addEventListener('click', - Oobe.handleLargeCursorClick); - $('spoken-feedback').addEventListener('click', - Oobe.handleSpokenFeedbackClick); - $('screen-magnifier').addEventListener('click', - Oobe.handleScreenMagnifierClick); - $('virtual-keyboard').addEventListener('click', - Oobe.handleVirtualKeyboardClick); + $('high-contrast') + .addEventListener('click', Oobe.handleHighContrastClick); + $('large-cursor').addEventListener('click', Oobe.handleLargeCursorClick); + $('spoken-feedback') + .addEventListener('click', Oobe.handleSpokenFeedbackClick); + $('screen-magnifier') + .addEventListener('click', Oobe.handleScreenMagnifierClick); + $('virtual-keyboard') + .addEventListener('click', Oobe.handleVirtualKeyboardClick); $('high-contrast').addEventListener('keypress', Oobe.handleA11yKeyPress); $('large-cursor').addEventListener('keypress', Oobe.handleA11yKeyPress); @@ -199,16 +195,18 @@ handleAccessibilityLinkClick: function(e) { /** @const */ var BUBBLE_OFFSET = 5; /** @const */ var BUBBLE_PADDING = 10; - $('accessibility-menu').showForElement(e.target, - cr.ui.Bubble.Attachment.BOTTOM, - BUBBLE_OFFSET, BUBBLE_PADDING); + $('accessibility-menu') + .showForElement( + e.target, cr.ui.Bubble.Attachment.BOTTOM, BUBBLE_OFFSET, + BUBBLE_PADDING); var maxHeight = cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping( $('accessibility-menu')); if (maxHeight < $('accessibility-menu').offsetHeight) { - $('accessibility-menu').showForElement(e.target, - cr.ui.Bubble.Attachment.TOP, - BUBBLE_OFFSET, BUBBLE_PADDING); + $('accessibility-menu') + .showForElement( + e.target, cr.ui.Bubble.Attachment.TOP, BUBBLE_OFFSET, + BUBBLE_PADDING); } $('accessibility-menu').firstBubbleElement = $('spoken-feedback'); @@ -218,7 +216,7 @@ if (Oobe.getInstance().currentScreen && Oobe.getInstance().currentScreen.defaultControl) { $('accessibility-menu').elementToFocusOnHide = - Oobe.getInstance().currentScreen.defaultControl; + Oobe.getInstance().currentScreen.defaultControl; } else { // Update screen falls into this category. Since it doesn't have any // controls other than a11y link we don't want that link to receive
diff --git a/chrome/browser/resources/chromeos/login/oobe_dialog.js b/chrome/browser/resources/chromeos/login/oobe_dialog.js index 41abb1d..a1b17c6 100644 --- a/chrome/browser/resources/chromeos/login/oobe_dialog.js +++ b/chrome/browser/resources/chromeos/login/oobe_dialog.js
@@ -51,8 +51,8 @@ }, /** - * This is called from oobe_welcome when this dialog is shown. - */ + * This is called from oobe_welcome when this dialog is shown. + */ show: function() { var focusedElements = this.getElementsByClassName('focus-on-show'); if (focusedElements.length > 0)
diff --git a/chrome/browser/resources/chromeos/login/oobe_hid_detection.js b/chrome/browser/resources/chromeos/login/oobe_hid_detection.js index 29bb68e..bb8f1fb9 100644 --- a/chrome/browser/resources/chromeos/login/oobe_hid_detection.js +++ b/chrome/browser/resources/chromeos/login/oobe_hid_detection.js
@@ -8,160 +8,162 @@ */ (function() { - /** @const {number} */ var PINCODE_LENGTH = 6; +/** @const {number} */ var PINCODE_LENGTH = 6; - Polymer({ - is: 'oobe-hid-detection-md', +Polymer({ + is: 'oobe-hid-detection-md', - properties: { - /** "Continue" button is disabled until HID devices are paired. */ - continueButtonDisabled: { - type: Boolean, - value: true, - }, - - /** This is the displayed text for keyboard "Pairing" state. */ - keyboardPairingLabel: String, - - /** This is the displayed text for keyboard "Paired" state. */ - keyboardPairedLabel: String, - - /** - * Current state in mouse pairing process. - * @private - */ - mouseState_: String, - - /** - * Current state in keyboard pairing process. - * @private - */ - keyboardState_: String, - - /** - * Controls visibility of keyboard pincode. - * @private - */ - keyboardPincodeVisible_: Boolean, - - /** - * Reference to OOBE screen object. - * @type {!OobeTypes.Screen} - */ - screen: Object, + properties: { + /** "Continue" button is disabled until HID devices are paired. */ + continueButtonDisabled: { + type: Boolean, + value: true, }, - /** - * Displayed keyboard pincode. - */ - keyboardPincode_: String, + /** This is the displayed text for keyboard "Pairing" state. */ + keyboardPairingLabel: String, + + /** This is the displayed text for keyboard "Paired" state. */ + keyboardPairedLabel: String, /** - * Helper function to update keyboard/mouse state. - * @param {string} state Existing connection state (one of - * screen.CONNECTION). - * @param {string} newState New connection state (one of screen.CONNECTION). + * Current state in mouse pairing process. * @private */ - calculateState_: function(state, newState) { - if (newState === undefined) - return state; - - if (newState == this.screen.CONNECTION.UPDATE) - return state; - - return newState; - }, + mouseState_: String, /** - * Helper function to calculate visibility of 'connected' icons. - * @param {string} state Connection state (one of screen.CONNECTION). + * Current state in keyboard pairing process. * @private */ - tickIsVisible_: function(state) { - return (state == this.screen.CONNECTION.USB) || - (state == this.screen.CONNECTION.CONNECTED) || - (state == this.screen.CONNECTION.PAIRED); - }, + keyboardState_: String, /** - * Helper function to update keyboard/mouse state. - * Returns true if strings are not equal. False otherwize. - * @param {string} string1 - * @param {string} string2 + * Controls visibility of keyboard pincode. * @private */ - notEq_: function(string1, string2) { return string1 != string2; }, + keyboardPincodeVisible_: Boolean, /** - * Sets current state in mouse pairing process. - * @param {string} state Connection state (one of screen.CONNECTION). + * Reference to OOBE screen object. + * @type {!OobeTypes.Screen} */ - setMouseState: function(state) { - this.mouseState_ = this.calculateState_(this.mouseState_, state); - }, + screen: Object, + }, - /** - * Updates visibility of keyboard pincode. - * @param {string} state Connection state (one of screen.CONNECTION). - * @private - */ - updateKeyboardPincodeVisible_: function(state) { - this.keyboardPincodeVisible_ = this.keyboardPincode_ && - (this.keyboardState_ == this.screen.CONNECTION.PAIRING); - }, + /** + * Displayed keyboard pincode. + */ + keyboardPincode_: String, - /** - * Sets current state in keyboard pairing process. - * @param {string} state Connection state (one of screen.CONNECTION). - */ - setKeyboardState: function(state) { - this.keyboardState_ = this.calculateState_(this.keyboardState_, state); + /** + * Helper function to update keyboard/mouse state. + * @param {string} state Existing connection state (one of + * screen.CONNECTION). + * @param {string} newState New connection state (one of screen.CONNECTION). + * @private + */ + calculateState_: function(state, newState) { + if (newState === undefined) + return state; + + if (newState == this.screen.CONNECTION.UPDATE) + return state; + + return newState; + }, + + /** + * Helper function to calculate visibility of 'connected' icons. + * @param {string} state Connection state (one of screen.CONNECTION). + * @private + */ + tickIsVisible_: function(state) { + return (state == this.screen.CONNECTION.USB) || + (state == this.screen.CONNECTION.CONNECTED) || + (state == this.screen.CONNECTION.PAIRED); + }, + + /** + * Helper function to update keyboard/mouse state. + * Returns true if strings are not equal. False otherwize. + * @param {string} string1 + * @param {string} string2 + * @private + */ + notEq_: function(string1, string2) { + return string1 != string2; + }, + + /** + * Sets current state in mouse pairing process. + * @param {string} state Connection state (one of screen.CONNECTION). + */ + setMouseState: function(state) { + this.mouseState_ = this.calculateState_(this.mouseState_, state); + }, + + /** + * Updates visibility of keyboard pincode. + * @param {string} state Connection state (one of screen.CONNECTION). + * @private + */ + updateKeyboardPincodeVisible_: function(state) { + this.keyboardPincodeVisible_ = this.keyboardPincode_ && + (this.keyboardState_ == this.screen.CONNECTION.PAIRING); + }, + + /** + * Sets current state in keyboard pairing process. + * @param {string} state Connection state (one of screen.CONNECTION). + */ + setKeyboardState: function(state) { + this.keyboardState_ = this.calculateState_(this.keyboardState_, state); + this.updateKeyboardPincodeVisible_(); + }, + + /** + * Sets displayed keyboard pin. + * @param {string} pincode Pincode. + * @param {number} entered Number of digits already entered. + * @param {boolean} expected + * @param {string} label Connection state displayed description. + */ + setPincodeState: function(pincode, entered, expected, label) { + this.keyboardPincode_ = pincode; + if (!pincode) { this.updateKeyboardPincodeVisible_(); - }, + return; + } - /** - * Sets displayed keyboard pin. - * @param {string} pincode Pincode. - * @param {number} entered Number of digits already entered. - * @param {boolean} expected - * @param {string} label Connection state displayed description. - */ - setPincodeState: function(pincode, entered, expected, label) { - this.keyboardPincode_ = pincode; - if (!pincode) { - this.updateKeyboardPincodeVisible_(); - return; - } + if (pincode.length != PINCODE_LENGTH) + console.error('Wrong pincode length'); - if (pincode.length != PINCODE_LENGTH) - console.error('Wrong pincode length'); + // Pincode keys plus Enter key. + for (let i = 0; i < (PINCODE_LENGTH + 1); i++) { + var pincodeSymbol = this.$['hid-keyboard-pincode-sym-' + (i + 1)]; + pincodeSymbol.classList.toggle('key-typed', i < entered && expected); + pincodeSymbol.classList.toggle('key-untyped', i > entered && expected); + pincodeSymbol.classList.toggle('key-next', i == entered && expected); + if (i < PINCODE_LENGTH) + pincodeSymbol.textContent = pincode[i] ? pincode[i] : ''; + } - // Pincode keys plus Enter key. - for (let i = 0; i < (PINCODE_LENGTH + 1); i++) { - var pincodeSymbol = this.$['hid-keyboard-pincode-sym-' + (i + 1)]; - pincodeSymbol.classList.toggle('key-typed', i < entered && expected); - pincodeSymbol.classList.toggle('key-untyped', i > entered && expected); - pincodeSymbol.classList.toggle('key-next', i == entered && expected); - if (i < PINCODE_LENGTH) - pincodeSymbol.textContent = pincode[i] ? pincode[i] : ''; - } + var wasVisible = this.keyboardPincodeVisible_; + this.updateKeyboardPincodeVisible_(); + if (this.keyboardPincodeVisible_ && !wasVisible) { + announceAccessibleMessage( + label + ' ' + pincode + ' ' + + loadTimeData.getString('hidDetectionBTEnterKey')); + } + }, - var wasVisible = this.keyboardPincodeVisible_; - this.updateKeyboardPincodeVisible_(); - if (this.keyboardPincodeVisible_ && !wasVisible) { - announceAccessibleMessage( - label + ' ' + pincode + ' ' + - loadTimeData.getString('hidDetectionBTEnterKey')); - } - }, - - /** - * This is 'on-tap' event handler for 'Continue' button. - */ - onHIDContinueTap_: function(event) { - chrome.send('HIDDetectionOnContinue'); - event.stopPropagation(); - }, - }); + /** + * This is 'on-tap' event handler for 'Continue' button. + */ + onHIDContinueTap_: function(event) { + chrome.send('HIDDetectionOnContinue'); + event.stopPropagation(); + }, +}); })();
diff --git a/chrome/browser/resources/chromeos/login/oobe_i18n_dropdown.js b/chrome/browser/resources/chromeos/login/oobe_i18n_dropdown.js index ff5835a2..d9cde5f 100644 --- a/chrome/browser/resources/chromeos/login/oobe_i18n_dropdown.js +++ b/chrome/browser/resources/chromeos/login/oobe_i18n_dropdown.js
@@ -61,9 +61,7 @@ var item = items[i]; this.idToItem_.set(item.value, item); } - Oobe.setupSelect(this.$.select, - items, - this.onSelected_.bind(this)); + Oobe.setupSelect(this.$.select, items, this.onSelected_.bind(this)); }, }); })();
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.js b/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.js index 5a90efb..1065eb88 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.js
@@ -6,10 +6,7 @@ * @fileoverview Oobe Auto-enrollment check screen implementation. */ -login.createScreen('AutoEnrollmentCheckScreen', - 'auto-enrollment-check', - function() { - return { - EXTERNAL_API: [] - }; -}); +login.createScreen( + 'AutoEnrollmentCheckScreen', 'auto-enrollment-check', function() { + return {EXTERNAL_API: []}; + });
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_autolaunch.js b/chrome/browser/resources/chromeos/login/oobe_screen_autolaunch.js index ed9fe63..a27e4b7 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_autolaunch.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_autolaunch.js
@@ -27,7 +27,7 @@ var confirmButton = this.ownerDocument.createElement('button'); confirmButton.id = 'autolaunch-confirm-button'; confirmButton.textContent = - loadTimeData.getString('autolaunchConfirmButton'); + loadTimeData.getString('autolaunchConfirmButton'); confirmButton.addEventListener('click', function(e) { chrome.send('autolaunchOnConfirm'); e.stopPropagation(); @@ -91,6 +91,3 @@ } }; }); - - -
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_enable_debugging.js b/chrome/browser/resources/chromeos/login/oobe_screen_enable_debugging.js index a1b70bb1..975527a 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_enable_debugging.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_enable_debugging.js
@@ -10,25 +10,17 @@ return { /* Possible UI states of the enable debugging screen. */ - UI_STATE: { - ERROR: -1, - NONE: 0, - REMOVE_PROTECTION: 1, - SETUP: 2, - WAIT: 3, - DONE: 4 - }, + UI_STATE: + {ERROR: -1, NONE: 0, REMOVE_PROTECTION: 1, SETUP: 2, WAIT: 3, DONE: 4}, - EXTERNAL_API: [ - 'updateState' - ], + EXTERNAL_API: ['updateState'], /** @override */ decorate: function() { - $('enable-debugging-help-link').addEventListener('click', - function(event) { - chrome.send('enableDebuggingOnLearnMore'); - }); + $('enable-debugging-help-link') + .addEventListener('click', function(event) { + chrome.send('enableDebuggingOnLearnMore'); + }); var password = $('enable-debugging-password'); var password2 = $('enable-debugging-password2'); @@ -69,8 +61,8 @@ enableButton.textContent = loadTimeData.getString('enableDebuggingEnableButton'); enableButton.addEventListener('click', function(e) { - chrome.send('enableDebuggingOnSetup', - [$('enable-debugging-password').value]); + chrome.send( + 'enableDebuggingOnSetup', [$('enable-debugging-password').value]); e.stopPropagation(); }); buttons.push(enableButton); @@ -87,8 +79,7 @@ var okButton = this.ownerDocument.createElement('button'); okButton.id = 'debugging-ok-button'; - okButton.textContent = - loadTimeData.getString('enableDebuggingOKButton'); + okButton.textContent = loadTimeData.getString('enableDebuggingOKButton'); okButton.addEventListener('click', function(e) { chrome.send('enableDebuggingOnDone'); e.stopPropagation(); @@ -106,8 +97,9 @@ return $('debugging-remove-protection-button'); else if (this.state_ == this.UI_STATE.SETUP) return $('enable-debugging-password'); - else if (this.state_ == this.UI_STATE.DONE || - this.state_ == this.UI_STATE.ERROR) { + else if ( + this.state_ == this.UI_STATE.DONE || + this.state_ == this.UI_STATE.ERROR) { return $('debugging-ok-button'); } @@ -136,19 +128,20 @@ var password2 = $('enable-debugging-password2'); var pwd = password.value; var pwd2 = password2.value; - enableButton.disabled = !((pwd.length == 0 && pwd2.length == 0) || - (pwd == pwd2 && pwd.length >= 4)); + enableButton.disabled = + !((pwd.length == 0 && pwd2.length == 0) || + (pwd == pwd2 && pwd.length >= 4)); }, /** - * Sets css style for corresponding state of the screen. - * @param {number} state. - * @private - */ + * Sets css style for corresponding state of the screen. + * @param {number} state. + * @private + */ setDialogView_: function(state) { this.state_ = state; - this.classList.toggle('remove-protection-view', - state == this.UI_STATE.REMOVE_PROTECTION); + this.classList.toggle( + 'remove-protection-view', state == this.UI_STATE.REMOVE_PROTECTION); this.classList.toggle('setup-view', state == this.UI_STATE.SETUP); this.classList.toggle('wait-view', state == this.UI_STATE.WAIT); this.classList.toggle('done-view', state == this.UI_STATE.DONE);
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_enable_kiosk.js b/chrome/browser/resources/chromeos/login/oobe_screen_enable_kiosk.js index 8bb2bb43..8c39207 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_enable_kiosk.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_enable_kiosk.js
@@ -8,8 +8,7 @@ login.createScreen('KioskEnableScreen', 'kiosk-enable', function() { return { - EXTERNAL_API: ['enableKioskForTesting', - 'onCompleted'], + EXTERNAL_API: ['enableKioskForTesting', 'onCompleted'], /** * Header text of the screen. * @type {string} @@ -27,8 +26,7 @@ var confirmButton = this.ownerDocument.createElement('button'); confirmButton.id = 'kiosk-enable-button'; - confirmButton.textContent = - loadTimeData.getString('kioskEnableButton'); + confirmButton.textContent = loadTimeData.getString('kioskEnableButton'); confirmButton.addEventListener('click', function(e) { chrome.send('kioskOnEnable'); e.stopPropagation(); @@ -37,8 +35,7 @@ var cancelButton = this.ownerDocument.createElement('button'); cancelButton.id = 'kiosk-cancel-button'; - cancelButton.textContent = - loadTimeData.getString('kioskCancelButton'); + cancelButton.textContent = loadTimeData.getString('kioskCancelButton'); cancelButton.addEventListener('click', function(e) { chrome.send('kioskOnClose'); e.stopPropagation(); @@ -48,8 +45,7 @@ var okButton = this.ownerDocument.createElement('button'); okButton.id = 'kiosk-ok-button'; okButton.hidden = true; - okButton.textContent = - loadTimeData.getString('kioskOKButton'); + okButton.textContent = loadTimeData.getString('kioskOKButton'); okButton.addEventListener('click', function(e) { chrome.send('kioskOnClose'); e.stopPropagation(); @@ -88,8 +84,8 @@ * @param {boolean} confirm True if the screen should confirm auto-launch. */ enableKioskForTesting: function(confirm) { - var button = confirm ? $('kiosk-enable-button') : - $('kiosk-cancel-button'); + var button = + confirm ? $('kiosk-enable-button') : $('kiosk-cancel-button'); var clickEvent = cr.doc.createEvent('Event'); clickEvent.initEvent('click', true, true); button.dispatchEvent(clickEvent); @@ -103,12 +99,8 @@ $('kiosk-enable-button').hidden = true; $('kiosk-cancel-button').hidden = true; $('kiosk-ok-button').hidden = false; - $('kiosk-enable-details').textContent = - loadTimeData.getString(success ? 'kioskEnableSuccessMsg' : - 'kioskEnableErrorMsg'); + $('kiosk-enable-details').textContent = loadTimeData.getString( + success ? 'kioskEnableSuccessMsg' : 'kioskEnableErrorMsg'); } }; }); - - -
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_eula.js b/chrome/browser/resources/chromeos/login/oobe_screen_eula.js index c9dba9e..c521f98f6 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_eula.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_eula.js
@@ -17,14 +17,14 @@ $('stats-help-link').addEventListener('click', function(event) { chrome.send('eulaOnLearnMore'); }); - $('installation-settings-link').addEventListener( - 'click', function(event) { + $('installation-settings-link') + .addEventListener('click', function(event) { chrome.send('eulaOnInstallationSettingsPopupOpened'); $('popup-overlay').hidden = false; $('installation-settings-ok-button').focus(); }); - $('installation-settings-ok-button').addEventListener( - 'click', function(event) { + $('installation-settings-ok-button') + .addEventListener('click', function(event) { $('popup-overlay').hidden = true; }); @@ -118,12 +118,11 @@ enableKeyboardFlow: function() { $('eula-chrome-credits-link').hidden = false; $('eula-chromeos-credits-link').hidden = false; - $('eula-chrome-credits-link').addEventListener('click', - function(event) { - chrome.send('eulaOnChromeCredits'); - }); - $('eula-chromeos-credits-link').addEventListener('click', - function(event) { + $('eula-chrome-credits-link').addEventListener('click', function(event) { + chrome.send('eulaOnChromeCredits'); + }); + $('eula-chromeos-credits-link') + .addEventListener('click', function(event) { chrome.send('eulaOnChromeOSCredits'); }); }, @@ -157,4 +156,3 @@ }, }; }); -
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js index 89b3b7d0..5cd0630 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js
@@ -49,50 +49,42 @@ $('oobe-hid-detection-md').screen = this; - this.context.addObserver( - CONTEXT_KEY_MOUSE_STATE, - function(stateId) { - if (stateId === undefined) - return; - self.setDeviceBlockState_('hid-mouse-block', stateId); - $('oobe-hid-detection-md').setMouseState(stateId); - } - ); - this.context.addObserver( - CONTEXT_KEY_KEYBOARD_STATE, - function(stateId) { - self.updatePincodeKeysState_(); - if (stateId === undefined) - return; - self.setDeviceBlockState_('hid-keyboard-block', stateId); - $('oobe-hid-detection-md').setKeyboardState(stateId); - if (stateId == self.CONNECTION.PAIRED) { - var label = self.context.get(CONTEXT_KEY_KEYBOARD_LABEL, ''); - $('hid-keyboard-label-paired').textContent = label; - $('oobe-hid-detection-md').keyboardPairedLabel = label; - } else if (stateId == self.CONNECTION.PAIRING) { - var label = self.context.get(CONTEXT_KEY_KEYBOARD_LABEL, ''); - $('hid-keyboard-label-pairing').textContent = label; - $('oobe-hid-detection-md').keyboardPairingLabel = label; - } + this.context.addObserver(CONTEXT_KEY_MOUSE_STATE, function(stateId) { + if (stateId === undefined) + return; + self.setDeviceBlockState_('hid-mouse-block', stateId); + $('oobe-hid-detection-md').setMouseState(stateId); + }); + this.context.addObserver(CONTEXT_KEY_KEYBOARD_STATE, function(stateId) { + self.updatePincodeKeysState_(); + if (stateId === undefined) + return; + self.setDeviceBlockState_('hid-keyboard-block', stateId); + $('oobe-hid-detection-md').setKeyboardState(stateId); + if (stateId == self.CONNECTION.PAIRED) { + var label = self.context.get(CONTEXT_KEY_KEYBOARD_LABEL, ''); + $('hid-keyboard-label-paired').textContent = label; + $('oobe-hid-detection-md').keyboardPairedLabel = label; + } else if (stateId == self.CONNECTION.PAIRING) { + var label = self.context.get(CONTEXT_KEY_KEYBOARD_LABEL, ''); + $('hid-keyboard-label-pairing').textContent = label; + $('oobe-hid-detection-md').keyboardPairingLabel = label; } - ); + }); this.context.addObserver( - CONTEXT_KEY_KEYBOARD_PINCODE, - this.updatePincodeKeysState_.bind(this)); + CONTEXT_KEY_KEYBOARD_PINCODE, + this.updatePincodeKeysState_.bind(this)); this.context.addObserver( - CONTEXT_KEY_KEYBOARD_ENTERED_PART_EXPECTED, - this.updatePincodeKeysState_.bind(this)); + CONTEXT_KEY_KEYBOARD_ENTERED_PART_EXPECTED, + this.updatePincodeKeysState_.bind(this)); this.context.addObserver( - CONTEXT_KEY_KEYBOARD_ENTERED_PART_PINCODE, - this.updatePincodeKeysState_.bind(this)); + CONTEXT_KEY_KEYBOARD_ENTERED_PART_PINCODE, + this.updatePincodeKeysState_.bind(this)); this.context.addObserver( - CONTEXT_KEY_CONTINUE_BUTTON_ENABLED, - function(enabled) { - $('hid-continue-button').disabled = !enabled; - $('oobe-hid-detection-md').continueButtonDisabled = !enabled; - } - ); + CONTEXT_KEY_CONTINUE_BUTTON_ENABLED, function(enabled) { + $('hid-continue-button').disabled = !enabled; + $('oobe-hid-detection-md').continueButtonDisabled = !enabled; + }); }, /** @@ -103,8 +95,8 @@ var buttons = []; var continueButton = this.ownerDocument.createElement('button'); continueButton.id = 'hid-continue-button'; - continueButton.textContent = loadTimeData.getString( - 'hidDetectionContinue'); + continueButton.textContent = + loadTimeData.getString('hidDetectionContinue'); continueButton.addEventListener('click', function(e) { chrome.send('HIDDetectionOnContinue'); e.stopPropagation(); @@ -117,7 +109,9 @@ /** * Returns a control which should receive an initial focus. */ - get defaultControl() { return $('hid-continue-button'); }, + get defaultControl() { + return $('hid-continue-button'); + }, /** * Sets a device-block css class to reflect device state of searching, usb, @@ -200,8 +194,8 @@ onBeforeShow: function(data) { this.setMDMode_(); this.setDeviceBlockState_('hid-mouse-block', this.CONNECTION.SEARCHING); - this.setDeviceBlockState_('hid-keyboard-block', - this.CONNECTION.SEARCHING); + this.setDeviceBlockState_( + 'hid-keyboard-block', this.CONNECTION.SEARCHING); $('oobe-hid-detection-md').setMouseState(this.CONNECTION.SEARCHING); $('oobe-hid-detection-md').setKeyboardState(this.CONNECTION.SEARCHING); },
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_network.js b/chrome/browser/resources/chromeos/login/oobe_screen_network.js index 8f9416a1..8bc5bda 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_network.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_network.js
@@ -9,16 +9,14 @@ login.createScreen('NetworkScreen', 'connect', function() { var USER_ACTION_CONTINUE_BUTTON_CLICKED = 'continue'; var USER_ACTION_CONNECT_DEBUGGING_FEATURES_CLICKED = - 'connect-debugging-features'; + 'connect-debugging-features'; var CONTEXT_KEY_LOCALE = 'locale'; var CONTEXT_KEY_INPUT_METHOD = 'input-method'; var CONTEXT_KEY_TIMEZONE = 'timezone'; var CONTEXT_KEY_CONTINUE_BUTTON_ENABLED = 'continue-button-enabled'; return { - EXTERNAL_API: [ - 'showError' - ], + EXTERNAL_API: ['showError'], /** * Dropdown element for networks selection. @@ -27,15 +25,15 @@ /** @override */ decorate: function() { - Oobe.setupSelect($('language-select'), - loadTimeData.getValue('languageList'), - this.onLanguageSelected_.bind(this)); - Oobe.setupSelect($('keyboard-select'), - loadTimeData.getValue('inputMethodsList'), - this.onKeyboardSelected_.bind(this)); - Oobe.setupSelect($('timezone-select'), - loadTimeData.getValue('timezoneList'), - this.onTimezoneSelected_.bind(this)); + Oobe.setupSelect( + $('language-select'), loadTimeData.getValue('languageList'), + this.onLanguageSelected_.bind(this)); + Oobe.setupSelect( + $('keyboard-select'), loadTimeData.getValue('inputMethodsList'), + this.onKeyboardSelected_.bind(this)); + Oobe.setupSelect( + $('timezone-select'), loadTimeData.getValue('timezoneList'), + this.onTimezoneSelected_.bind(this)); // ---------- Welcome screen var welcomeScreen = $('oobe-welcome-md'); @@ -57,35 +55,35 @@ this.dropdown_ = $('networks-list'); cr.ui.DropDown.decorate(this.dropdown_); - this.declareUserAction( - $('connect-debugging-features-link'), - { action_id: USER_ACTION_CONNECT_DEBUGGING_FEATURES_CLICKED, - event: 'click' - }); - this.declareUserAction( - $('connect-debugging-features-link'), - { action_id: USER_ACTION_CONNECT_DEBUGGING_FEATURES_CLICKED, - condition: function(event) { return event.keyCode == 32; }, - event: 'keyup' - }); + this.declareUserAction($('connect-debugging-features-link'), { + action_id: USER_ACTION_CONNECT_DEBUGGING_FEATURES_CLICKED, + event: 'click' + }); + this.declareUserAction($('connect-debugging-features-link'), { + action_id: USER_ACTION_CONNECT_DEBUGGING_FEATURES_CLICKED, + condition: function(event) { + return event.keyCode == 32; + }, + event: 'keyup' + }); this.context.addObserver( - CONTEXT_KEY_INPUT_METHOD, - function(inputMethodId) { + CONTEXT_KEY_INPUT_METHOD, function(inputMethodId) { $('oobe-welcome-md').setSelectedKeyboard(inputMethodId); - option = $('keyboard-select').querySelector( - 'option[value="' + inputMethodId + '"]'); + option = + $('keyboard-select') + .querySelector('option[value="' + inputMethodId + '"]'); if (option) option.selected = true; }); this.context.addObserver(CONTEXT_KEY_TIMEZONE, function(timezoneId) { $('timezone-select').value = timezoneId; }); - this.context.addObserver(CONTEXT_KEY_CONTINUE_BUTTON_ENABLED, - function(enabled) { - $('continue-button').disabled = !enabled; - }); + this.context.addObserver( + CONTEXT_KEY_CONTINUE_BUTTON_ENABLED, function(enabled) { + $('continue-button').disabled = !enabled; + }); }, onLanguageSelected_: function(languageId) { @@ -107,7 +105,7 @@ this.setMDMode_(); cr.ui.DropDown.show('networks-list', true, -1); var debuggingLinkVisible = - data && 'isDeveloperMode' in data && data['isDeveloperMode']; + data && 'isDeveloperMode' in data && data['isDeveloperMode']; this.classList.toggle('connect-debugging-view', debuggingLinkVisible); $('oobe-welcome-md').debuggingLinkVisible = debuggingLinkVisible; @@ -133,8 +131,7 @@ var buttons = []; var continueButton = this.declareButton( - 'continue-button', - USER_ACTION_CONTINUE_BUTTON_CLICKED); + 'continue-button', USER_ACTION_CONTINUE_BUTTON_CLICKED); continueButton.disabled = !this.context.get( CONTEXT_KEY_CONTINUE_BUTTON_ENABLED, false /* default */); continueButton.textContent = loadTimeData.getString('continueButton'); @@ -166,9 +163,8 @@ error.appendChild(messageDiv); error.setAttribute('role', 'alert'); - $('bubble').showContentForElement($('networks-list'), - cr.ui.Bubble.Attachment.BOTTOM, - error); + $('bubble').showContentForElement( + $('networks-list'), cr.ui.Bubble.Attachment.BOTTOM, error); }, /** @@ -206,4 +202,3 @@ }, }; }); -
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js index 183abf4..c1c9e24 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js
@@ -51,7 +51,9 @@ */ isCancelDisabled_: null, - get isCancelDisabled() { return this.isCancelDisabled_; }, + get isCancelDisabled() { + return this.isCancelDisabled_; + }, set isCancelDisabled(disabled) { this.isCancelDisabled_ = disabled; }, @@ -99,83 +101,83 @@ // Establish an initial messaging between content script and // host script so that content script can message back. - $('oauth-enroll-auth-view').addEventListener('loadstop', - function(e) { - e.target.contentWindow.postMessage( - 'initialMessage', $('oauth-enroll-auth-view').src); - }); + $('oauth-enroll-auth-view').addEventListener('loadstop', function(e) { + e.target.contentWindow.postMessage( + 'initialMessage', $('oauth-enroll-auth-view').src); + }); // When we get the advancing focus command message from injected content // script, we can execute it on host script context. - window.addEventListener('message', - function(e) { - if (e.data == 'forwardFocus') - keyboard.onAdvanceFocus(false); - else if (e.data == 'backwardFocus') - keyboard.onAdvanceFocus(true); - }); + window.addEventListener('message', function(e) { + if (e.data == 'forwardFocus') + keyboard.onAdvanceFocus(false); + else if (e.data == 'backwardFocus') + keyboard.onAdvanceFocus(true); + }); - this.authenticator_.addEventListener('ready', - (function() { - if (this.currentStep_ != STEP_SIGNIN) - return; - this.isCancelDisabled = false; - chrome.send('frameLoadingCompleted'); - }).bind(this)); + this.authenticator_.addEventListener( + 'ready', (function() { + if (this.currentStep_ != STEP_SIGNIN) + return; + this.isCancelDisabled = false; + chrome.send('frameLoadingCompleted'); + }).bind(this)); - this.authenticator_.addEventListener('authCompleted', + this.authenticator_.addEventListener( + 'authCompleted', (function(e) { var detail = e.detail; if (!detail.email || !detail.authCode) { this.showError( - loadTimeData.getString('fatalEnrollmentError'), - false); + loadTimeData.getString('fatalEnrollmentError'), false); return; } - chrome.send('oauthEnrollCompleteLogin', [detail.email, - detail.authCode]); + chrome.send( + 'oauthEnrollCompleteLogin', [detail.email, detail.authCode]); }).bind(this)); this.offlineAdUi_.addEventListener('authCompleted', function(e) { this.offlineAdUi_.disabled = true; this.activeDirectoryMachine_ = e.detail.machinename; this.activeDirectoryUsername_ = e.detail.username; - chrome.send('oauthEnrollAdCompleteLogin', + chrome.send( + 'oauthEnrollAdCompleteLogin', [e.detail.machinename, e.detail.username, e.detail.password]); }.bind(this)); - this.authenticator_.addEventListener('authFlowChange', - (function(e) { - var isSAML = this.authenticator_.authFlow == - cr.login.Authenticator.AuthFlow.SAML; - if (isSAML) { - $('oauth-saml-notice-message').textContent = - loadTimeData.getStringF('samlNotice', - this.authenticator_.authDomain); - } - this.classList.toggle('saml', isSAML); - if (Oobe.getInstance().currentScreen == this) - Oobe.getInstance().updateScreenSize(this); - this.lastBackMessageValue_ = false; - this.updateControlsState(); - }).bind(this)); + this.authenticator_.addEventListener( + 'authFlowChange', (function(e) { + var isSAML = this.authenticator_.authFlow == + cr.login.Authenticator.AuthFlow.SAML; + if (isSAML) { + $('oauth-saml-notice-message').textContent = + loadTimeData.getStringF( + 'samlNotice', + this.authenticator_.authDomain); + } + this.classList.toggle('saml', isSAML); + if (Oobe.getInstance().currentScreen == this) + Oobe.getInstance().updateScreenSize(this); + this.lastBackMessageValue_ = false; + this.updateControlsState(); + }).bind(this)); - this.authenticator_.addEventListener('backButton', - (function(e) { - this.lastBackMessageValue_ = !!e.detail; - $('oauth-enroll-auth-view').focus(); - this.updateControlsState(); - }).bind(this)); + this.authenticator_.addEventListener( + 'backButton', (function(e) { + this.lastBackMessageValue_ = !!e.detail; + $('oauth-enroll-auth-view').focus(); + this.updateControlsState(); + }).bind(this)); - this.authenticator_.addEventListener('dialogShown', - (function(e) { - this.navigation_.disabled = true; - }).bind(this)); + this.authenticator_.addEventListener( + 'dialogShown', (function(e) { + this.navigation_.disabled = true; + }).bind(this)); - this.authenticator_.addEventListener('dialogHidden', - (function(e) { - this.navigation_.disabled = false; - }).bind(this)); + this.authenticator_.addEventListener( + 'dialogHidden', (function(e) { + this.navigation_.disabled = false; + }).bind(this)); this.authenticator_.insecureContentBlockedCallback = (function(url) { @@ -187,24 +189,23 @@ this.authenticator_.missingGaiaInfoCallback = (function() { this.showError( - loadTimeData.getString('fatalEnrollmentError'), - false); + loadTimeData.getString('fatalEnrollmentError'), false); }).bind(this); - $('oauth-enroll-error-card').addEventListener('buttonclick', - this.doRetry_.bind(this)); + $('oauth-enroll-error-card') + .addEventListener('buttonclick', this.doRetry_.bind(this)); function doneCallback() { chrome.send('oauthEnrollClose', ['done']); } - $('oauth-enroll-attribute-prompt-error-card').addEventListener( - 'buttonclick', doneCallback); - $('oauth-enroll-success-card').addEventListener( - 'buttonclick', doneCallback); - $('oauth-enroll-abe-success-card').addEventListener( - 'buttonclick', doneCallback); - $('oauth-enroll-active-directory-join-error-card').addEventListener( - 'buttonclick', function() { + $('oauth-enroll-attribute-prompt-error-card') + .addEventListener('buttonclick', doneCallback); + $('oauth-enroll-success-card') + .addEventListener('buttonclick', doneCallback); + $('oauth-enroll-abe-success-card') + .addEventListener('buttonclick', doneCallback); + $('oauth-enroll-active-directory-join-error-card') + .addEventListener('buttonclick', function() { this.showStep(STEP_AD_JOIN); }.bind(this)); @@ -217,16 +218,16 @@ $('oauth-enroll-auth-view').back(); }.bind(this)); - $('oauth-enroll-attribute-prompt-card').addEventListener('submit', - this.onAttributesSubmitted.bind(this)); + $('oauth-enroll-attribute-prompt-card') + .addEventListener('submit', this.onAttributesSubmitted.bind(this)); - $('oauth-enroll-learn-more-link').addEventListener('click', - function(event) { + $('oauth-enroll-learn-more-link') + .addEventListener('click', function(event) { chrome.send('oauthEnrollOnLearnMore'); }); - $('oauth-enroll-skip-button').addEventListener('click', - this.onSkipButtonClicked.bind(this)); + $('oauth-enroll-skip-button') + .addEventListener('click', this.onSkipButtonClicked.bind(this)); }, /** @@ -251,7 +252,7 @@ $('oauth-enroll-auth-view').addContentScripts([{ name: 'injectedTabHandler', matches: ['http://*/*', 'https://*/*'], - js: { code: INJECTED_WEBVIEW_SCRIPT }, + js: {code: INJECTED_WEBVIEW_SCRIPT}, run_at: 'document_start' }]); } @@ -271,13 +272,13 @@ gaiaParams.emailDomain = data.management_domain; } gaiaParams.flow = data.flow; - this.authenticator_.load(cr.login.Authenticator.AuthMode.DEFAULT, - gaiaParams); + this.authenticator_.load( + cr.login.Authenticator.AuthMode.DEFAULT, gaiaParams); var modes = ['manual', 'forced', 'recovery']; for (var i = 0; i < modes.length; ++i) { - this.classList.toggle('mode-' + modes[i], - data.enrollment_mode == modes[i]); + this.classList.toggle( + 'mode-' + modes[i], data.enrollment_mode == modes[i]); } this.isManualEnrollment_ = data.enrollment_mode === 'manual'; this.isCancelDisabled = true; @@ -348,8 +349,8 @@ $('oauth-enroll-active-directory-join-error-card').submitButton.focus(); } else if (step == STEP_AD_JOIN) { this.offlineAdUi_.disabled = false; - this.offlineAdUi_.setUser(this.activeDirectoryUsername_, - this.activeDirectoryMachine_); + this.offlineAdUi_.setUser( + this.activeDirectoryUsername_, this.activeDirectoryMachine_); this.offlineAdUi_.setInvalid(ACTIVE_DIRECTORY_ERROR_STATE.NONE); } @@ -416,9 +417,9 @@ * |chrome| and launches the device attribute update negotiation. */ onAttributesSubmitted: function() { - chrome.send('oauthEnrollAttributes', - [$('oauth-enroll-asset-id').value, - $('oauth-enroll-location').value]); + chrome.send( + 'oauthEnrollAttributes', + [$('oauth-enroll-asset-id').value, $('oauth-enroll-location').value]); }, /** @@ -435,10 +436,10 @@ * Updates visibility of navigation buttons. */ updateControlsState: function() { - this.navigation_.backVisible = this.currentStep_ == STEP_SIGNIN && - this.lastBackMessageValue_; - this.navigation_.refreshVisible = this.isAtTheBeginning() && - !this.isManualEnrollment_; + this.navigation_.backVisible = + this.currentStep_ == STEP_SIGNIN && this.lastBackMessageValue_; + this.navigation_.refreshVisible = + this.isAtTheBeginning() && !this.isManualEnrollment_; this.navigation_.closeVisible = (this.currentStep_ == STEP_SIGNIN || this.currentStep_ == STEP_ERROR ||
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_reset.js b/chrome/browser/resources/chromeos/login/oobe_screen_reset.js index c5d8767..f8814e1 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_reset.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_reset.js
@@ -42,76 +42,62 @@ decorate: function() { var self = this; - this.declareUserAction($('powerwash-help-link'), - { action_id: USER_ACTION_LEARN_MORE_PRESSED, - event: 'click' - }); - this.declareUserAction($('reset-confirm-dismiss'), - { action_id: USER_ACTION_RESET_CONFIRM_DISMISSED, - event: 'click' - }); - this.declareUserAction($('reset-confirm-commit'), - { action_id: USER_ACTION_POWERWASH_PRESSED, - event: 'click' - }); + this.declareUserAction( + $('powerwash-help-link'), + {action_id: USER_ACTION_LEARN_MORE_PRESSED, event: 'click'}); + this.declareUserAction( + $('reset-confirm-dismiss'), + {action_id: USER_ACTION_RESET_CONFIRM_DISMISSED, event: 'click'}); + this.declareUserAction( + $('reset-confirm-commit'), + {action_id: USER_ACTION_POWERWASH_PRESSED, event: 'click'}); + + this.context.addObserver(CONTEXT_KEY_SCREEN_STATE, function(state) { + if (Oobe.getInstance().currentScreen != this) { + setTimeout(function() { + Oobe.resetSigninUI(false); + Oobe.showScreen({id: SCREEN_OOBE_RESET}); + }, 0); + } + if (state == self.RESET_SCREEN_STATE.RESTART_REQUIRED) + self.ui_state = self.RESET_SCREEN_UI_STATE.RESTART_REQUIRED; + if (state == self.RESET_SCREEN_STATE.REVERT_PROMISE) + self.ui_state = self.RESET_SCREEN_UI_STATE.REVERT_PROMISE; + else if (state == self.RESET_SCREEN_STATE.POWERWASH_PROPOSAL) + self.ui_state = self.RESET_SCREEN_UI_STATE.POWERWASH_PROPOSAL; + self.setDialogView_(); + if (state == self.RESET_SCREEN_STATE.REVERT_PROMISE) { + announceAccessibleMessage( + loadTimeData.getString('resetRevertSpinnerMessage')); + } + }); this.context.addObserver( - CONTEXT_KEY_SCREEN_STATE, - function(state) { - if (Oobe.getInstance().currentScreen != this) { - setTimeout(function() { - Oobe.resetSigninUI(false); - Oobe.showScreen({id: SCREEN_OOBE_RESET}); - }, 0); - } - if (state == self.RESET_SCREEN_STATE.RESTART_REQUIRED) - self.ui_state = self.RESET_SCREEN_UI_STATE.RESTART_REQUIRED; - if (state == self.RESET_SCREEN_STATE.REVERT_PROMISE) - self.ui_state = self.RESET_SCREEN_UI_STATE.REVERT_PROMISE; - else if (state == self.RESET_SCREEN_STATE.POWERWASH_PROPOSAL) - self.ui_state = self.RESET_SCREEN_UI_STATE.POWERWASH_PROPOSAL; - self.setDialogView_(); - if (state == self.RESET_SCREEN_STATE.REVERT_PROMISE) { - announceAccessibleMessage( - loadTimeData.getString('resetRevertSpinnerMessage')); - } - } - ); - - this.context.addObserver( - CONTEXT_KEY_IS_OFFICIAL_BUILD, - function(isOfficial) { + CONTEXT_KEY_IS_OFFICIAL_BUILD, function(isOfficial) { $('powerwash-help-link').setAttribute('hidden', !isOfficial); $('oobe-reset-md').isOfficial_ = isOfficial; - } - ); + }); this.context.addObserver( - CONTEXT_KEY_ROLLBACK_CHECKED, - function(rollbackChecked) { + CONTEXT_KEY_ROLLBACK_CHECKED, function(rollbackChecked) { self.setRollbackOptionView(); - } - ); + }); this.context.addObserver( - CONTEXT_KEY_ROLLBACK_AVAILABLE, - function(rollbackAvailable) { + CONTEXT_KEY_ROLLBACK_AVAILABLE, function(rollbackAvailable) { self.setRollbackOptionView(); - } - ); + }); this.context.addObserver( - CONTEXT_KEY_IS_CONFIRMATIONAL_VIEW, - function(is_confirmational) { + CONTEXT_KEY_IS_CONFIRMATIONAL_VIEW, function(is_confirmational) { if (is_confirmational) { console.log(self.context.get(CONTEXT_KEY_SCREEN_STATE, 0)); if (self.context.get(CONTEXT_KEY_SCREEN_STATE, 0) != self.RESET_SCREEN_STATE.POWERWASH_PROPOSAL) - return; + return; console.log(self); reset.ConfirmResetOverlay.getInstance().initializePage(); } else { $('overlay-reset').setAttribute('hidden', true); } - } - ); + }); }, /** @@ -131,10 +117,9 @@ var restartButton = this.ownerDocument.createElement('button'); restartButton.id = 'reset-restart-button'; restartButton.textContent = loadTimeData.getString('resetButtonRestart'); - this.declareUserAction(restartButton, - { action_id: USER_ACTION_RESTART_PRESSED, - event: 'click' - }); + this.declareUserAction( + restartButton, + {action_id: USER_ACTION_RESTART_PRESSED, event: 'click'}); buttons.push(restartButton); // Button that leads to confirmation pop-up dialog. @@ -142,19 +127,16 @@ toConfirmButton.id = 'reset-toconfirm-button'; toConfirmButton.textContent = loadTimeData.getString('resetButtonPowerwash'); - this.declareUserAction(toConfirmButton, - { action_id: USER_ACTION_SHOW_CONFIRMATION, - event: 'click' - }); + this.declareUserAction( + toConfirmButton, + {action_id: USER_ACTION_SHOW_CONFIRMATION, event: 'click'}); buttons.push(toConfirmButton); var cancelButton = this.ownerDocument.createElement('button'); cancelButton.id = 'reset-cancel-button'; cancelButton.textContent = loadTimeData.getString('cancelButton'); - this.declareUserAction(cancelButton, - { action_id: USER_ACTION_CANCEL_RESET, - event: 'click' - }); + this.declareUserAction( + cancelButton, {action_id: USER_ACTION_CANCEL_RESET, event: 'click'}); buttons.push(cancelButton); return buttons; @@ -167,8 +149,9 @@ // choose if (this.isMDMode_()) return $('oobe-reset-md'); - if (this.context.get(CONTEXT_KEY_SCREEN_STATE, - this.RESET_SCREEN_STATE.RESTART_REQUIRED) == + if (this.context.get( + CONTEXT_KEY_SCREEN_STATE, + this.RESET_SCREEN_STATE.RESTART_REQUIRED) == this.RESET_SCREEN_STATE.RESTART_REQUIRED) return $('reset-restart-button'); if (this.context.get(CONTEXT_KEY_IS_CONFIRMATIONAL_VIEW, false)) @@ -181,8 +164,9 @@ */ cancel: function() { if (this.context.get(CONTEXT_KEY_IS_CONFIRMATIONAL_VIEW, false)) { - $('reset').send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_RESET_CONFIRM_DISMISSED); + $('reset').send( + login.Screen.CALLBACK_USER_ACTED, + USER_ACTION_RESET_CONFIRM_DISMISSED); return; } this.send(login.Screen.CALLBACK_USER_ACTED, USER_ACTION_CANCEL_RESET); @@ -276,13 +260,13 @@ if (this.context.get(CONTEXT_KEY_ROLLBACK_AVAILABLE, false) && this.context.get(CONTEXT_KEY_ROLLBACK_CHECKED, false)) { // show rollback option - $('reset-toconfirm-button').textContent = loadTimeData.getString( - 'resetButtonPowerwashAndRollback'); + $('reset-toconfirm-button').textContent = + loadTimeData.getString('resetButtonPowerwashAndRollback'); this.ui_state = this.RESET_SCREEN_UI_STATE.ROLLBACK_PROPOSAL; } else { // hide rollback option - $('reset-toconfirm-button').textContent = loadTimeData.getString( - 'resetButtonPowerwash'); + $('reset-toconfirm-button').textContent = + loadTimeData.getString('resetButtonPowerwash'); this.ui_state = this.RESET_SCREEN_UI_STATE.POWERWASH_PROPOSAL; } this.setDialogView_();
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js b/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js index b1f3288..e0aa52d2 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_reset_confirmation_overlay.js
@@ -10,8 +10,7 @@ * Encapsulated handling of the 'Confirm reset device' overlay OOBE page. * @class */ - function ConfirmResetOverlay() { - } + function ConfirmResetOverlay() {} cr.addSingletonGetter(ConfirmResetOverlay); @@ -22,8 +21,9 @@ initializePage: function() { var overlay = $('reset-confirm-overlay'); overlay.addEventListener('cancelOverlay', function(e) { - $('reset').send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_RESET_CONFIRM_DISMISSED); + $('reset').send( + login.Screen.CALLBACK_USER_ACTED, + USER_ACTION_RESET_CONFIRM_DISMISSED); e.stopPropagation(); }); $('overlay-reset').removeAttribute('hidden'); @@ -31,7 +31,5 @@ }; // Export - return { - ConfirmResetOverlay: ConfirmResetOverlay - }; + return {ConfirmResetOverlay: ConfirmResetOverlay}; });
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_terms_of_service.js b/chrome/browser/resources/chromeos/login/oobe_screen_terms_of_service.js index 3e11a158..508bab6 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_terms_of_service.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_terms_of_service.js
@@ -6,13 +6,10 @@ * @fileoverview Oobe Terms of Service screen implementation. */ -login.createScreen('TermsOfServiceScreen', 'terms-of-service', - function() { return { - EXTERNAL_API: [ - 'setDomain', - 'setTermsOfServiceLoadError', - 'setTermsOfService' - ], +login.createScreen('TermsOfServiceScreen', 'terms-of-service', function() { + return { + EXTERNAL_API: + ['setDomain', 'setTermsOfServiceLoadError', 'setTermsOfService'], /** * Updates headings on the screen to indicate that the Terms of Service @@ -108,4 +105,3 @@ } }; }); -
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_update.js b/chrome/browser/resources/chromeos/login/oobe_screen_update.js index 0efb1b8..4edfccf 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_update.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_update.js
@@ -24,39 +24,38 @@ decorate: function() { var self = this; - this.context.addObserver(CONTEXT_KEY_TIME_LEFT_SEC, - function(time_left_sec) { - self.setEstimatedTimeLeft(time_left_sec); - }); - this.context.addObserver(CONTEXT_KEY_SHOW_TIME_LEFT, - function(show_time_left) { - self.showEstimatedTimeLeft(show_time_left); - }); - this.context.addObserver(CONTEXT_KEY_UPDATE_MESSAGE, - function(update_msg) { - self.setUpdateMessage(update_msg); - }); - this.context.addObserver(CONTEXT_KEY_SHOW_CURTAIN, - function(show_curtain) { - self.showUpdateCurtain(show_curtain); - }); - this.context.addObserver(CONTEXT_KEY_SHOW_PROGRESS_MESSAGE, - function(show_progress_msg) { - self.showProgressMessage(show_progress_msg); - }); - this.context.addObserver(CONTEXT_KEY_PROGRESS, - function(progress) { + this.context.addObserver( + CONTEXT_KEY_TIME_LEFT_SEC, function(time_left_sec) { + self.setEstimatedTimeLeft(time_left_sec); + }); + this.context.addObserver( + CONTEXT_KEY_SHOW_TIME_LEFT, function(show_time_left) { + self.showEstimatedTimeLeft(show_time_left); + }); + this.context.addObserver( + CONTEXT_KEY_UPDATE_MESSAGE, function(update_msg) { + self.setUpdateMessage(update_msg); + }); + this.context.addObserver( + CONTEXT_KEY_SHOW_CURTAIN, function(show_curtain) { + self.showUpdateCurtain(show_curtain); + }); + this.context.addObserver( + CONTEXT_KEY_SHOW_PROGRESS_MESSAGE, function(show_progress_msg) { + self.showProgressMessage(show_progress_msg); + }); + this.context.addObserver(CONTEXT_KEY_PROGRESS, function(progress) { self.setUpdateProgress(progress); }); - this.context.addObserver(CONTEXT_KEY_PROGRESS_MESSAGE, - function(progress_msg) { - self.setProgressMessage(progress_msg); - }); - this.context.addObserver(CONTEXT_KEY_CANCEL_UPDATE_SHORTCUT_ENABLED, - function(enabled) { - $('update-cancel-hint').hidden = !enabled; - $('oobe-update-md').cancelAllowed = enabled; - }); + this.context.addObserver( + CONTEXT_KEY_PROGRESS_MESSAGE, function(progress_msg) { + self.setProgressMessage(progress_msg); + }); + this.context.addObserver( + CONTEXT_KEY_CANCEL_UPDATE_SHORTCUT_ENABLED, function(enabled) { + $('update-cancel-hint').hidden = !enabled; + $('oobe-update-md').cancelAllowed = enabled; + }); }, /** @@ -77,8 +76,8 @@ var message = loadTimeData.getString('cancelledUpdateMessage'); updateCancelHint.textContent = message; $('oobe-update-md').setCancelHint(message); - this.send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_CANCEL_UPDATE_SHORTCUT); + this.send( + login.Screen.CALLBACK_USER_ACTED, USER_ACTION_CANCEL_UPDATE_SHORTCUT); }, /** @@ -113,16 +112,15 @@ } else if (minutes > 55) { message = loadTimeData.getString('downloadingTimeLeftStatusOneHour'); } else if (minutes > 20) { - message = loadTimeData.getStringF('downloadingTimeLeftStatusMinutes', - Math.ceil(minutes / 5) * 5); + message = loadTimeData.getStringF( + 'downloadingTimeLeftStatusMinutes', Math.ceil(minutes / 5) * 5); } else if (minutes > 1) { - message = loadTimeData.getStringF('downloadingTimeLeftStatusMinutes', - minutes); + message = loadTimeData.getStringF( + 'downloadingTimeLeftStatusMinutes', minutes); } else { message = loadTimeData.getString('downloadingTimeLeftSmall'); } - var formattedMessage = - loadTimeData.getStringF('downloading', message); + var formattedMessage = loadTimeData.getStringF('downloading', message); $('estimated-time-left').textContent = formattedMessage; $('oobe-update-md').estimatedTimeLeft = formattedMessage; },
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js index a7d433fb..4a46a55 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
@@ -15,10 +15,7 @@ var ButtonImages = UserImagesGrid.ButtonImages; return { - EXTERNAL_API: [ - 'setDefaultImages', - 'hideCurtain' - ], + EXTERNAL_API: ['setDefaultImages', 'hideCurtain'], /** @override */ decorate: function(element) { @@ -27,20 +24,21 @@ // Preview image will track the selected item's URL. var previewElement = $('user-image-preview'); - previewElement.oncontextmenu = function(e) { e.preventDefault(); }; + previewElement.oncontextmenu = function(e) { + e.preventDefault(); + }; imageGrid.previewElement = previewElement; imageGrid.selectionType = 'default'; imageGrid.flipPhotoElement = $('flip-photo'); - imageGrid.addEventListener('select', - this.handleSelect_.bind(this)); - imageGrid.addEventListener('activate', - this.handleImageActivated_.bind(this)); - imageGrid.addEventListener('phototaken', - this.handlePhotoTaken_.bind(this)); - imageGrid.addEventListener('photoupdated', - this.handlePhotoUpdated_.bind(this)); + imageGrid.addEventListener('select', this.handleSelect_.bind(this)); + imageGrid.addEventListener( + 'activate', this.handleImageActivated_.bind(this)); + imageGrid.addEventListener( + 'phototaken', this.handlePhotoTaken_.bind(this)); + imageGrid.addEventListener( + 'photoupdated', this.handlePhotoUpdated_.bind(this)); // Set the title for camera item in the grid. imageGrid.setCameraTitles( @@ -51,10 +49,10 @@ // Profile image data (if present). this.profileImage_ = imageGrid.addItem( - ButtonImages.PROFILE_PICTURE, // Image URL. - loadTimeData.getString('profilePhoto'), // Title. - undefined, // Click handler. - 0, // Position. + ButtonImages.PROFILE_PICTURE, // Image URL. + loadTimeData.getString('profilePhoto'), // Title. + undefined, // Click handler. + 0, // Position. function(el) { // Custom decorator for Profile image element. var spinner = el.ownerDocument.createElement('div'); @@ -67,38 +65,38 @@ }); this.profileImage_.type = 'profile'; - $('take-photo').addEventListener( - 'click', this.handleTakePhoto_.bind(this)); - $('discard-photo').addEventListener( - 'click', this.handleDiscardPhoto_.bind(this)); + $('take-photo') + .addEventListener('click', this.handleTakePhoto_.bind(this)); + $('discard-photo') + .addEventListener('click', this.handleDiscardPhoto_.bind(this)); // Toggle 'animation' class for the duration of WebKit transition. - $('flip-photo').addEventListener( - 'click', this.handleFlipPhoto_.bind(this)); - $('user-image-stream-crop').addEventListener( - 'transitionend', function(e) { + $('flip-photo') + .addEventListener('click', this.handleFlipPhoto_.bind(this)); + $('user-image-stream-crop') + .addEventListener('transitionend', function(e) { previewElement.classList.remove('animation'); }); - $('user-image-preview-img').addEventListener( - 'transitionend', function(e) { + $('user-image-preview-img') + .addEventListener('transitionend', function(e) { previewElement.classList.remove('animation'); }); var self = this; - this.context.addObserver(CONTEXT_KEY_IS_CAMERA_PRESENT, - function(present) { - $('user-image-grid').cameraPresent = present; - }); - this.context.addObserver(CONTEXT_KEY_SELECTED_IMAGE_URL, - this.setSelectedImage_); - this.context.addObserver(CONTEXT_KEY_PROFILE_PICTURE_DATA_URL, - function(url) { - self.profileImageLoading = false; - if (url) { - self.profileImage_ = - $('user-image-grid').updateItem(self.profileImage_, url); - } - }); + this.context.addObserver( + CONTEXT_KEY_IS_CAMERA_PRESENT, function(present) { + $('user-image-grid').cameraPresent = present; + }); + this.context.addObserver( + CONTEXT_KEY_SELECTED_IMAGE_URL, this.setSelectedImage_); + this.context.addObserver( + CONTEXT_KEY_PROFILE_PICTURE_DATA_URL, function(url) { + self.profileImageLoading = false; + if (url) { + self.profileImage_ = + $('user-image-grid').updateItem(self.profileImage_, url); + } + }); this.updateLocalizedContent(); @@ -146,8 +144,8 @@ }, set profileImageLoading(value) { this.profileImageLoading_ = value; - $('user-image-screen-main').classList.toggle('profile-image-loading', - value); + $('user-image-screen-main') + .classList.toggle('profile-image-loading', value); if (value) announceAccessibleMessage(loadTimeData.getString('syncingPreferences')); this.updateProfileImageCaption_(); @@ -199,16 +197,15 @@ if (imageGrid.selectionType == 'camera') { // Programmatic selection of camera item is done in // startCamera callback where streaming is started by itself. - imageGrid.startCamera( - function() { - // Start capture if camera is still the selected item. - $('user-image-preview-img').classList.toggle( - 'animated-transform', true); - return imageGrid.selectedItem == imageGrid.cameraImage; - }); + imageGrid.startCamera(function() { + // Start capture if camera is still the selected item. + $('user-image-preview-img') + .classList.toggle('animated-transform', true); + return imageGrid.selectedItem == imageGrid.cameraImage; + }); } else { - $('user-image-preview-img').classList.toggle('animated-transform', - false); + $('user-image-preview-img') + .classList.toggle('animated-transform', false); imageGrid.stopCamera(); } } @@ -230,7 +227,8 @@ imageGrid.previewElement.classList.add('animation'); imageGrid.flipPhoto = !imageGrid.flipPhoto; var flipMessageId = imageGrid.flipPhoto ? - 'photoFlippedAccessibleText' : 'photoFlippedBackAccessibleText'; + 'photoFlippedAccessibleText' : + 'photoFlippedBackAccessibleText'; announceAccessibleMessage(loadTimeData.getString(flipMessageId)); }, @@ -355,7 +353,8 @@ updateCaption_: function() { $('user-image-preview-caption').textContent = $('user-image-grid').selectionType == 'profile' ? - this.profileImageCaption : ''; + this.profileImageCaption : + ''; }, /** @@ -371,7 +370,7 @@ */ updateProfileImageCaption_: function() { this.profileImageCaption = loadTimeData.getString( - this.profileImageLoading_ ? 'profilePhotoLoading' : 'profilePhoto'); + this.profileImageLoading_ ? 'profilePhotoLoading' : 'profilePhoto'); }, /** @@ -380,10 +379,10 @@ */ notifyImageSelected_: function() { var imageGrid = $('user-image-grid'); - chrome.send('selectImage', - [imageGrid.selectedItemUrl, - imageGrid.selectionType, - !imageGrid.inProgramSelection]); + chrome.send('selectImage', [ + imageGrid.selectedItemUrl, imageGrid.selectionType, + !imageGrid.inProgramSelection + ]); } }; });
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_voice_interaction_value_prop.js b/chrome/browser/resources/chromeos/login/oobe_screen_voice_interaction_value_prop.js index 67e4b40..3fdcd5ed 100644 --- a/chrome/browser/resources/chromeos/login/oobe_screen_voice_interaction_value_prop.js +++ b/chrome/browser/resources/chromeos/login/oobe_screen_voice_interaction_value_prop.js
@@ -6,42 +6,43 @@ * @fileoverview Oobe Voice Interaction Value Prop screen implementation. */ -login.createScreen('VoiceInteractionValuePropScreen', - 'voice-interaction-value-prop', function() { - return { +login.createScreen( + 'VoiceInteractionValuePropScreen', 'voice-interaction-value-prop', + function() { + return { - /** @Override */ - onBeforeShow: function(data) { - var valueView = $('voice-interaction-value-prop-md'). - getElement('value-prop-view'); + /** @Override */ + onBeforeShow: function(data) { + var valueView = $('voice-interaction-value-prop-md') + .getElement('value-prop-view'); - valueView.addContentScripts([ - { + valueView.addContentScripts([{ name: 'stripLinks', matches: ['<all_urls>'], - js: { code: - "document.querySelectorAll('a').forEach(" + - "function(anchor){anchor.href='javascript:void(0)';})" + js: { + code: 'document.querySelectorAll(\'a\').forEach(' + + 'function(anchor){anchor.href=\'javascript:void(0)\';})' }, run_at: 'document_end' }]); - // TODO(updowndota): provide static content later for the final fallback. - valueView.request.onHeadersReceived.addListener(function(details) { - if (details.statusCode == '404') { - if (valueView.src != - 'https://www.gstatic.com/opa-chromeos/oobe/en/value_proposition.html') { - valueView.src = - 'https://www.gstatic.com/opa-chromeos/oobe/en/value_proposition.html'; - } + // TODO(updowndota): provide static content later for the final + // fallback. + valueView.request.onHeadersReceived.addListener(function(details) { + if (details.statusCode == '404') { + if (valueView.src != + 'https://www.gstatic.com/opa-chromeos/oobe/en/value_proposition.html') { + valueView.src = + 'https://www.gstatic.com/opa-chromeos/oobe/en/value_proposition.html'; + } + } + }, {urls: ['<all_urls>'], types: ['main_frame']}); + + var locale = loadTimeData.getString('locale'); + valueView.src = 'https://www.gstatic.com/opa-chromeos/oobe/' + + locale + '/value_proposition.html'; + + Oobe.getInstance().headerHidden = true; } - }, {urls: ['<all_urls>'], types: ['main_frame']}); - - var locale = loadTimeData.getString('locale'); - valueView.src = 'https://www.gstatic.com/opa-chromeos/oobe/' + locale - + '/value_proposition.html'; - - Oobe.getInstance().headerHidden = true; - } - }; -}); + }; + });
diff --git a/chrome/browser/resources/chromeos/login/oobe_voice_interaction_value_prop.js b/chrome/browser/resources/chromeos/login/oobe_voice_interaction_value_prop.js index 6a86000..339fe66 100644 --- a/chrome/browser/resources/chromeos/login/oobe_voice_interaction_value_prop.js +++ b/chrome/browser/resources/chromeos/login/oobe_voice_interaction_value_prop.js
@@ -23,7 +23,8 @@ * @private */ onNoThanksTap_: function() { - chrome.send('login.VoiceInteractionValuePropScreen.userActed', + chrome.send( + 'login.VoiceInteractionValuePropScreen.userActed', ['no-thanks-pressed']); }, @@ -33,7 +34,8 @@ * @private */ onContinueTap_: function() { - chrome.send('login.VoiceInteractionValuePropScreen.userActed', + chrome.send( + 'login.VoiceInteractionValuePropScreen.userActed', ['continue-pressed']); }, });
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js index 2ee3039..dbc0d7a1 100644 --- a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js +++ b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js
@@ -24,7 +24,7 @@ /** * Controls displaying of "Enable debugging features" link. */ - debuggingLinkVisible: Boolean, + debuggingLinkVisible: Boolean, }, /** @@ -34,28 +34,28 @@ focusedElement_: 'languageSelectionButton', onLanguageClicked_: function() { - this.focusedElement_ = "languageSelectionButton"; + this.focusedElement_ = 'languageSelectionButton'; this.fire('language-button-clicked'); }, onAccessibilityClicked_: function() { - this.focusedElement_ = "accessibilitySettingsButton"; + this.focusedElement_ = 'accessibilitySettingsButton'; this.fire('accessibility-button-clicked'); }, onTimezoneClicked_: function() { - this.focusedElement_ = "timezoneSettingsButton"; + this.focusedElement_ = 'timezoneSettingsButton'; this.fire('timezone-button-clicked'); }, onNextClicked_: function() { - this.focusedElement_ = "welcomeNextButton"; + this.focusedElement_ = 'welcomeNextButton'; this.fire('next-button-clicked'); }, onDebuggingLinkClicked_: function() { - chrome.send('login.NetworkScreen.userActed', - ['connect-debugging-features']); + chrome.send( + 'login.NetworkScreen.userActed', ['connect-debugging-features']); }, attached: function() { @@ -69,18 +69,18 @@ }, /** - * This is called from oobe_welcome when this dialog is shown. - */ + * This is called from oobe_welcome when this dialog is shown. + */ show: function() { this.focus(); }, /** - * This function formats message for labels. - * @param String label i18n string ID. - * @param String parameter i18n string parameter. - * @private - */ + * This function formats message for labels. + * @param String label i18n string ID. + * @param String parameter i18n string parameter. + * @private + */ formatMessage_: function(label, parameter) { return loadTimeData.getStringF(label, parameter); },
diff --git a/chrome/browser/resources/chromeos/login/saml_confirm_password.js b/chrome/browser/resources/chromeos/login/saml_confirm_password.js index ad1d90e..1a671fe 100644 --- a/chrome/browser/resources/chromeos/login/saml_confirm_password.js +++ b/chrome/browser/resources/chromeos/login/saml_confirm_password.js
@@ -8,17 +8,10 @@ properties: { email: String, - disabled: { - type: Boolean, - value: false, - observer: 'disabledChanged_' - }, + disabled: {type: Boolean, value: false, observer: 'disabledChanged_'}, - manualInput: { - type: Boolean, - value: false, - observer: 'manualInputChanged_' - } + manualInput: + {type: Boolean, value: false, observer: 'manualInputChanged_'} }, ready: function() { @@ -29,8 +22,11 @@ */ var pages = this.$.animatedPages; delete pages._squelchNextFinishEvent; - Object.defineProperty(pages, '_squelchNextFinishEvent', - { get: function() { return false; } }); + Object.defineProperty(pages, '_squelchNextFinishEvent', { + get: function() { + return false; + } + }); }, reset: function() { @@ -102,11 +98,12 @@ manualInputChanged_: function() { var titleId = - this.manualInput ? 'manualPasswordTitle' : 'confirmPasswordTitle'; + this.manualInput ? 'manualPasswordTitle' : 'confirmPasswordTitle'; var passwordInputLabelId = - this.manualInput ? 'manualPasswordInputLabel' : 'confirmPasswordLabel'; + this.manualInput ? 'manualPasswordInputLabel' : 'confirmPasswordLabel'; var passwordInputErrorId = this.manualInput ? - 'manualPasswordMismatch' : 'confirmPasswordIncorrectPassword'; + 'manualPasswordMismatch' : + 'confirmPasswordIncorrectPassword'; this.$.title.textContent = loadTimeData.getString(titleId); this.$.passwordInput.label = loadTimeData.getString(passwordInputLabelId);
diff --git a/chrome/browser/resources/chromeos/login/saml_interstitial.js b/chrome/browser/resources/chromeos/login/saml_interstitial.js index 543058a..7da3ee2 100644 --- a/chrome/browser/resources/chromeos/login/saml_interstitial.js +++ b/chrome/browser/resources/chromeos/login/saml_interstitial.js
@@ -10,15 +10,9 @@ type: HTMLElement, }, - domain: { - type: String, - observer: 'onDomainChanged_' - }, + domain: {type: String, observer: 'onDomainChanged_'}, - showDomainMessages_: { - type: Boolean, - value: false - } + showDomainMessages_: {type: Boolean, value: false} }, ready: function() { this.changeAccountLink = this.$.changeAccountLink; @@ -28,9 +22,9 @@ }, onDomainChanged_: function() { this.$.managedBy.textContent = - loadTimeData.getStringF('enterpriseInfoMessage', this.domain); + loadTimeData.getStringF('enterpriseInfoMessage', this.domain); this.$.message.content = - loadTimeData.getStringF('samlInterstitialMessage', this.domain); + loadTimeData.getStringF('samlInterstitialMessage', this.domain); this.showDomainMessages_ = !!this.domain.length; }, onSamlPageNextClicked_: function() {
diff --git a/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js b/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js index 391efad..94a687d 100644 --- a/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js +++ b/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js
@@ -5,48 +5,46 @@ /** * @fileoverview Active Directory password change screen implementation. */ -login.createScreen('ActiveDirectoryPasswordChangeScreen', 'ad-password-change', - function() { - return { - EXTERNAL_API: [ - 'show' - ], +login.createScreen( + 'ActiveDirectoryPasswordChangeScreen', 'ad-password-change', function() { + return { + EXTERNAL_API: ['show'], - adPasswordChanged_: null, + adPasswordChanged_: null, - /** @override */ - decorate: function() { - this.adPasswordChanged_ = $('active-directory-password-change'); - this.adPasswordChanged_.addEventListener('cancel', - this.cancel.bind(this)); + /** @override */ + decorate: function() { + this.adPasswordChanged_ = $('active-directory-password-change'); + this.adPasswordChanged_.addEventListener( + 'cancel', this.cancel.bind(this)); - this.adPasswordChanged_.addEventListener('authCompleted', - function(e) { - chrome.send('completeAdPasswordChange', - [e.detail.username, - e.detail.oldPassword, - e.detail.newPassword]); - }); - }, + this.adPasswordChanged_.addEventListener( + 'authCompleted', function(e) { + chrome.send('completeAdPasswordChange', [ + e.detail.username, e.detail.oldPassword, e.detail.newPassword + ]); + }); + }, - /** - * Cancels password changing and drops the user back to the login screen. - */ - cancel: function() { - Oobe.showUserPods(); - }, + /** + * Cancels password changing and drops the user back to the login + * screen. + */ + cancel: function() { + Oobe.showUserPods(); + }, - /** - * Shows password changed screen. - * @param {string} username Name of user that should change the password. - */ - show: function(username) { - // Active Directory password change screen is similar to Active Directory - // login screen. So we restore bottom bar controls. - Oobe.getInstance().headerHidden = false; - Oobe.showScreen({id: SCREEN_ACTIVE_DIRECTORY_PASSWORD_CHANGE}); - this.adPasswordChanged_.reset(); - this.adPasswordChanged_.username = username; - } - }; -}); + /** + * Shows password changed screen. + * @param {string} username Name of user that should change the password. + */ + show: function(username) { + // Active Directory password change screen is similar to Active + // Directory login screen. So we restore bottom bar controls. + Oobe.getInstance().headerHidden = false; + Oobe.showScreen({id: SCREEN_ACTIVE_DIRECTORY_PASSWORD_CHANGE}); + this.adPasswordChanged_.reset(); + this.adPasswordChanged_.username = username; + } + }; + });
diff --git a/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js b/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js index 7a0b6c7..fd554e8d 100644 --- a/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js +++ b/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js
@@ -21,13 +21,10 @@ }); var networkContainer = $('splash-config-network-container'); - networkContainer.addEventListener( - 'transitionend', - function(e) { - if (this.classList.contains('faded')) - $('splash-config-network').hidden = true; - }.bind(networkContainer) - ); + networkContainer.addEventListener('transitionend', function(e) { + if (this.classList.contains('faded')) + $('splash-config-network').hidden = true; + }.bind(networkContainer)); // Ensure the transitionend event gets called after a wait time. // The wait time should be inline with the transition duration time @@ -55,8 +52,7 @@ /** * Event handler that is invoked just before the frame is hidden. */ - onBeforeHide: function() { - }, + onBeforeHide: function() {}, /** * Toggles visibility of the network configuration option.
diff --git a/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js b/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js index a684cf7a..edd6873e 100644 --- a/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js +++ b/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
@@ -6,12 +6,10 @@ * @fileoverview Oobe ARC Terms of Service screen implementation. */ -login.createScreen('ArcTermsOfServiceScreen', 'arc-tos', - function() { return { +login.createScreen('ArcTermsOfServiceScreen', 'arc-tos', function() { + return { EXTERNAL_API: [ - 'setMetricsMode', - 'setBackupAndRestoreMode', - 'setLocationServicesMode', + 'setMetricsMode', 'setBackupAndRestoreMode', 'setLocationServicesMode', 'setCountryCode' ], @@ -48,15 +46,12 @@ } var termsView = this.getElement_('arc-tos-view'); - var requestFilter = { - urls: ['<all_urls>'], - types: ['main_frame'] - }; + var requestFilter = {urls: ['<all_urls>'], types: ['main_frame']}; termsView.request.onErrorOccurred.addListener( this.onTermsViewErrorOccurred.bind(this), requestFilter); - termsView.addEventListener('contentload', - this.onTermsViewContentLoad.bind(this)); + termsView.addEventListener( + 'contentload', this.onTermsViewContentLoad.bind(this)); // Open links from webview in overlay dialog. var self = this; @@ -65,18 +60,17 @@ self.showUrlOverlay(event.targetUrl); }); - termsView.addContentScripts([ - { name: 'postProcess', - matches: ['https://play.google.com/*'], - css: { files: ['playstore.css'] }, - js: { files: ['playstore.js'] }, - run_at: 'document_end' - }]); + termsView.addContentScripts([{ + name: 'postProcess', + matches: ['https://play.google.com/*'], + css: {files: ['playstore.css']}, + js: {files: ['playstore.js']}, + run_at: 'document_end' + }]); this.getElement_('arc-policy-link').onclick = function() { termsView.executeScript( - {code: 'getPrivacyPolicyLink();'}, - function(results) { + {code: 'getPrivacyPolicyLink();'}, function(results) { if (results && results.length == 1 && typeof results[0] == 'string') { self.showUrlOverlay(results[0]); @@ -141,8 +135,7 @@ * @param {boolean} managed Defines whether this setting is set by policy. */ setBackupAndRestoreMode: function(enabled, managed) { - this.setPreference('arc-enable-backup-restore', - enabled, managed); + this.setPreference('arc-enable-backup-restore', enabled, managed); }, /** @@ -151,8 +144,7 @@ * @param {boolean} managed Defines whether this setting is set by policy. */ setLocationServicesMode: function(enabled, managed) { - this.setPreference('arc-enable-location-service', - enabled, managed); + this.setPreference('arc-enable-location-service', enabled, managed); }, /** @@ -160,19 +152,19 @@ * @param {string} countryCode Country code based on current timezone. */ setCountryCode: function(countryCode) { - var scriptSetParameters = 'document.countryCode = \'' + - countryCode.toLowerCase() + '\';'; + var scriptSetParameters = + 'document.countryCode = \'' + countryCode.toLowerCase() + '\';'; if (this.useMDOobe) { scriptSetParameters += 'document.viewMode = \'large-view\';'; } var termsView = this.getElement_('arc-tos-view'); termsView.removeContentScripts(['preProcess']); - termsView.addContentScripts([ - { name: 'preProcess', - matches: ['https://play.google.com/*'], - js: { code: scriptSetParameters }, - run_at: 'document_start' - }]); + termsView.addContentScripts([{ + name: 'preProcess', + matches: ['https://play.google.com/*'], + js: {code: scriptSetParameters}, + run_at: 'document_start' + }]); if (!$('arc-tos').hidden) { this.reloadPlayStore(); @@ -221,11 +213,12 @@ this.enableButtons_(false); var isBackupRestoreEnabled = - this.getElement_('arc-enable-backup-restore').checked; + this.getElement_('arc-enable-backup-restore').checked; var isLocationServiceEnabled = - this.getElement_('arc-enable-location-service').checked; + this.getElement_('arc-enable-location-service').checked; - chrome.send('arcTermsOfServiceAccept', + chrome.send( + 'arcTermsOfServiceAccept', [isBackupRestoreEnabled, isLocationServiceEnabled]); }, @@ -314,7 +307,7 @@ * * @private */ - addClass_: function (className) { + addClass_: function(className) { this.classList.add(className); $('arc-tos-md').getElement('arc-tos-dialog-md').classList.add(className); }, @@ -326,10 +319,11 @@ * * @private */ - removeClass_: function (className) { + removeClass_: function(className) { this.classList.remove(className); - $('arc-tos-md').getElement('arc-tos-dialog-md').classList. - remove(className); + $('arc-tos-md') + .getElement('arc-tos-dialog-md') + .classList.remove(className); }, /** @@ -386,7 +380,7 @@ // Reload caption image in case it was not loaded during the // initialization phase. $('arc-tos-logo').src = - 'https://play.google.com/about/images/play_logo.png'; + 'https://play.google.com/about/images/play_logo.png'; this.hideOverlay(); this.reloadPlayStore(); @@ -426,8 +420,9 @@ var leanMoreBackupAndRestoreText = loadTimeData.getString('arcLearnMoreBackupAndRestore'); var backupAndRestore = this.getElement_('arc-enable-backup-restore'); - backupAndRestore.parentElement.querySelector( - '#learn-more-link-backup-restore').onclick = function(event) { + backupAndRestore.parentElement + .querySelector('#learn-more-link-backup-restore') + .onclick = function(event) { event.stopPropagation(); self.showLearnMoreOverlay(leanMoreBackupAndRestoreText); }; @@ -435,8 +430,9 @@ var leanMoreLocationServiceText = loadTimeData.getString('arcLearnMoreLocationService'); var locationService = this.getElement_('arc-enable-location-service'); - locationService.parentElement.querySelector( - '#learn-more-link-location-service').onclick = function(event) { + locationService.parentElement + .querySelector('#learn-more-link-location-service') + .onclick = function(event) { event.stopPropagation(); self.showLearnMoreOverlay(leanMoreLocationServiceText); };
diff --git a/chrome/browser/resources/chromeos/login/screen_confirm_password.js b/chrome/browser/resources/chromeos/login/screen_confirm_password.js index 09dfdbe..739f430 100644 --- a/chrome/browser/resources/chromeos/login/screen_confirm_password.js +++ b/chrome/browser/resources/chromeos/login/screen_confirm_password.js
@@ -8,9 +8,7 @@ login.createScreen('ConfirmPasswordScreen', 'confirm-password', function() { return { - EXTERNAL_API: [ - 'show' - ], + EXTERNAL_API: ['show'], confirmPasswordForm_: null, @@ -24,8 +22,8 @@ decorate: function() { this.confirmPasswordForm_ = $('saml-confirm-password'); this.confirmPasswordForm_.addEventListener('cancel', function(e) { - Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER}); - Oobe.resetSigninUI(true); + Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER}); + Oobe.resetSigninUI(true); }); this.confirmPasswordForm_.addEventListener('passwordEnter', function(e) { this.callback_(e.detail.password);
diff --git a/chrome/browser/resources/chromeos/login/screen_context.js b/chrome/browser/resources/chromeos/login/screen_context.js index fe1758c..02089c2 100644 --- a/chrome/browser/resources/chromeos/login/screen_context.js +++ b/chrome/browser/resources/chromeos/login/screen_context.js
@@ -22,9 +22,10 @@ function checkValueIsValid(value) { var valueType = typeof value; - require((['string', 'boolean', 'number'].indexOf(valueType) != -1 || - Array.isArray(value)), - 'Invalid type of value: "' + valueType + '".'); + require( + (['string', 'boolean', 'number'].indexOf(valueType) != -1 || + Array.isArray(value)), + 'Invalid type of value: "' + valueType + '".'); } function ScreenContext() { @@ -134,7 +135,5 @@ } }; - return { - ScreenContext: ScreenContext - }; + return {ScreenContext: ScreenContext}; });
diff --git a/chrome/browser/resources/chromeos/login/screen_device_disabled.js b/chrome/browser/resources/chromeos/login/screen_device_disabled.js index baaf9c3f..57f01e0 100644 --- a/chrome/browser/resources/chromeos/login/screen_device_disabled.js +++ b/chrome/browser/resources/chromeos/login/screen_device_disabled.js
@@ -8,10 +8,7 @@ login.createScreen('DeviceDisabledScreen', 'device-disabled', function() { return { - EXTERNAL_API: [ - 'setEnrollmentDomain', - 'setMessage' - ], + EXTERNAL_API: ['setEnrollmentDomain', 'setMessage'], /** * Ignore any accelerators the user presses on this screen. @@ -31,8 +28,7 @@ * method will be shown when the user actually clicks the button. Make sure * that this is a no-op. */ - cancel: function() { - }, + cancel: function() {}, /** * Event handler that is invoked just before the screen in shown. @@ -46,31 +42,30 @@ }, /** - * Updates the explanation shown to the user. The explanation will indicate - * that the device is owned by |enrollment_domain|. If |enrollment_domain| - * is null or empty, a generic explanation will be used instead that does - * not reference any domain. - * @param {string} enrollment_domain The domain that owns the device. - */ + * Updates the explanation shown to the user. The explanation will indicate + * that the device is owned by |enrollment_domain|. If |enrollment_domain| + * is null or empty, a generic explanation will be used instead that does + * not reference any domain. + * @param {string} enrollment_domain The domain that owns the device. + */ setEnrollmentDomain: function(enrollment_domain) { if (enrollment_domain) { // The contents of |enrollment_domain| is untrusted. Set the resulting // string as |textContent| so that it gets treated as plain text and // cannot be used to inject JS or HTML. $('device-disabled-explanation').textContent = loadTimeData.getStringF( - 'deviceDisabledExplanationWithDomain', - enrollment_domain); + 'deviceDisabledExplanationWithDomain', enrollment_domain); } else { - $('device-disabled-explanation').textContent = loadTimeData.getString( - 'deviceDisabledExplanationWithoutDomain'); + $('device-disabled-explanation').textContent = + loadTimeData.getString('deviceDisabledExplanationWithoutDomain'); } }, /** - * Sets the message to show to the user. - * @param {string} message The message to show to the user. - */ + * Sets the message to show to the user. + * @param {string} message The message to show to the user. + */ setMessage: function(message) { // The contents of |message| is untrusted. Set it as |textContent| so that // it gets treated as plain text and cannot be used to inject JS or HTML.
diff --git a/chrome/browser/resources/chromeos/login/screen_encryption_migration.js b/chrome/browser/resources/chromeos/login/screen_encryption_migration.js index c6b5415..acfb0b0 100644 --- a/chrome/browser/resources/chromeos/login/screen_encryption_migration.js +++ b/chrome/browser/resources/chromeos/login/screen_encryption_migration.js
@@ -2,114 +2,116 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -login.createScreen('EncryptionMigrationScreen', 'encryption-migration', - function() { - return { - EXTERNAL_API: [ - 'setUIState', - 'setMigrationProgress', - 'setIsResuming', - 'setBatteryState', - 'setAvailableSpaceInString', - 'setNecessarySpaceInString', - ], +login.createScreen( + 'EncryptionMigrationScreen', 'encryption-migration', function() { + return { + EXTERNAL_API: [ + 'setUIState', + 'setMigrationProgress', + 'setIsResuming', + 'setBatteryState', + 'setAvailableSpaceInString', + 'setNecessarySpaceInString', + ], - /** - * Ignore any accelerators the user presses on this screen. - */ - ignoreAccelerators: true, + /** + * Ignore any accelerators the user presses on this screen. + */ + ignoreAccelerators: true, - /** @override */ - decorate: function() { - var encryptionMigration = $('encryption-migration-element'); - encryptionMigration.addEventListener('upgrade', function() { - chrome.send('startMigration'); - }); - encryptionMigration.addEventListener('skip', function() { - chrome.send('skipMigration'); - }); - encryptionMigration.addEventListener( - 'restart-on-low-storage', function() { - chrome.send('requestRestartOnLowStorage'); + /** @override */ + decorate: function() { + var encryptionMigration = $('encryption-migration-element'); + encryptionMigration.addEventListener('upgrade', function() { + chrome.send('startMigration'); }); - encryptionMigration.addEventListener('restart-on-failure', function() { - chrome.send('requestRestartOnFailure'); - }); - encryptionMigration.addEventListener('openFeedbackDialog', function() { - chrome.send('openFeedbackDialog'); - }); - }, + encryptionMigration.addEventListener('skip', function() { + chrome.send('skipMigration'); + }); + encryptionMigration.addEventListener( + 'restart-on-low-storage', function() { + chrome.send('requestRestartOnLowStorage'); + }); + encryptionMigration.addEventListener( + 'restart-on-failure', function() { + chrome.send('requestRestartOnFailure'); + }); + encryptionMigration.addEventListener( + 'openFeedbackDialog', function() { + chrome.send('openFeedbackDialog'); + }); + }, - /** - * Event handler that is invoked just before the screen in shown. - */ - onBeforeShow: function() { - $('progress-dots').hidden = true; - var headerBar = $('login-header-bar'); - headerBar.allowCancel = false; - headerBar.showGuestButton = false; - headerBar.showCreateSupervisedButton = false; - headerBar.signinUIState = SIGNIN_UI_STATE.HIDDEN; - }, + /** + * Event handler that is invoked just before the screen in shown. + */ + onBeforeShow: function() { + $('progress-dots').hidden = true; + var headerBar = $('login-header-bar'); + headerBar.allowCancel = false; + headerBar.showGuestButton = false; + headerBar.showCreateSupervisedButton = false; + headerBar.signinUIState = SIGNIN_UI_STATE.HIDDEN; + }, - /** - * Updates the migration screen by specifying a state which corresponds to - * a sub step in the migration process. - * @param {EncryptionMigrationUIState} state The UI state to identify a sub - * step in migration. - */ - setUIState: function(state) { - $('encryption-migration-element').uiState = state; + /** + * Updates the migration screen by specifying a state which corresponds + * to a sub step in the migration process. + * @param {EncryptionMigrationUIState} state The UI state to identify a sub + * step in migration. + */ + setUIState: function(state) { + $('encryption-migration-element').uiState = state; - // Hide "Shut down" button during migration. - $('login-header-bar').showShutdownButton = - state != EncryptionMigrationUIState.MIGRATING; - }, + // Hide "Shut down" button during migration. + $('login-header-bar').showShutdownButton = + state != EncryptionMigrationUIState.MIGRATING; + }, - /** - * Updates the migration progress. - * @param {number} progress The progress of migration in range [0, 1]. - */ - setMigrationProgress: function(progress) { - $('encryption-migration-element').progress = progress; - }, + /** + * Updates the migration progress. + * @param {number} progress The progress of migration in range [0, 1]. + */ + setMigrationProgress: function(progress) { + $('encryption-migration-element').progress = progress; + }, - /** - * Updates the migration screen based on whether the migration process is - * resuming the previous one. - * @param {boolean} isResuming - */ - setIsResuming: function(isResuming) { - $('encryption-migration-element').isResuming = isResuming; - }, + /** + * Updates the migration screen based on whether the migration process + * is resuming the previous one. + * @param {boolean} isResuming + */ + setIsResuming: function(isResuming) { + $('encryption-migration-element').isResuming = isResuming; + }, - /** - * Updates battery level of the device. - * @param {number} batteryPercent Battery level in percent. - * @param {boolean} isEnoughBattery True if the battery is enough. - * @param {boolena} isCharging True if the device is connected to power. - */ - setBatteryState: function(batteryPercent, isEnoughBattery, isCharging) { - var element = $('encryption-migration-element'); - element.batteryPercent = Math.floor(batteryPercent); - element.isEnoughBattery = isEnoughBattery; - element.isCharging = isCharging; - }, + /** + * Updates battery level of the device. + * @param {number} batteryPercent Battery level in percent. + * @param {boolean} isEnoughBattery True if the battery is enough. + * @param {boolena} isCharging True if the device is connected to power. + */ + setBatteryState: function(batteryPercent, isEnoughBattery, isCharging) { + var element = $('encryption-migration-element'); + element.batteryPercent = Math.floor(batteryPercent); + element.isEnoughBattery = isEnoughBattery; + element.isCharging = isCharging; + }, - /** - * Updates the string representation of available space size. - * @param {string} space - */ - setAvailableSpaceInString: function(space) { - $('encryption-migration-element').availableSpaceInString = space; - }, + /** + * Updates the string representation of available space size. + * @param {string} space + */ + setAvailableSpaceInString: function(space) { + $('encryption-migration-element').availableSpaceInString = space; + }, - /** - * Updates the string representation of necessary space size. - * @param {string} space - */ - setNecessarySpaceInString: function(space) { - $('encryption-migration-element').necessarySpaceInString = space; - }, - }; -}); + /** + * Updates the string representation of necessary space size. + * @param {string} space + */ + setNecessarySpaceInString: function(space) { + $('encryption-migration-element').necessarySpaceInString = space; + }, + }; + });
diff --git a/chrome/browser/resources/chromeos/login/screen_error_message.js b/chrome/browser/resources/chromeos/login/screen_error_message.js index 969a1ff..6291fe9 100644 --- a/chrome/browser/resources/chromeos/login/screen_error_message.js +++ b/chrome/browser/resources/chromeos/login/screen_error_message.js
@@ -27,8 +27,7 @@ /** @const */ var FIX_PROXY_SETTINGS_ID = 'proxy-settings-fix-link'; // Class of the elements which hold current network name. - /** @const */ var CURRENT_NETWORK_NAME_CLASS = - 'portal-network-name'; + /** @const */ var CURRENT_NETWORK_NAME_CLASS = 'portal-network-name'; // Link which triggers frame reload. /** @const */ var RELOAD_PAGE_ID = 'proxy-error-signin-retry-link'; @@ -73,13 +72,8 @@ return { EXTERNAL_API: [ - 'updateLocalizedContent', - 'onBeforeShow', - 'onBeforeHide', - 'allowGuestSignin', - 'allowOfflineLogin', - 'setUIState', - 'setErrorState', + 'updateLocalizedContent', 'onBeforeShow', 'onBeforeHide', + 'allowGuestSignin', 'allowOfflineLogin', 'setUIState', 'setErrorState', 'showConnectingIndicator' ], @@ -105,26 +99,26 @@ this.updateLocalizedContent(); var self = this; - this.context.addObserver(CONTEXT_KEY_ERROR_STATE_CODE, - function(error_state) { - self.setErrorState(error_state); - }); - this.context.addObserver(CONTEXT_KEY_ERROR_STATE_NETWORK, - function(network) { - self.setNetwork_(network); - }); - this.context.addObserver(CONTEXT_KEY_GUEST_SIGNIN_ALLOWED, - function(allowed) { - self.allowGuestSignin(allowed); - }); - this.context.addObserver(CONTEXT_KEY_OFFLINE_SIGNIN_ALLOWED, - function(allowed) { - self.allowOfflineLogin(allowed); - }); - this.context.addObserver(CONTEXT_KEY_SHOW_CONNECTING_INDICATOR, - function(show) { - self.showConnectingIndicator(show); - }); + this.context.addObserver( + CONTEXT_KEY_ERROR_STATE_CODE, function(error_state) { + self.setErrorState(error_state); + }); + this.context.addObserver( + CONTEXT_KEY_ERROR_STATE_NETWORK, function(network) { + self.setNetwork_(network); + }); + this.context.addObserver( + CONTEXT_KEY_GUEST_SIGNIN_ALLOWED, function(allowed) { + self.allowGuestSignin(allowed); + }); + this.context.addObserver( + CONTEXT_KEY_OFFLINE_SIGNIN_ALLOWED, function(allowed) { + self.allowOfflineLogin(allowed); + }); + this.context.addObserver( + CONTEXT_KEY_SHOW_CONNECTING_INDICATOR, function(show) { + self.showConnectingIndicator(show); + }); this.context.addObserver(CONTEXT_KEY_UI_STATE, function(ui_state) { self.setUIState(ui_state); }); @@ -149,20 +143,21 @@ }; $('captive-portal-message-text').innerHTML = loadTimeData.getStringF( - 'captivePortalMessage', - '<b class="' + CURRENT_NETWORK_NAME_CLASS + '"></b>', - '<a id="' + FIX_CAPTIVE_PORTAL_ID + '" class="signin-link" href="#">', - '</a>'); + 'captivePortalMessage', + '<b class="' + CURRENT_NETWORK_NAME_CLASS + '"></b>', + '<a id="' + FIX_CAPTIVE_PORTAL_ID + '" class="signin-link" href="#">', + '</a>'); $(FIX_CAPTIVE_PORTAL_ID).onclick = function() { - self.send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_SHOW_CAPTIVE_PORTAL); + self.send( + login.Screen.CALLBACK_USER_ACTED, USER_ACTION_SHOW_CAPTIVE_PORTAL); }; $('captive-portal-proxy-message-text').innerHTML = - loadTimeData.getStringF( - 'captivePortalProxyMessage', - '<a id="' + FIX_PROXY_SETTINGS_ID + '" class="signin-link" href="#">', - '</a>'); + loadTimeData.getStringF( + 'captivePortalProxyMessage', + '<a id="' + FIX_PROXY_SETTINGS_ID + + '" class="signin-link" href="#">', + '</a>'); $(FIX_PROXY_SETTINGS_ID).onclick = function() { chrome.send('openProxySettings'); }; @@ -192,18 +187,16 @@ 'guestSignin', '<a id="error-guest-signin-link" class="signin-link" href="#">', '</a>'); - $('error-guest-signin-link').addEventListener( - 'click', - this.launchGuestSession_.bind(this)); + $('error-guest-signin-link') + .addEventListener('click', this.launchGuestSession_.bind(this)); $('error-guest-signin-fix-network').innerHTML = loadTimeData.getStringF( 'guestSigninFixNetwork', '<a id="error-guest-fix-network-signin-link" class="signin-link" ' + 'href="#">', '</a>'); - $('error-guest-fix-network-signin-link').addEventListener( - 'click', - this.launchGuestSession_.bind(this)); + $('error-guest-fix-network-signin-link') + .addEventListener('click', this.launchGuestSession_.bind(this)); $('error-offline-login').innerHTML = loadTimeData.getStringF( 'offlineLogin', @@ -273,8 +266,8 @@ certsButton.textContent = loadTimeData.getString('configureCertsButton'); certsButton.classList.add('show-with-ui-state-kiosk-mode'); certsButton.addEventListener('click', function(e) { - self.send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_CONFIGURE_CERTS); + self.send( + login.Screen.CALLBACK_USER_ACTED, USER_ACTION_CONFIGURE_CERTS); e.stopPropagation(); }); buttons.push(certsButton); @@ -307,11 +300,12 @@ var powerwashButton = this.ownerDocument.createElement('button'); powerwashButton.id = 'error-message-restart-and-powerwash-button'; powerwashButton.textContent = - loadTimeData.getString('localStateErrorPowerwashButton'); + loadTimeData.getString('localStateErrorPowerwashButton'); powerwashButton.classList.add('show-with-ui-state-local-state-error'); powerwashButton.addEventListener('click', function(e) { - self.send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_LOCAL_STATE_POWERWASH); + self.send( + login.Screen.CALLBACK_USER_ACTED, + USER_ACTION_LOCAL_STATE_POWERWASH); e.stopPropagation(); }); buttons.push(powerwashButton); @@ -320,10 +314,10 @@ }, /** - * Sets current UI state of the screen. - * @param {string} ui_state New UI state of the screen. - * @private - */ + * Sets current UI state of the screen. + * @param {string} ui_state New UI state of the screen. + * @private + */ setUIState_: function(ui_state) { this.classList.remove(this.ui_state); this.ui_state = ui_state; @@ -339,10 +333,10 @@ }, /** - * Sets current error state of the screen. - * @param {string} error_state New error state of the screen. - * @private - */ + * Sets current error state of the screen. + * @param {string} error_state New error state of the screen. + * @private + */ setErrorState_: function(error_state) { this.classList.remove(this.error_state); this.error_state = error_state; @@ -377,8 +371,8 @@ */ launchGuestSession_: function() { if (Oobe.getInstance().isOobeUI()) { - this.send(login.Screen.CALLBACK_USER_ACTED, - USER_ACTION_LAUNCH_OOBE_GUEST); + this.send( + login.Screen.CALLBACK_USER_ACTED, USER_ACTION_LAUNCH_OOBE_GUEST); } else { chrome.send('launchIncognito'); } @@ -403,19 +397,19 @@ }, /** - * Sets current UI state of the screen. - * @param {number} ui_state New UI state of the screen. - * @private - */ + * Sets current UI state of the screen. + * @param {number} ui_state New UI state of the screen. + * @private + */ setUIState: function(ui_state) { this.setUIState_(UI_STATES[ui_state]); }, /** - * Sets current error state of the screen. - * @param {number} error_state New error state of the screen. - * @private - */ + * Sets current error state of the screen. + * @param {number} error_state New error state of the screen. + * @private + */ setErrorState: function(error_state) { this.setErrorState_(ERROR_STATES[error_state]); },
diff --git a/chrome/browser/resources/chromeos/login/screen_fatal_error.js b/chrome/browser/resources/chromeos/login/screen_fatal_error.js index e016315..c3ab895 100644 --- a/chrome/browser/resources/chromeos/login/screen_fatal_error.js +++ b/chrome/browser/resources/chromeos/login/screen_fatal_error.js
@@ -6,10 +6,9 @@ * @fileoverview A simple message box screen implementation. */ -login.createScreen('FatalErrorScreen', 'fatal-error', function() { return { - EXTERNAL_API: [ - 'show' - ], +login.createScreen('FatalErrorScreen', 'fatal-error', function() { + return { + EXTERNAL_API: ['show'], /** * Callback to run when the screen is dismissed. @@ -25,8 +24,8 @@ /** @override */ decorate: function() { - $('fatal-error-card').addEventListener( - 'buttonclick', this.onDismiss_.bind(this)); + $('fatal-error-card') + .addEventListener('buttonclick', this.onDismiss_.bind(this)); }, /** @override */
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js index 91c8675d..e46c892 100644 --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -37,10 +37,10 @@ * @enum {integer} */ var ScreenMode = { - DEFAULT: 0, // Default GAIA login flow. - OFFLINE: 1, // GAIA offline login. - SAML_INTERSTITIAL: 2, // Interstitial page before SAML redirection. - AD_AUTH: 3 // Offline Active Directory login flow. + DEFAULT: 0, // Default GAIA login flow. + OFFLINE: 1, // GAIA offline login. + SAML_INTERSTITIAL: 2, // Interstitial page before SAML redirection. + AD_AUTH: 3 // Offline Active Directory login flow. }; return { @@ -130,10 +130,8 @@ * @type {boolean} */ isAtTheBeginning: function() { - return !this.navigation_.backVisible && - !this.isSAML() && - !this.classList.contains('whitelist-error') && - !this.authCompleted_; + return !this.navigation_.backVisible && !this.isSAML() && + !this.classList.contains('whitelist-error') && !this.authCompleted_; }, /** @@ -142,22 +140,17 @@ updateControlsState: function() { var isWhitelistError = this.classList.contains('whitelist-error'); - this.navigation_.backVisible = - this.lastBackMessageValue_ && - !isWhitelistError && - !this.authCompleted_ && - !this.loading && - !this.isSAML(); + this.navigation_.backVisible = this.lastBackMessageValue_ && + !isWhitelistError && !this.authCompleted_ && !this.loading && + !this.isSAML(); - this.navigation_.refreshVisible = - !this.closable && this.isAtTheBeginning() && - this.screenMode_ != ScreenMode.SAML_INTERSTITIAL; + this.navigation_.refreshVisible = !this.closable && + this.isAtTheBeginning() && + this.screenMode_ != ScreenMode.SAML_INTERSTITIAL; - this.navigation_.closeVisible = - !this.navigation_.refreshVisible && - !isWhitelistError && - !this.authCompleted_ && - this.screenMode_ != ScreenMode.SAML_INTERSTITIAL; + this.navigation_.closeVisible = !this.navigation_.refreshVisible && + !isWhitelistError && !this.authCompleted_ && + this.screenMode_ != ScreenMode.SAML_INTERSTITIAL; $('login-header-bar').updateUI_(); }, @@ -195,58 +188,58 @@ 'ready', this.onAuthReady_.bind(this)); var that = this; - [this.gaiaAuthHost_, $('offline-gaia'), $('offline-ad-auth')]. - forEach(function(frame) { - // Ignore events from currently inactive frame. - var frameFilter = function(callback) { - return function(e) { - var currentFrame = null; - switch (that.screenMode_) { - case ScreenMode.DEFAULT: - case ScreenMode.SAML_INTERSTITIAL: - currentFrame = that.gaiaAuthHost_; - break; - case ScreenMode.OFFLINE: - currentFrame = $('offline-gaia'); - break; - case ScreenMode.AD_AUTH: - currentFrame = $('offline-ad-auth'); - break; - } - if (frame === currentFrame) - callback.call(that, e); - }; - }; + [this.gaiaAuthHost_, $('offline-gaia'), $('offline-ad-auth')].forEach( + function(frame) { + // Ignore events from currently inactive frame. + var frameFilter = function(callback) { + return function(e) { + var currentFrame = null; + switch (that.screenMode_) { + case ScreenMode.DEFAULT: + case ScreenMode.SAML_INTERSTITIAL: + currentFrame = that.gaiaAuthHost_; + break; + case ScreenMode.OFFLINE: + currentFrame = $('offline-gaia'); + break; + case ScreenMode.AD_AUTH: + currentFrame = $('offline-ad-auth'); + break; + } + if (frame === currentFrame) + callback.call(that, e); + }; + }; - frame.addEventListener('authCompleted', - frameFilter(that.onAuthCompletedMessage_)); - frame.addEventListener('backButton', frameFilter(that.onBackButton_)); - frame.addEventListener('dialogShown', frameFilter(that.onDialogShown_)); - frame.addEventListener('dialogHidden', - frameFilter(that.onDialogHidden_)); - }); + frame.addEventListener( + 'authCompleted', frameFilter(that.onAuthCompletedMessage_)); + frame.addEventListener( + 'backButton', frameFilter(that.onBackButton_)); + frame.addEventListener( + 'dialogShown', frameFilter(that.onDialogShown_)); + frame.addEventListener( + 'dialogHidden', frameFilter(that.onDialogHidden_)); + }); this.gaiaAuthHost_.addEventListener( 'showView', this.onShowView_.bind(this)); this.gaiaAuthHost_.confirmPasswordCallback = this.onAuthConfirmPassword_.bind(this); - this.gaiaAuthHost_.noPasswordCallback = - this.onAuthNoPassword_.bind(this); + this.gaiaAuthHost_.noPasswordCallback = this.onAuthNoPassword_.bind(this); this.gaiaAuthHost_.insecureContentBlockedCallback = this.onInsecureContentBlocked_.bind(this); this.gaiaAuthHost_.missingGaiaInfoCallback = this.missingGaiaInfo_.bind(this); - this.gaiaAuthHost_.samlApiUsedCallback = - this.samlApiUsed_.bind(this); - this.gaiaAuthHost_.addEventListener('authDomainChange', - this.onAuthDomainChange_.bind(this)); - this.gaiaAuthHost_.addEventListener('authFlowChange', - this.onAuthFlowChange_.bind(this)); - this.gaiaAuthHost_.addEventListener('videoEnabledChange', - this.onVideoEnabledChange_.bind(this)); + this.gaiaAuthHost_.samlApiUsedCallback = this.samlApiUsed_.bind(this); + this.gaiaAuthHost_.addEventListener( + 'authDomainChange', this.onAuthDomainChange_.bind(this)); + this.gaiaAuthHost_.addEventListener( + 'authFlowChange', this.onAuthFlowChange_.bind(this)); + this.gaiaAuthHost_.addEventListener( + 'videoEnabledChange', this.onVideoEnabledChange_.bind(this)); - this.gaiaAuthHost_.addEventListener('loadAbort', - this.onLoadAbortMessage_.bind(this)); + this.gaiaAuthHost_.addEventListener( + 'loadAbort', this.onLoadAbortMessage_.bind(this)); this.gaiaAuthHost_.addEventListener( 'identifierEntered', this.onIdentifierEnteredMessage_.bind(this)); @@ -263,7 +256,7 @@ }.bind(this)); $('gaia-whitelist-error').addEventListener('buttonclick', function() { - this.showWhitelistCheckFailedError(false); + this.showWhitelistCheckFailedError(false); }.bind(this)); $('gaia-whitelist-error').addEventListener('linkclick', function() { @@ -271,19 +264,19 @@ }); // Register handlers for the saml interstitial page events. - $('saml-interstitial').addEventListener('samlPageNextClicked', - function() { - this.screenMode = ScreenMode.DEFAULT; - this.loadGaiaAuthHost_(true /* doSamlRedirect */); - }.bind(this)); - $('saml-interstitial').addEventListener('samlPageChangeAccountClicked', - function() { - // The user requests to change the account. We must clear the email - // field of the auth params. - this.gaiaAuthParams_.email = ''; - this.screenMode = ScreenMode.DEFAULT; - this.loadGaiaAuthHost_(false /* doSamlRedirect */); - }.bind(this)); + $('saml-interstitial') + .addEventListener('samlPageNextClicked', function() { + this.screenMode = ScreenMode.DEFAULT; + this.loadGaiaAuthHost_(true /* doSamlRedirect */); + }.bind(this)); + $('saml-interstitial') + .addEventListener('samlPageChangeAccountClicked', function() { + // The user requests to change the account. We must clear the email + // field of the auth params. + this.gaiaAuthParams_.email = ''; + this.screenMode = ScreenMode.DEFAULT; + this.loadGaiaAuthHost_(false /* doSamlRedirect */); + }.bind(this)); }, /** @@ -297,8 +290,8 @@ this.startLoadingTimer_(); this.gaiaAuthParams_.doSamlRedirect = doSamlRedirect; - this.gaiaAuthHost_.load(cr.login.GaiaAuthHost.AuthMode.DEFAULT, - this.gaiaAuthParams_); + this.gaiaAuthHost_.load( + cr.login.GaiaAuthHost.AuthMode.DEFAULT, this.gaiaAuthParams_); }, /** @@ -472,8 +465,8 @@ */ startLoadingTimer_: function() { this.clearLoadingTimer_(); - this.loadingTimer_ = setTimeout(this.onLoadingTimeOut_.bind(this), - MAX_GAIA_LOADING_TIME_SEC * 1000); + this.loadingTimer_ = setTimeout( + this.onLoadingTimeOut_.bind(this), MAX_GAIA_LOADING_TIME_SEC * 1000); }, /** @@ -652,8 +645,7 @@ * Whether the current auth flow is SAML. */ isSAML: function() { - return this.gaiaAuthHost_.authFlow == - cr.login.GaiaAuthHost.AuthFlow.SAML; + return this.gaiaAuthHost_.authFlow == cr.login.GaiaAuthHost.AuthFlow.SAML; }, /** @@ -662,14 +654,12 @@ updateSamlNotice_: function() { if (this.gaiaAuthHost_.videoEnabled) { $('saml-notice-message').textContent = loadTimeData.getStringF( - 'samlNoticeWithVideo', - this.gaiaAuthHost_.authDomain); + 'samlNoticeWithVideo', this.gaiaAuthHost_.authDomain); $('saml-notice-recording-indicator').hidden = false; $('saml-notice-container').style.justifyContent = 'flex-start'; } else { $('saml-notice-message').textContent = loadTimeData.getStringF( - 'samlNotice', - this.gaiaAuthHost_.authDomain); + 'samlNotice', this.gaiaAuthHost_.authDomain); $('saml-notice-recording-indicator').hidden = true; $('saml-notice-container').style.justifyContent = 'center'; } @@ -698,8 +688,8 @@ onVideoEnabledChange_: function() { this.updateSamlNotice_(); if (this.gaiaAuthHost_.videoEnabled && this.videoTimer_ === undefined) { - this.videoTimer_ = setTimeout(this.cancel.bind(this), - VIDEO_LOGIN_TIMEOUT); + this.videoTimer_ = + setTimeout(this.cancel.bind(this), VIDEO_LOGIN_TIMEOUT); } else { this.clearVideoTimer_(); } @@ -811,8 +801,7 @@ if (this.samlPasswordConfirmAttempt_ < 2) { login.ConfirmPasswordScreen.show( - email, - false /* manual password entry */, + email, false /* manual password entry */, this.samlPasswordConfirmAttempt_, this.onConfirmPasswordCollected_.bind(this)); } else { @@ -845,8 +834,7 @@ onAuthNoPassword_: function(email) { chrome.send('scrapedPasswordCount', [0]); login.ConfirmPasswordScreen.show( - email, - true /* manual password entry */, + email, true /* manual password entry */, this.samlPasswordConfirmAttempt_, this.onManualPasswordCollected_.bind(this)); }, @@ -907,36 +895,30 @@ onAuthCompleted_: function(credentials) { if (this.screenMode_ == ScreenMode.AD_AUTH) { this.email = credentials.username; - chrome.send('completeAdAuthentication', - [credentials.username, - credentials.password]); + chrome.send( + 'completeAdAuthentication', + [credentials.username, credentials.password]); } else if (credentials.useOffline) { this.email = credentials.email; - chrome.send('authenticateUser', - [credentials.email, - credentials.password, - false]); + chrome.send( + 'authenticateUser', + [credentials.email, credentials.password, false]); } else if (credentials.authCode) { if (credentials.hasOwnProperty('authCodeOnly') && credentials.authCodeOnly) { - chrome.send('completeAuthenticationAuthCodeOnly', - [credentials.authCode]); + chrome.send( + 'completeAuthenticationAuthCodeOnly', [credentials.authCode]); } else { chrome.send('completeAuthentication', [ - credentials.gaiaId, - credentials.email, - credentials.password, - credentials.authCode, - credentials.usingSAML, - credentials.gapsCookie + credentials.gaiaId, credentials.email, credentials.password, + credentials.authCode, credentials.usingSAML, credentials.gapsCookie ]); } } else { - chrome.send('completeLogin', - [credentials.gaiaId, - credentials.email, - credentials.password, - credentials.usingSAML]); + chrome.send('completeLogin', [ + credentials.gaiaId, credentials.email, credentials.password, + credentials.usingSAML + ]); } this.loading = true; @@ -1027,9 +1009,9 @@ chrome.send('offlineLogin', [this.email]); } else if (!this.loading) { // TODO(dzhioev): investigate if this branch ever get hit. - $('bubble').showContentForElement($('gaia-signin-form-container'), - cr.ui.Bubble.Attachment.LEFT, - error); + $('bubble').showContentForElement( + $('gaia-signin-form-container'), cr.ui.Bubble.Attachment.LEFT, + error); } else { // Defer the bubble until the frame has been loaded. this.errorBubble_ = [loginAttempts, error]; @@ -1110,9 +1092,8 @@ showWhitelistCheckFailedError: function(show, opt_data) { if (show) { var isManaged = opt_data && opt_data.enterpriseManaged; - $('gaia-whitelist-error').textContent = - loadTimeData.getValue(isManaged ? 'whitelistErrorEnterprise' : - 'whitelistErrorConsumer'); + $('gaia-whitelist-error').textContent = loadTimeData.getValue( + isManaged ? 'whitelistErrorEnterprise' : 'whitelistErrorConsumer'); } this.classList.toggle('whitelist-error', show);
diff --git a/chrome/browser/resources/chromeos/login/screen_password_changed.js b/chrome/browser/resources/chromeos/login/screen_password_changed.js index 2924367..abf2dfc 100644 --- a/chrome/browser/resources/chromeos/login/screen_password_changed.js +++ b/chrome/browser/resources/chromeos/login/screen_password_changed.js
@@ -8,26 +8,24 @@ login.createScreen('PasswordChangedScreen', 'password-changed', function() { return { - EXTERNAL_API: [ - 'show' - ], + EXTERNAL_API: ['show'], gaiaPasswordChanged_: null, /** @override */ decorate: function() { this.gaiaPasswordChanged_ = $('gaia-password-changed'); - this.gaiaPasswordChanged_.addEventListener('cancel', - this.cancel.bind(this)); + this.gaiaPasswordChanged_.addEventListener( + 'cancel', this.cancel.bind(this)); this.gaiaPasswordChanged_.addEventListener('passwordEnter', function(e) { - $('login-header-bar').disabled = true; - chrome.send('migrateUserData', [e.detail.password]); + $('login-header-bar').disabled = true; + chrome.send('migrateUserData', [e.detail.password]); }); this.gaiaPasswordChanged_.addEventListener('proceedAnyway', function() { - $('login-header-bar').disabled = true; - chrome.send('resyncUserData'); + $('login-header-bar').disabled = true; + chrome.send('resyncUserData'); }); }, @@ -36,8 +34,8 @@ */ cancel: function() { if (!this.gaiaPasswordChanged_.disabled) { - chrome.send('cancelPasswordChangedFlow', - [this.gaiaPasswordChanged_.email]); + chrome.send( + 'cancelPasswordChangedFlow', [this.gaiaPasswordChanged_.email]); } }, @@ -72,4 +70,3 @@ } }; }); -
diff --git a/chrome/browser/resources/chromeos/login/screen_supervised_user_creation.js b/chrome/browser/resources/chromeos/login/screen_supervised_user_creation.js index 2430478..350c1bfd 100644 --- a/chrome/browser/resources/chromeos/login/screen_supervised_user_creation.js +++ b/chrome/browser/resources/chromeos/login/screen_supervised_user_creation.js
@@ -6,1586 +6,1566 @@ * @fileoverview Legacy supervised user creation flow screen. */ -login.createScreen('SupervisedUserCreationScreen', - 'supervised-user-creation', function() { - var MAX_NAME_LENGTH = 50; - var UserImagesGrid = options.UserImagesGrid; - var ButtonImages = UserImagesGrid.ButtonImages; +login.createScreen( + 'SupervisedUserCreationScreen', 'supervised-user-creation', function() { + var MAX_NAME_LENGTH = 50; + var UserImagesGrid = options.UserImagesGrid; + var ButtonImages = UserImagesGrid.ButtonImages; - var ManagerPod = cr.ui.define(function() { - var node = $('supervised-user-creation-manager-template').cloneNode(true); - node.removeAttribute('id'); - node.removeAttribute('hidden'); - return node; - }); + var ManagerPod = cr.ui.define(function() { + var node = + $('supervised-user-creation-manager-template').cloneNode(true); + node.removeAttribute('id'); + node.removeAttribute('hidden'); + return node; + }); - ManagerPod.userImageSalt_ = {}; + ManagerPod.userImageSalt_ = {}; - /** - * UI element for displaying single account in list of possible managers for - * new supervised user. - * @type {Object} - */ - ManagerPod.prototype = { - __proto__: HTMLDivElement.prototype, + /** + * UI element for displaying single account in list of possible managers + * for new supervised user. + * @type {Object} + */ + ManagerPod.prototype = { + __proto__: HTMLDivElement.prototype, - /** @override */ - decorate: function() { - // Mousedown has to be used instead of click to be able to prevent 'focus' - // event later. - this.addEventListener('mousedown', - this.handleMouseDown_.bind(this)); - var screen = $('supervised-user-creation'); - var managerPod = this; - var managerPodList = screen.managerList_; - var hideManagerPasswordError = function(element) { - managerPod.passwordElement.classList.remove('password-error'); - $('bubble').hide(); + /** @override */ + decorate: function() { + // Mousedown has to be used instead of click to be able to prevent + // 'focus' event later. + this.addEventListener('mousedown', this.handleMouseDown_.bind(this)); + var screen = $('supervised-user-creation'); + var managerPod = this; + var managerPodList = screen.managerList_; + var hideManagerPasswordError = function(element) { + managerPod.passwordElement.classList.remove('password-error'); + $('bubble').hide(); + }; + + screen.configureTextInput( + this.passwordElement, + screen.updateNextButtonForManager_.bind(screen), + screen.validIfNotEmpty_.bind(screen), function(element) { + screen.getScreenButton('next').focus(); + }, hideManagerPasswordError); + + this.passwordElement.addEventListener('keydown', function(e) { + switch (e.key) { + case 'ArrowUp': + managerPodList.selectNextPod(-1); + e.stopPropagation(); + break; + case 'ArrowDown': + managerPodList.selectNextPod(+1); + e.stopPropagation(); + break; + } + }); + }, + + /** + * Updates UI elements from user data. + */ + update: function() { + this.imageElement.src = 'chrome://userimage/' + this.user.username + + '?id=' + ManagerPod.userImageSalt_[this.user.username]; + + this.nameElement.textContent = this.user.displayName; + this.emailElement.textContent = this.user.emailAddress; + }, + + showPasswordError: function() { + this.passwordElement.classList.add('password-error'); + $('bubble').showTextForElement( + this.passwordElement, + loadTimeData.getString( + 'createSupervisedUserWrongManagerPasswordText'), + cr.ui.Bubble.Attachment.BOTTOM, 24, 4); + }, + + /** + * Brings focus to password field. + */ + focusInput: function() { + this.passwordElement.focus(); + }, + + /** + * Gets image element. + * @type {!HTMLImageElement} + */ + get imageElement() { + return this.querySelector('.supervised-user-creation-manager-image'); + }, + + /** + * Gets name element. + * @type {!HTMLDivElement} + */ + get nameElement() { + return this.querySelector('.supervised-user-creation-manager-name'); + }, + + /** + * Gets e-mail element. + * @type {!HTMLDivElement} + */ + get emailElement() { + return this.querySelector('.supervised-user-creation-manager-email'); + }, + + /** + * Gets password element. + * @type {!HTMLDivElement} + */ + get passwordElement() { + return this.querySelector( + '.supervised-user-creation-manager-password'); + }, + + /** + * Gets password enclosing block. + * @type {!HTMLDivElement} + */ + get passwordBlock() { + return this.querySelector('.password-block'); + }, + + /** @override */ + handleMouseDown_: function(e) { + this.parentNode.selectPod(this); + // Prevent default so that we don't trigger 'focus' event. + e.preventDefault(); + }, + + /** + * The user that this pod represents. + * @type {!Object} + */ + user_: undefined, + get user() { + return this.user_; + }, + set user(userDict) { + this.user_ = userDict; + this.update(); + }, }; - screen.configureTextInput( - this.passwordElement, - screen.updateNextButtonForManager_.bind(screen), - screen.validIfNotEmpty_.bind(screen), - function(element) { - screen.getScreenButton('next').focus(); - }, - hideManagerPasswordError); + var ManagerPodList = cr.ui.define('div'); - this.passwordElement.addEventListener('keydown', function(e) { - switch (e.key) { - case 'ArrowUp': - managerPodList.selectNextPod(-1); - e.stopPropagation(); - break; - case 'ArrowDown': - managerPodList.selectNextPod(+1); - e.stopPropagation(); - break; - } - }); - }, + /** + * UI element for selecting manager account for new supervised user. + * @type {Object} + */ + ManagerPodList.prototype = { + __proto__: HTMLDivElement.prototype, - /** - * Updates UI elements from user data. - */ - update: function() { - this.imageElement.src = 'chrome://userimage/' + this.user.username + - '?id=' + ManagerPod.userImageSalt_[this.user.username]; + selectedPod_: null, - this.nameElement.textContent = this.user.displayName; - this.emailElement.textContent = this.user.emailAddress; - }, + /** @override */ + decorate: function() {}, - showPasswordError: function() { - this.passwordElement.classList.add('password-error'); - $('bubble').showTextForElement( - this.passwordElement, - loadTimeData.getString( - 'createSupervisedUserWrongManagerPasswordText'), - cr.ui.Bubble.Attachment.BOTTOM, - 24, 4); - }, + /** + * Returns all the pods in this pod list. + * @type {NodeList} + */ + get pods() { + return this.children; + }, - /** - * Brings focus to password field. - */ - focusInput: function() { - this.passwordElement.focus(); - }, + addPod: function(manager) { + var managerPod = new ManagerPod({user: manager}); + this.appendChild(managerPod); + managerPod.update(); + }, - /** - * Gets image element. - * @type {!HTMLImageElement} - */ - get imageElement() { - return this.querySelector('.supervised-user-creation-manager-image'); - }, + clearPods: function() { + this.innerHTML = ''; + this.selectedPod_ = null; + }, - /** - * Gets name element. - * @type {!HTMLDivElement} - */ - get nameElement() { - return this.querySelector('.supervised-user-creation-manager-name'); - }, + selectPod: function(podToSelect) { + if ((this.selectedPod_ == podToSelect) && !!podToSelect) { + podToSelect.focusInput(); + return; + } + this.selectedPod_ = podToSelect; + for (var i = 0, pod; pod = this.pods[i]; ++i) { + if (pod != podToSelect) { + pod.classList.remove('focused'); + pod.passwordElement.value = ''; + pod.passwordBlock.hidden = true; + } + } + if (!podToSelect) + return; + podToSelect.classList.add('focused'); + podToSelect.passwordBlock.hidden = false; + podToSelect.passwordElement.value = ''; + podToSelect.focusInput(); + chrome.send( + 'managerSelectedOnSupervisedUserCreationFlow', + [podToSelect.user.username]); + }, - /** - * Gets e-mail element. - * @type {!HTMLDivElement} - */ - get emailElement() { - return this.querySelector('.supervised-user-creation-manager-email'); - }, - - /** - * Gets password element. - * @type {!HTMLDivElement} - */ - get passwordElement() { - return this.querySelector('.supervised-user-creation-manager-password'); - }, - - /** - * Gets password enclosing block. - * @type {!HTMLDivElement} - */ - get passwordBlock() { - return this.querySelector('.password-block'); - }, - - /** @override */ - handleMouseDown_: function(e) { - this.parentNode.selectPod(this); - // Prevent default so that we don't trigger 'focus' event. - e.preventDefault(); - }, - - /** - * The user that this pod represents. - * @type {!Object} - */ - user_: undefined, - get user() { - return this.user_; - }, - set user(userDict) { - this.user_ = userDict; - this.update(); - }, - }; - - var ManagerPodList = cr.ui.define('div'); - - /** - * UI element for selecting manager account for new supervised user. - * @type {Object} - */ - ManagerPodList.prototype = { - __proto__: HTMLDivElement.prototype, - - selectedPod_: null, - - /** @override */ - decorate: function() { - }, - - /** - * Returns all the pods in this pod list. - * @type {NodeList} - */ - get pods() { - return this.children; - }, - - addPod: function(manager) { - var managerPod = new ManagerPod({user: manager}); - this.appendChild(managerPod); - managerPod.update(); - }, - - clearPods: function() { - this.innerHTML = ''; - this.selectedPod_ = null; - }, - - selectPod: function(podToSelect) { - if ((this.selectedPod_ == podToSelect) && !!podToSelect) { - podToSelect.focusInput(); - return; - } - this.selectedPod_ = podToSelect; - for (var i = 0, pod; pod = this.pods[i]; ++i) { - if (pod != podToSelect) { - pod.classList.remove('focused'); - pod.passwordElement.value = ''; - pod.passwordBlock.hidden = true; - } - } - if (!podToSelect) - return; - podToSelect.classList.add('focused'); - podToSelect.passwordBlock.hidden = false; - podToSelect.passwordElement.value = ''; - podToSelect.focusInput(); - chrome.send('managerSelectedOnSupervisedUserCreationFlow', - [podToSelect.user.username]); - }, - - /** - * Select pod next to currently selected one in given |direction|. - * @param {integer} direction - +1 for selecting pod below current, -1 for - * selecting pod above current. - * @type {boolean} returns if selected pod has changed. - */ - selectNextPod: function(direction) { - if (!this.selectedPod_) - return false; - var index = -1; - for (var i = 0, pod; pod = this.pods[i]; ++i) { - if (pod == this.selectedPod_) { - index = i; - break; - } - } - if (-1 == index) - return false; - index = index + direction; - if (index < 0 || index >= this.pods.length) - return false; - this.selectPod(this.pods[index]); - return true; - } - }; - - var ImportPod = cr.ui.define(function() { - var node = $('supervised-user-creation-import-template').cloneNode(true); - node.removeAttribute('id'); - node.removeAttribute('hidden'); - return node; - }); - - /** - * UI element for displaying single supervised user in list of possible users - * for importing existing users. - * @type {Object} - */ - ImportPod.prototype = { - __proto__: HTMLDivElement.prototype, - - /** @override */ - decorate: function() { - // Mousedown has to be used instead of click to be able to prevent 'focus' - // event later. - this.addEventListener('mousedown', this.handleMouseDown_.bind(this)); - var screen = $('supervised-user-creation'); - var importList = screen.importList_; - }, - - /** - * Updates UI elements from user data. - */ - update: function() { - this.imageElement.src = this.user.avatarurl; - this.nameElement.textContent = this.user.name; - if (this.user.exists) { - if (this.user.conflict == 'imported') { - this.nameElement.textContent = - loadTimeData.getStringF('importUserExists', this.user.name); - } else { - this.nameElement.textContent = - loadTimeData.getStringF('importUsernameExists', this.user.name); - } - } - this.classList.toggle('imported', this.user.exists); - }, - - /** - * Gets image element. - * @type {!HTMLImageElement} - */ - get imageElement() { - return this.querySelector('.import-pod-image'); - }, - - /** - * Gets name element. - * @type {!HTMLDivElement} - */ - get nameElement() { - return this.querySelector('.import-pod-name'); - }, - - /** @override */ - handleMouseDown_: function(e) { - this.parentNode.selectPod(this); - // Prevent default so that we don't trigger 'focus' event. - e.preventDefault(); - }, - - /** - * The user that this pod represents. - * @type {Object} - */ - user_: undefined, - - get user() { - return this.user_; - }, - - set user(userDict) { - this.user_ = userDict; - this.update(); - }, - }; - - var ImportPodList = cr.ui.define('div'); - - /** - * UI element for selecting existing supervised user for import. - * @type {Object} - */ - ImportPodList.prototype = { - __proto__: HTMLDivElement.prototype, - - selectedPod_: null, - - /** @override */ - decorate: function() { - this.setAttribute('tabIndex', 0); - this.classList.add('nofocus'); - var importList = this; - var screen = $('supervised-user-creation'); - - this.addEventListener('focus', function(e) { - if (importList.selectedPod_ == null) { - if (importList.pods.length > 0) - importList.selectPod(importList.pods[0]); - } - }); - - this.addEventListener('keydown', function(e) { - switch (e.key) { - case 'ArrowUp': - importList.selectNextPod(-1); - e.stopPropagation(); - break; - case 'Enter': - if (importList.selectedPod_ != null) - screen.importSupervisedUser_(); - e.stopPropagation(); - break; - case 'ArrowDown': - importList.selectNextPod(+1); - e.stopPropagation(); - break; - } - }); - }, - - /** - * Returns all the pods in this pod list. - * @type {NodeList} - */ - get pods() { - return this.children; - }, - - /** - * Returns selected pod. - * @type {Node} - */ - get selectedPod() { - return this.selectedPod_; - }, - - addPod: function(user) { - var importPod = new ImportPod({user: user}); - this.appendChild(importPod); - importPod.update(); - }, - - clearPods: function() { - this.innerHTML = ''; - this.selectedPod_ = null; - }, - - scrollIntoView: function(pod) { - scroller = this.parentNode; - var itemHeight = pod.getBoundingClientRect().height; - var scrollTop = scroller.scrollTop; - var top = pod.offsetTop - scroller.offsetTop; - var clientHeight = scroller.clientHeight; - - var self = scroller; - - // Function to adjust the tops of viewport and row. - function scrollToAdjustTop() { - self.scrollTop = top; - return true; - } - // Function to adjust the bottoms of viewport and row. - function scrollToAdjustBottom() { - var cs = getComputedStyle(self); - var paddingY = parseInt(cs.paddingTop, 10) + - parseInt(cs.paddingBottom, 10); - - if (top + itemHeight > scrollTop + clientHeight - paddingY) { - self.scrollTop = top + itemHeight - clientHeight + paddingY; + /** + * Select pod next to currently selected one in given |direction|. + * @param {integer} direction - +1 for selecting pod below current, -1 for + * selecting pod above current. + * @type {boolean} returns if selected pod has changed. + */ + selectNextPod: function(direction) { + if (!this.selectedPod_) + return false; + var index = -1; + for (var i = 0, pod; pod = this.pods[i]; ++i) { + if (pod == this.selectedPod_) { + index = i; + break; + } + } + if (-1 == index) + return false; + index = index + direction; + if (index < 0 || index >= this.pods.length) + return false; + this.selectPod(this.pods[index]); return true; } - return false; - } - - // Check if the entire of given indexed row can be shown in the viewport. - if (itemHeight <= clientHeight) { - if (top < scrollTop) - return scrollToAdjustTop(); - if (scrollTop + clientHeight < top + itemHeight) - return scrollToAdjustBottom(); - } else { - if (scrollTop < top) - return scrollToAdjustTop(); - if (top + itemHeight < scrollTop + clientHeight) - return scrollToAdjustBottom(); - } - return false; - }, - - /** - * @param {Element} podToSelect - pod to select, can be null. - */ - selectPod: function(podToSelect) { - if ((this.selectedPod_ == podToSelect) && !!podToSelect) { - return; - } - this.selectedPod_ = podToSelect; - for (var i = 0; i < this.pods.length; i++) { - var pod = this.pods[i]; - if (pod != podToSelect) - pod.classList.remove('focused'); - } - if (!podToSelect) - return; - podToSelect.classList.add('focused'); - podToSelect.focus(); - var screen = $('supervised-user-creation'); - if (!this.selectedPod_) { - screen.getScreenButton('import').disabled = true; - } else { - screen.getScreenButton('import').disabled = - this.selectedPod_.user.exists; - if (!this.selectedPod_.user.exists) { - chrome.send('userSelectedForImportInSupervisedUserCreationFlow', - [podToSelect.user.id]); - } - } - }, - - selectNextPod: function(direction) { - if (!this.selectedPod_) - return false; - var index = -1; - for (var i = 0, pod; pod = this.pods[i]; ++i) { - if (pod == this.selectedPod_) { - index = i; - break; - } - } - if (-1 == index) - return false; - index = index + direction; - if (index < 0 || index >= this.pods.length) - return false; - this.selectPod(this.pods[index]); - return true; - }, - - selectUser: function(user_id) { - for (var i = 0, pod; pod = this.pods[i]; ++i) { - if (pod.user.id == user_id) { - this.selectPod(pod); - this.scrollIntoView(pod); - break; - } - } - }, - }; - - return { - EXTERNAL_API: [ - 'loadManagers', - 'setCameraPresent', - 'setDefaultImages', - 'setExistingSupervisedUsers', - 'showErrorPage', - 'showIntroPage', - 'showManagerPage', - 'showManagerPasswordError', - 'showPage', - 'showPasswordError', - 'showProgress', - 'showStatusError', - 'showTutorialPage', - 'showUsernamePage', - 'supervisedUserNameError', - 'supervisedUserNameOk', - 'supervisedUserSuggestImport', - ], - - lastVerifiedName_: null, - lastIncorrectUserName_: null, - managerList_: null, - importList_: null, - - currentPage_: null, - imagesRequested_: false, - - // Contains data that can be auto-shared with handler. - context_: {}, - - /** @override */ - decorate: function() { - this.managerList_ = new ManagerPodList(); - $('supervised-user-creation-managers-pane').appendChild( - this.managerList_); - - this.importList_ = new ImportPodList(); - $('supervised-user-creation-import-pane').appendChild(this.importList_); - - var userNameField = $('supervised-user-creation-name'); - var passwordField = $('supervised-user-creation-password'); - var password2Field = $('supervised-user-creation-password-confirm'); - - var creationScreen = this; - - var hideUserPasswordError = function(element) { - $('bubble').hide(); - $('supervised-user-creation-password').classList.remove( - 'password-error'); }; - this.configureTextInput(userNameField, - this.checkUserName_.bind(this), - this.validIfNotEmpty_.bind(this), - function(element) { - passwordField.focus(); - }, - this.clearUserNameError_.bind(this)); - this.configureTextInput(passwordField, - this.updateNextButtonForUser_.bind(this), - this.validIfNotEmpty_.bind(this), - function(element) { - password2Field.focus(); - }, - hideUserPasswordError); - this.configureTextInput(password2Field, - this.updateNextButtonForUser_.bind(this), - this.validIfNotEmpty_.bind(this), - function(element) { - creationScreen.getScreenButton('next').focus(); - }, - hideUserPasswordError); - - this.getScreenButton('error').addEventListener('click', function(e) { - creationScreen.handleErrorButtonPressed_(); - e.stopPropagation(); + var ImportPod = cr.ui.define(function() { + var node = + $('supervised-user-creation-import-template').cloneNode(true); + node.removeAttribute('id'); + node.removeAttribute('hidden'); + return node; }); - /* - TODO(antrim) : this is an explicit code duplications with UserImageScreen. - It should be removed by issue 251179. - */ - var imageGrid = this.getScreenElement('image-grid'); - UserImagesGrid.decorate(imageGrid); + /** + * UI element for displaying single supervised user in list of possible + * users for importing existing users. + * @type {Object} + */ + ImportPod.prototype = { + __proto__: HTMLDivElement.prototype, - // Preview image will track the selected item's URL. - var previewElement = this.getScreenElement('image-preview'); - previewElement.oncontextmenu = function(e) { e.preventDefault(); }; + /** @override */ + decorate: function() { + // Mousedown has to be used instead of click to be able to prevent + // 'focus' event later. + this.addEventListener('mousedown', this.handleMouseDown_.bind(this)); + var screen = $('supervised-user-creation'); + var importList = screen.importList_; + }, - imageGrid.previewElement = previewElement; - imageGrid.selectionType = 'default'; - imageGrid.flipPhotoElement = this.getScreenElement('flip-photo'); - - imageGrid.addEventListener('activate', - this.handleActivate_.bind(this)); - imageGrid.addEventListener('select', - this.handleSelect_.bind(this)); - imageGrid.addEventListener('phototaken', - this.handlePhotoTaken_.bind(this)); - imageGrid.addEventListener('photoupdated', - this.handlePhotoUpdated_.bind(this)); - // Set the title for camera item in the grid. - imageGrid.setCameraTitles( - loadTimeData.getString('takePhoto'), - loadTimeData.getString('photoFromCamera')); - - this.getScreenElement('take-photo').addEventListener( - 'click', this.handleTakePhoto_.bind(this)); - this.getScreenElement('discard-photo').addEventListener( - 'click', this.handleDiscardPhoto_.bind(this)); - - // Toggle 'animation' class for the duration of WebKit transition. - this.getScreenElement('flip-photo').addEventListener( - 'click', this.handleFlipPhoto_.bind(this)); - this.getScreenElement('image-stream-crop').addEventListener( - 'transitionend', function(e) { - previewElement.classList.remove('animation'); - }); - this.getScreenElement('image-preview-img').addEventListener( - 'transitionend', function(e) { - previewElement.classList.remove('animation'); - }); - - $('supervised-user-creation-navigation').addEventListener('close', - this.cancel.bind(this)); - }, - - buttonIds: [], - - /** - * Creates button for adding to controls. - * @param {string} buttonId -- id for button, have to be unique within - * screen. Actual id will be prefixed with screen name and appended with - * '-button'. Use getScreenButton(buttonId) to find it later. - * @param {string} i18nPrefix -- screen prefix for i18n values. - * @param {function} callback -- will be called on button press with - * buttonId parameter. - * @param {array} pages -- list of pages where this button should be - * displayed. - * @param {array} classes -- list of additional CSS classes for button. - */ - makeButton: function(buttonId, i18nPrefix, callback, pages, classes) { - var capitalizedId = buttonId.charAt(0).toUpperCase() + buttonId.slice(1); - this.buttonIds.push(buttonId); - var result = this.ownerDocument.createElement('button'); - result.id = this.name() + '-' + buttonId + '-button'; - result.classList.add('screen-control-button'); - for (var i = 0; i < classes.length; i++) { - result.classList.add(classes[i]); - } - result.textContent = loadTimeData. - getString(i18nPrefix + capitalizedId + 'ButtonTitle'); - result.addEventListener('click', function(e) { - callback(buttonId); - e.stopPropagation(); - }); - result.pages = pages; - return result; - }, - - /** - * Simple validator for |configureTextInput|. - * Element is considered valid if it has any text. - * @param {Element} element - element to be validated. - * @return {boolean} - true, if element has any text. - */ - validIfNotEmpty_: function(element) { - return (element.value.length > 0); - }, - - /** - * Configure text-input |element|. - * @param {Element} element - element to be configured. - * @param {function(element)} inputChangeListener - function that will be - * called upon any button press/release. - * @param {function(element)} validator - function that will be called when - * Enter is pressed. If it returns |true| then advance to next element. - * @param {function(element)} moveFocus - function that will determine next - * element and move focus to it. - * @param {function(element)} errorHider - function that is called upon - * every button press, so that any associated error can be hidden. - */ - configureTextInput: function(element, - inputChangeListener, - validator, - moveFocus, - errorHider) { - element.addEventListener('keydown', function(e) { - if (e.key == 'Enter') { - var dataValid = true; - if (validator) - dataValid = validator(element); - if (!dataValid) { - element.focus(); - } else { - if (moveFocus) - moveFocus(element); + /** + * Updates UI elements from user data. + */ + update: function() { + this.imageElement.src = this.user.avatarurl; + this.nameElement.textContent = this.user.name; + if (this.user.exists) { + if (this.user.conflict == 'imported') { + this.nameElement.textContent = + loadTimeData.getStringF('importUserExists', this.user.name); + } else { + this.nameElement.textContent = loadTimeData.getStringF( + 'importUsernameExists', this.user.name); + } } - e.stopPropagation(); - return; - } - if (errorHider) - errorHider(element); - if (inputChangeListener) - inputChangeListener(element); - }); - element.addEventListener('keyup', function(e) { - if (inputChangeListener) - inputChangeListener(element); - }); - }, + this.classList.toggle('imported', this.user.exists); + }, - /** - * Makes element from template. - * @param {string} templateId -- template will be looked up within screen - * by class with name "template-<templateId>". - * @param {string} elementId -- id for result, uinque within screen. Actual - * id will be prefixed with screen name. Use getScreenElement(id) to find - * it later. - */ - makeFromTemplate: function(templateId, elementId) { - var templateClassName = 'template-' + templateId; - var templateNode = this.querySelector('.' + templateClassName); - var screenPrefix = this.name() + '-'; - var result = templateNode.cloneNode(true); - result.classList.remove(templateClassName); - result.id = screenPrefix + elementId; - return result; - }, + /** + * Gets image element. + * @type {!HTMLImageElement} + */ + get imageElement() { + return this.querySelector('.import-pod-image'); + }, - /** - * @param {string} buttonId -- id of button to be found, - * @return {Element} button created by makeButton with given buttonId. - */ - getScreenButton: function(buttonId) { - var fullId = this.name() + '-' + buttonId + '-button'; - return this.getScreenElement(buttonId + '-button'); - }, + /** + * Gets name element. + * @type {!HTMLDivElement} + */ + get nameElement() { + return this.querySelector('.import-pod-name'); + }, - /** - * @param {string} elementId -- id of element to be found, - * @return {Element} button created by makeFromTemplate with elementId. - */ - getScreenElement: function(elementId) { - var fullId = this.name() + '-' + elementId; - return $(fullId); - }, + /** @override */ + handleMouseDown_: function(e) { + this.parentNode.selectPod(this); + // Prevent default so that we don't trigger 'focus' event. + e.preventDefault(); + }, - /** - * Screen controls. - * @type {!Array} Array of Buttons. - */ - get buttons() { - var links = this.ownerDocument.createElement('div'); - var buttons = this.ownerDocument.createElement('div'); - links.classList.add('controls-links'); - buttons.classList.add('controls-buttons'); + /** + * The user that this pod represents. + * @type {Object} + */ + user_: undefined, - var importLink = this.makeFromTemplate('import-supervised-user-link', - 'import-link'); - importLink.hidden = true; - links.appendChild(importLink); + get user() { + return this.user_; + }, - var linkElement = importLink.querySelector('.signin-link'); - linkElement.addEventListener('click', - this.importLinkPressed_.bind(this)); + set user(userDict) { + this.user_ = userDict; + this.update(); + }, + }; - var createLink = this.makeFromTemplate('create-supervised-user-link', - 'create-link'); - createLink.hidden = true; - links.appendChild(createLink); + var ImportPodList = cr.ui.define('div'); - var status = this.makeFromTemplate('status-container', 'status'); - buttons.appendChild(status); + /** + * UI element for selecting existing supervised user for import. + * @type {Object} + */ + ImportPodList.prototype = { + __proto__: HTMLDivElement.prototype, - linkElement = createLink.querySelector('.signin-link'); - linkElement.addEventListener('click', - this.createLinkPressed_.bind(this)); + selectedPod_: null, - buttons.appendChild(this.makeButton( - 'start', - 'supervisedUserCreationFlow', - this.startButtonPressed_.bind(this), - ['intro'], - ['custom-appearance', 'button-fancy', 'button-blue'])); + /** @override */ + decorate: function() { + this.setAttribute('tabIndex', 0); + this.classList.add('nofocus'); + var importList = this; + var screen = $('supervised-user-creation'); - buttons.appendChild(this.makeButton( - 'prev', - 'supervisedUserCreationFlow', - this.prevButtonPressed_.bind(this), - ['manager'], - [])); + this.addEventListener('focus', function(e) { + if (importList.selectedPod_ == null) { + if (importList.pods.length > 0) + importList.selectPod(importList.pods[0]); + } + }); - buttons.appendChild(this.makeButton( - 'next', - 'supervisedUserCreationFlow', - this.nextButtonPressed_.bind(this), - ['manager', 'username'], - [])); + this.addEventListener('keydown', function(e) { + switch (e.key) { + case 'ArrowUp': + importList.selectNextPod(-1); + e.stopPropagation(); + break; + case 'Enter': + if (importList.selectedPod_ != null) + screen.importSupervisedUser_(); + e.stopPropagation(); + break; + case 'ArrowDown': + importList.selectNextPod(+1); + e.stopPropagation(); + break; + } + }); + }, - buttons.appendChild(this.makeButton( - 'import', - 'supervisedUserCreationFlow', - this.importButtonPressed_.bind(this), - ['import', 'import-password'], - [])); + /** + * Returns all the pods in this pod list. + * @type {NodeList} + */ + get pods() { + return this.children; + }, - buttons.appendChild(this.makeButton( - 'gotit', - 'supervisedUserCreationFlow', - this.gotItButtonPressed_.bind(this), - ['created'], - ['custom-appearance', 'button-fancy', 'button-blue'])); - return [links, buttons]; - }, + /** + * Returns selected pod. + * @type {Node} + */ + get selectedPod() { + return this.selectedPod_; + }, - /** - * Does sanity check and calls backend with current user name/password pair - * to authenticate manager. May result in showManagerPasswordError. - * @private - */ - validateAndLogInAsManager_: function() { - var selectedPod = this.managerList_.selectedPod_; - if (null == selectedPod) - return; + addPod: function(user) { + var importPod = new ImportPod({user: user}); + this.appendChild(importPod); + importPod.update(); + }, - var managerId = selectedPod.user.username; - var managerDisplayId = selectedPod.user.emailAddress; - var managerPassword = selectedPod.passwordElement.value; - if (managerPassword.length == 0) - return; - if (this.disabled) - return; - this.disabled = true; - this.context_.managerId = managerId; - this.context_.managerDisplayId = managerDisplayId; - this.context_.managerName = selectedPod.user.displayName; - chrome.send('authenticateManagerInSupervisedUserCreationFlow', - [managerId, managerPassword]); - }, + clearPods: function() { + this.innerHTML = ''; + this.selectedPod_ = null; + }, - /** - * Does sanity check and calls backend with user display name/password pair - * to create a user. - * @private - */ - validateAndCreateSupervisedUser_: function() { - var firstPassword = $('supervised-user-creation-password').value; - var secondPassword = - $('supervised-user-creation-password-confirm').value; - var userName = $('supervised-user-creation-name').value; - if (firstPassword != secondPassword) { - this.showPasswordError(loadTimeData.getString( - 'createSupervisedUserPasswordMismatchError')); - return; - } - if (this.disabled) - return; - this.disabled = true; + scrollIntoView: function(pod) { + scroller = this.parentNode; + var itemHeight = pod.getBoundingClientRect().height; + var scrollTop = scroller.scrollTop; + var top = pod.offsetTop - scroller.offsetTop; + var clientHeight = scroller.clientHeight; - this.context_.supervisedName = userName; - chrome.send('specifySupervisedUserCreationFlowUserData', - [userName, firstPassword]); - }, + var self = scroller; - /** - * Does sanity check and calls backend with selected existing supervised - * user id to import user. - * @private - */ - importSupervisedUser_: function() { - if (this.disabled) - return; - if (this.currentPage_ == 'import-password') { - var firstPassword = this.getScreenElement('password').value; - var secondPassword = this.getScreenElement('password-confirm').value; - if (firstPassword != secondPassword) { - this.showPasswordError(loadTimeData.getString( - 'createSupervisedUserPasswordMismatchError')); - return; - } - var userId = this.context_.importUserId; - this.disabled = true; - chrome.send('importSupervisedUserWithPassword', - [userId, firstPassword]); - return; - } else { - var selectedPod = this.importList_.selectedPod_; - if (!selectedPod) - return; - var user = selectedPod.user; - var userId = user.id; + // Function to adjust the tops of viewport and row. + function scrollToAdjustTop() { + self.scrollTop = top; + return true; + } + // Function to adjust the bottoms of viewport and row. + function scrollToAdjustBottom() { + var cs = getComputedStyle(self); + var paddingY = + parseInt(cs.paddingTop, 10) + parseInt(cs.paddingBottom, 10); - this.context_.importUserId = userId; - this.context_.supervisedName = user.name; - this.context_.selectedImageUrl = user.avatarurl; - if (!user.needPassword) { - this.disabled = true; - chrome.send('importSupervisedUser', [userId]); - } else { - this.setVisiblePage_('import-password'); - } - } - }, + if (top + itemHeight > scrollTop + clientHeight - paddingY) { + self.scrollTop = top + itemHeight - clientHeight + paddingY; + return true; + } + return false; + } - /** - * Calls backend part to check if current user name is valid/not taken. - * Results in a call to either supervisedUserNameOk or - * supervisedUserNameError. - * @private - */ - checkUserName_: function() { - var userName = this.getScreenElement('name').value; + // Check if the entire of given indexed row can be shown in the + // viewport. + if (itemHeight <= clientHeight) { + if (top < scrollTop) + return scrollToAdjustTop(); + if (scrollTop + clientHeight < top + itemHeight) + return scrollToAdjustBottom(); + } else { + if (scrollTop < top) + return scrollToAdjustTop(); + if (top + itemHeight < scrollTop + clientHeight) + return scrollToAdjustBottom(); + } + return false; + }, - // Avoid flickering - if (userName == this.lastIncorrectUserName_ || - userName == this.lastVerifiedName_) { - return; - } - if (userName.length > 0) { - chrome.send('checkSupervisedUserName', [userName]); - } else { - this.nameErrorVisible = false; - this.lastVerifiedName_ = null; - this.lastIncorrectUserName_ = null; - this.updateNextButtonForUser_(); - } - }, + /** + * @param {Element} podToSelect - pod to select, can be null. + */ + selectPod: function(podToSelect) { + if ((this.selectedPod_ == podToSelect) && !!podToSelect) { + return; + } + this.selectedPod_ = podToSelect; + for (var i = 0; i < this.pods.length; i++) { + var pod = this.pods[i]; + if (pod != podToSelect) + pod.classList.remove('focused'); + } + if (!podToSelect) + return; + podToSelect.classList.add('focused'); + podToSelect.focus(); + var screen = $('supervised-user-creation'); + if (!this.selectedPod_) { + screen.getScreenButton('import').disabled = true; + } else { + screen.getScreenButton('import').disabled = + this.selectedPod_.user.exists; + if (!this.selectedPod_.user.exists) { + chrome.send( + 'userSelectedForImportInSupervisedUserCreationFlow', + [podToSelect.user.id]); + } + } + }, - /** - * Called by backend part in case of successful name validation. - * @param {string} name - name that was validated. - */ - supervisedUserNameOk: function(name) { - this.lastVerifiedName_ = name; - this.lastIncorrectUserName_ = null; - if ($('supervised-user-creation-name').value == name) - this.clearUserNameError_(); - this.updateNextButtonForUser_(); - }, + selectNextPod: function(direction) { + if (!this.selectedPod_) + return false; + var index = -1; + for (var i = 0, pod; pod = this.pods[i]; ++i) { + if (pod == this.selectedPod_) { + index = i; + break; + } + } + if (-1 == index) + return false; + index = index + direction; + if (index < 0 || index >= this.pods.length) + return false; + this.selectPod(this.pods[index]); + return true; + }, - /** - * Called by backend part in case of name validation failure. - * @param {string} name - name that was validated. - * @param {string} errorText - reason why this name is invalid. - */ - supervisedUserNameError: function(name, errorText) { - this.disabled = false; - this.lastIncorrectUserName_ = name; - this.lastVerifiedName_ = null; + selectUser: function(user_id) { + for (var i = 0, pod; pod = this.pods[i]; ++i) { + if (pod.user.id == user_id) { + this.selectPod(pod); + this.scrollIntoView(pod); + break; + } + } + }, + }; - var userNameField = $('supervised-user-creation-name'); - if (userNameField.value == this.lastIncorrectUserName_) { - this.nameErrorVisible = true; - $('bubble').showTextForElement( - $('supervised-user-creation-name'), - errorText, - cr.ui.Bubble.Attachment.RIGHT, - 12, 4); - this.setButtonDisabledStatus('next', true); - } - }, + return { + EXTERNAL_API: [ + 'loadManagers', + 'setCameraPresent', + 'setDefaultImages', + 'setExistingSupervisedUsers', + 'showErrorPage', + 'showIntroPage', + 'showManagerPage', + 'showManagerPasswordError', + 'showPage', + 'showPasswordError', + 'showProgress', + 'showStatusError', + 'showTutorialPage', + 'showUsernamePage', + 'supervisedUserNameError', + 'supervisedUserNameOk', + 'supervisedUserSuggestImport', + ], - supervisedUserSuggestImport: function(name, user_id) { - this.disabled = false; - this.lastIncorrectUserName_ = name; - this.lastVerifiedName_ = null; + lastVerifiedName_: null, + lastIncorrectUserName_: null, + managerList_: null, + importList_: null, - var userNameField = $('supervised-user-creation-name'); - var creationScreen = this; + currentPage_: null, + imagesRequested_: false, - if (userNameField.value == this.lastIncorrectUserName_) { - this.nameErrorVisible = true; - var link = this.ownerDocument.createElement('div'); - link.innerHTML = loadTimeData.getStringF( - 'importBubbleText', - '<a class="signin-link" href="#">', - name, - '</a>'); - link.querySelector('.signin-link').addEventListener('click', - function(e) { - creationScreen.handleSuggestImport_(user_id); + // Contains data that can be auto-shared with handler. + context_: {}, + + /** @override */ + decorate: function() { + this.managerList_ = new ManagerPodList(); + $('supervised-user-creation-managers-pane') + .appendChild(this.managerList_); + + this.importList_ = new ImportPodList(); + $('supervised-user-creation-import-pane') + .appendChild(this.importList_); + + var userNameField = $('supervised-user-creation-name'); + var passwordField = $('supervised-user-creation-password'); + var password2Field = $('supervised-user-creation-password-confirm'); + + var creationScreen = this; + + var hideUserPasswordError = function(element) { + $('bubble').hide(); + $('supervised-user-creation-password') + .classList.remove('password-error'); + }; + + this.configureTextInput( + userNameField, this.checkUserName_.bind(this), + this.validIfNotEmpty_.bind(this), function(element) { + passwordField.focus(); + }, this.clearUserNameError_.bind(this)); + this.configureTextInput( + passwordField, this.updateNextButtonForUser_.bind(this), + this.validIfNotEmpty_.bind(this), function(element) { + password2Field.focus(); + }, hideUserPasswordError); + this.configureTextInput( + password2Field, this.updateNextButtonForUser_.bind(this), + this.validIfNotEmpty_.bind(this), function(element) { + creationScreen.getScreenButton('next').focus(); + }, hideUserPasswordError); + + this.getScreenButton('error').addEventListener('click', function(e) { + creationScreen.handleErrorButtonPressed_(); + e.stopPropagation(); + }); + + /* + TODO(antrim) : this is an explicit code duplications with + UserImageScreen. It should be removed by issue 251179. + */ + var imageGrid = this.getScreenElement('image-grid'); + UserImagesGrid.decorate(imageGrid); + + // Preview image will track the selected item's URL. + var previewElement = this.getScreenElement('image-preview'); + previewElement.oncontextmenu = function(e) { + e.preventDefault(); + }; + + imageGrid.previewElement = previewElement; + imageGrid.selectionType = 'default'; + imageGrid.flipPhotoElement = this.getScreenElement('flip-photo'); + + imageGrid.addEventListener( + 'activate', this.handleActivate_.bind(this)); + imageGrid.addEventListener('select', this.handleSelect_.bind(this)); + imageGrid.addEventListener( + 'phototaken', this.handlePhotoTaken_.bind(this)); + imageGrid.addEventListener( + 'photoupdated', this.handlePhotoUpdated_.bind(this)); + // Set the title for camera item in the grid. + imageGrid.setCameraTitles( + loadTimeData.getString('takePhoto'), + loadTimeData.getString('photoFromCamera')); + + this.getScreenElement('take-photo') + .addEventListener('click', this.handleTakePhoto_.bind(this)); + this.getScreenElement('discard-photo') + .addEventListener('click', this.handleDiscardPhoto_.bind(this)); + + // Toggle 'animation' class for the duration of WebKit transition. + this.getScreenElement('flip-photo') + .addEventListener('click', this.handleFlipPhoto_.bind(this)); + this.getScreenElement('image-stream-crop') + .addEventListener('transitionend', function(e) { + previewElement.classList.remove('animation'); + }); + this.getScreenElement('image-preview-img') + .addEventListener('transitionend', function(e) { + previewElement.classList.remove('animation'); + }); + + $('supervised-user-creation-navigation') + .addEventListener('close', this.cancel.bind(this)); + }, + + buttonIds: [], + + /** + * Creates button for adding to controls. + * @param {string} buttonId -- id for button, have to be unique within + * screen. Actual id will be prefixed with screen name and appended + * with + * '-button'. Use getScreenButton(buttonId) to find it later. + * @param {string} i18nPrefix -- screen prefix for i18n values. + * @param {function} callback -- will be called on button press with + * buttonId parameter. + * @param {array} pages -- list of pages where this button should be + * displayed. + * @param {array} classes -- list of additional CSS classes for button. + */ + makeButton: function(buttonId, i18nPrefix, callback, pages, classes) { + var capitalizedId = + buttonId.charAt(0).toUpperCase() + buttonId.slice(1); + this.buttonIds.push(buttonId); + var result = this.ownerDocument.createElement('button'); + result.id = this.name() + '-' + buttonId + '-button'; + result.classList.add('screen-control-button'); + for (var i = 0; i < classes.length; i++) { + result.classList.add(classes[i]); + } + result.textContent = loadTimeData.getString( + i18nPrefix + capitalizedId + 'ButtonTitle'); + result.addEventListener('click', function(e) { + callback(buttonId); + e.stopPropagation(); + }); + result.pages = pages; + return result; + }, + + /** + * Simple validator for |configureTextInput|. + * Element is considered valid if it has any text. + * @param {Element} element - element to be validated. + * @return {boolean} - true, if element has any text. + */ + validIfNotEmpty_: function(element) { + return (element.value.length > 0); + }, + + /** + * Configure text-input |element|. + * @param {Element} element - element to be configured. + * @param {function(element)} inputChangeListener - function that will be + * called upon any button press/release. + * @param {function(element)} validator - function that will be called when + * Enter is pressed. If it returns |true| then advance to next + * element. + * @param {function(element)} moveFocus - function that will determine next + * element and move focus to it. + * @param {function(element)} errorHider - function that is called upon + * every button press, so that any associated error can be hidden. + */ + configureTextInput: function( + element, inputChangeListener, validator, moveFocus, errorHider) { + element.addEventListener('keydown', function(e) { + if (e.key == 'Enter') { + var dataValid = true; + if (validator) + dataValid = validator(element); + if (!dataValid) { + element.focus(); + } else { + if (moveFocus) + moveFocus(element); + } e.stopPropagation(); - }); - $('bubble').showContentForElement( - $('supervised-user-creation-name'), - cr.ui.Bubble.Attachment.RIGHT, - link, - 12, 4); - this.setButtonDisabledStatus('next', true); - } - }, + return; + } + if (errorHider) + errorHider(element); + if (inputChangeListener) + inputChangeListener(element); + }); + element.addEventListener('keyup', function(e) { + if (inputChangeListener) + inputChangeListener(element); + }); + }, - /** - * Clears user name error, if name is no more guaranteed to be invalid. - * @private - */ - clearUserNameError_: function() { - // Avoid flickering - if ($('supervised-user-creation-name').value == + /** + * Makes element from template. + * @param {string} templateId -- template will be looked up within screen + * by class with name "template-<templateId>". + * @param {string} elementId -- id for result, uinque within screen. Actual + * id will be prefixed with screen name. Use getScreenElement(id) to + * find it later. + */ + makeFromTemplate: function(templateId, elementId) { + var templateClassName = 'template-' + templateId; + var templateNode = this.querySelector('.' + templateClassName); + var screenPrefix = this.name() + '-'; + var result = templateNode.cloneNode(true); + result.classList.remove(templateClassName); + result.id = screenPrefix + elementId; + return result; + }, + + /** + * @param {string} buttonId -- id of button to be found, + * @return {Element} button created by makeButton with given buttonId. + */ + getScreenButton: function(buttonId) { + var fullId = this.name() + '-' + buttonId + '-button'; + return this.getScreenElement(buttonId + '-button'); + }, + + /** + * @param {string} elementId -- id of element to be found, + * @return {Element} button created by makeFromTemplate with elementId. + */ + getScreenElement: function(elementId) { + var fullId = this.name() + '-' + elementId; + return $(fullId); + }, + + /** + * Screen controls. + * @type {!Array} Array of Buttons. + */ + get buttons() { + var links = this.ownerDocument.createElement('div'); + var buttons = this.ownerDocument.createElement('div'); + links.classList.add('controls-links'); + buttons.classList.add('controls-buttons'); + + var importLink = this.makeFromTemplate( + 'import-supervised-user-link', 'import-link'); + importLink.hidden = true; + links.appendChild(importLink); + + var linkElement = importLink.querySelector('.signin-link'); + linkElement.addEventListener( + 'click', this.importLinkPressed_.bind(this)); + + var createLink = this.makeFromTemplate( + 'create-supervised-user-link', 'create-link'); + createLink.hidden = true; + links.appendChild(createLink); + + var status = this.makeFromTemplate('status-container', 'status'); + buttons.appendChild(status); + + linkElement = createLink.querySelector('.signin-link'); + linkElement.addEventListener( + 'click', this.createLinkPressed_.bind(this)); + + buttons.appendChild(this.makeButton( + 'start', 'supervisedUserCreationFlow', + this.startButtonPressed_.bind(this), ['intro'], + ['custom-appearance', 'button-fancy', 'button-blue'])); + + buttons.appendChild(this.makeButton( + 'prev', 'supervisedUserCreationFlow', + this.prevButtonPressed_.bind(this), ['manager'], [])); + + buttons.appendChild(this.makeButton( + 'next', 'supervisedUserCreationFlow', + this.nextButtonPressed_.bind(this), ['manager', 'username'], [])); + + buttons.appendChild(this.makeButton( + 'import', 'supervisedUserCreationFlow', + this.importButtonPressed_.bind(this), + ['import', 'import-password'], [])); + + buttons.appendChild(this.makeButton( + 'gotit', 'supervisedUserCreationFlow', + this.gotItButtonPressed_.bind(this), ['created'], + ['custom-appearance', 'button-fancy', 'button-blue'])); + return [links, buttons]; + }, + + /** + * Does sanity check and calls backend with current user name/password + * pair to authenticate manager. May result in showManagerPasswordError. + * @private + */ + validateAndLogInAsManager_: function() { + var selectedPod = this.managerList_.selectedPod_; + if (null == selectedPod) + return; + + var managerId = selectedPod.user.username; + var managerDisplayId = selectedPod.user.emailAddress; + var managerPassword = selectedPod.passwordElement.value; + if (managerPassword.length == 0) + return; + if (this.disabled) + return; + this.disabled = true; + this.context_.managerId = managerId; + this.context_.managerDisplayId = managerDisplayId; + this.context_.managerName = selectedPod.user.displayName; + chrome.send( + 'authenticateManagerInSupervisedUserCreationFlow', + [managerId, managerPassword]); + }, + + /** + * Does sanity check and calls backend with user display name/password + * pair to create a user. + * @private + */ + validateAndCreateSupervisedUser_: function() { + var firstPassword = $('supervised-user-creation-password').value; + var secondPassword = + $('supervised-user-creation-password-confirm').value; + var userName = $('supervised-user-creation-name').value; + if (firstPassword != secondPassword) { + this.showPasswordError(loadTimeData.getString( + 'createSupervisedUserPasswordMismatchError')); + return; + } + if (this.disabled) + return; + this.disabled = true; + + this.context_.supervisedName = userName; + chrome.send( + 'specifySupervisedUserCreationFlowUserData', + [userName, firstPassword]); + }, + + /** + * Does sanity check and calls backend with selected existing supervised + * user id to import user. + * @private + */ + importSupervisedUser_: function() { + if (this.disabled) + return; + if (this.currentPage_ == 'import-password') { + var firstPassword = this.getScreenElement('password').value; + var secondPassword = + this.getScreenElement('password-confirm').value; + if (firstPassword != secondPassword) { + this.showPasswordError(loadTimeData.getString( + 'createSupervisedUserPasswordMismatchError')); + return; + } + var userId = this.context_.importUserId; + this.disabled = true; + chrome.send( + 'importSupervisedUserWithPassword', [userId, firstPassword]); + return; + } else { + var selectedPod = this.importList_.selectedPod_; + if (!selectedPod) + return; + var user = selectedPod.user; + var userId = user.id; + + this.context_.importUserId = userId; + this.context_.supervisedName = user.name; + this.context_.selectedImageUrl = user.avatarurl; + if (!user.needPassword) { + this.disabled = true; + chrome.send('importSupervisedUser', [userId]); + } else { + this.setVisiblePage_('import-password'); + } + } + }, + + /** + * Calls backend part to check if current user name is valid/not taken. + * Results in a call to either supervisedUserNameOk or + * supervisedUserNameError. + * @private + */ + checkUserName_: function() { + var userName = this.getScreenElement('name').value; + + // Avoid flickering + if (userName == this.lastIncorrectUserName_ || + userName == this.lastVerifiedName_) { + return; + } + if (userName.length > 0) { + chrome.send('checkSupervisedUserName', [userName]); + } else { + this.nameErrorVisible = false; + this.lastVerifiedName_ = null; + this.lastIncorrectUserName_ = null; + this.updateNextButtonForUser_(); + } + }, + + /** + * Called by backend part in case of successful name validation. + * @param {string} name - name that was validated. + */ + supervisedUserNameOk: function(name) { + this.lastVerifiedName_ = name; + this.lastIncorrectUserName_ = null; + if ($('supervised-user-creation-name').value == name) + this.clearUserNameError_(); + this.updateNextButtonForUser_(); + }, + + /** + * Called by backend part in case of name validation failure. + * @param {string} name - name that was validated. + * @param {string} errorText - reason why this name is invalid. + */ + supervisedUserNameError: function(name, errorText) { + this.disabled = false; + this.lastIncorrectUserName_ = name; + this.lastVerifiedName_ = null; + + var userNameField = $('supervised-user-creation-name'); + if (userNameField.value == this.lastIncorrectUserName_) { + this.nameErrorVisible = true; + $('bubble').showTextForElement( + $('supervised-user-creation-name'), errorText, + cr.ui.Bubble.Attachment.RIGHT, 12, 4); + this.setButtonDisabledStatus('next', true); + } + }, + + supervisedUserSuggestImport: function(name, user_id) { + this.disabled = false; + this.lastIncorrectUserName_ = name; + this.lastVerifiedName_ = null; + + var userNameField = $('supervised-user-creation-name'); + var creationScreen = this; + + if (userNameField.value == this.lastIncorrectUserName_) { + this.nameErrorVisible = true; + var link = this.ownerDocument.createElement('div'); + link.innerHTML = loadTimeData.getStringF( + 'importBubbleText', '<a class="signin-link" href="#">', name, + '</a>'); + link.querySelector('.signin-link') + .addEventListener('click', function(e) { + creationScreen.handleSuggestImport_(user_id); + e.stopPropagation(); + }); + $('bubble').showContentForElement( + $('supervised-user-creation-name'), + cr.ui.Bubble.Attachment.RIGHT, link, 12, 4); + this.setButtonDisabledStatus('next', true); + } + }, + + /** + * Clears user name error, if name is no more guaranteed to be invalid. + * @private + */ + clearUserNameError_: function() { + // Avoid flickering + if ($('supervised-user-creation-name').value == this.lastIncorrectUserName_) { - return; - } - this.nameErrorVisible = false; - }, + return; + } + this.nameErrorVisible = false; + }, - /** - * Called by backend part in case of password validation failure. - * @param {string} errorText - reason why this password is invalid. - */ - showPasswordError: function(errorText) { - $('bubble').showTextForElement( - $('supervised-user-creation-password'), - errorText, - cr.ui.Bubble.Attachment.RIGHT, - 12, 4); - $('supervised-user-creation-password').classList.add('password-error'); - $('supervised-user-creation-password').focus(); - this.disabled = false; - this.setButtonDisabledStatus('next', true); - }, + /** + * Called by backend part in case of password validation failure. + * @param {string} errorText - reason why this password is invalid. + */ + showPasswordError: function(errorText) { + $('bubble').showTextForElement( + $('supervised-user-creation-password'), errorText, + cr.ui.Bubble.Attachment.RIGHT, 12, 4); + $('supervised-user-creation-password') + .classList.add('password-error'); + $('supervised-user-creation-password').focus(); + this.disabled = false; + this.setButtonDisabledStatus('next', true); + }, - /** - * True if user name error should be displayed. - * @type {boolean} - */ - set nameErrorVisible(value) { - $('supervised-user-creation-name'). - classList.toggle('duplicate-name', value); - if (!value) - $('bubble').hide(); - }, + /** + * True if user name error should be displayed. + * @type {boolean} + */ + set nameErrorVisible(value) { + $('supervised-user-creation-name') + .classList.toggle('duplicate-name', value); + if (!value) + $('bubble').hide(); + }, - /** - * Updates state of Continue button after minimal checks. - * @return {boolean} true, if form seems to be valid. - * @private - */ - updateNextButtonForManager_: function() { - var selectedPod = this.managerList_.selectedPod_; - canProceed = null != selectedPod && - selectedPod.passwordElement.value.length > 0; + /** + * Updates state of Continue button after minimal checks. + * @return {boolean} true, if form seems to be valid. + * @private + */ + updateNextButtonForManager_: function() { + var selectedPod = this.managerList_.selectedPod_; + canProceed = null != selectedPod && + selectedPod.passwordElement.value.length > 0; - this.setButtonDisabledStatus('next', !canProceed); - return canProceed; - }, + this.setButtonDisabledStatus('next', !canProceed); + return canProceed; + }, - /** - * Updates state of Continue button after minimal checks. - * @return {boolean} true, if form seems to be valid. - * @private - */ - updateNextButtonForUser_: function() { - var firstPassword = this.getScreenElement('password').value; - var secondPassword = this.getScreenElement('password-confirm').value; - var userName = this.getScreenElement('name').value; + /** + * Updates state of Continue button after minimal checks. + * @return {boolean} true, if form seems to be valid. + * @private + */ + updateNextButtonForUser_: function() { + var firstPassword = this.getScreenElement('password').value; + var secondPassword = this.getScreenElement('password-confirm').value; + var userName = this.getScreenElement('name').value; - var passwordOk = (firstPassword.length > 0) && - (firstPassword.length == secondPassword.length); + var passwordOk = (firstPassword.length > 0) && + (firstPassword.length == secondPassword.length); - if (this.currentPage_ == 'import-password') { - this.setButtonDisabledStatus('import', !passwordOk); - return passwordOk; - } - var imageGrid = this.getScreenElement('image-grid'); - var imageChosen = !(imageGrid.selectionType == 'camera' && - imageGrid.cameraLive); - var canProceed = - passwordOk && - (userName.length > 0) && - this.lastVerifiedName_ && - (userName == this.lastVerifiedName_) && - imageChosen; + if (this.currentPage_ == 'import-password') { + this.setButtonDisabledStatus('import', !passwordOk); + return passwordOk; + } + var imageGrid = this.getScreenElement('image-grid'); + var imageChosen = + !(imageGrid.selectionType == 'camera' && imageGrid.cameraLive); + var canProceed = passwordOk && (userName.length > 0) && + this.lastVerifiedName_ && (userName == this.lastVerifiedName_) && + imageChosen; - this.setButtonDisabledStatus('next', !canProceed); - return canProceed; - }, + this.setButtonDisabledStatus('next', !canProceed); + return canProceed; + }, - showSelectedManagerPasswordError_: function() { - var selectedPod = this.managerList_.selectedPod_; - selectedPod.showPasswordError(); - selectedPod.passwordElement.value = ''; - selectedPod.focusInput(); - this.updateNextButtonForManager_(); - }, + showSelectedManagerPasswordError_: function() { + var selectedPod = this.managerList_.selectedPod_; + selectedPod.showPasswordError(); + selectedPod.passwordElement.value = ''; + selectedPod.focusInput(); + this.updateNextButtonForManager_(); + }, - /** - * Enables one particular subpage and hides the rest. - * @param {string} visiblePage - name of subpage. - * @private - */ - setVisiblePage_: function(visiblePage) { - this.disabled = false; - this.updateText_(); - $('bubble').hide(); - if (!this.imagesRequested_) { - chrome.send('supervisedUserGetImages'); - this.imagesRequested_ = true; - } - var pageNames = ['intro', - 'manager', - 'username', - 'import', - 'created', - 'error']; - var pageButtons = {'intro' : 'start', - 'error' : 'error', - 'import' : 'import', - 'import-password' : 'import', - 'created' : 'gotit'}; - this.hideStatus_(); - var pageToDisplay = visiblePage; - if (visiblePage == 'import-password') - pageToDisplay = 'username'; + /** + * Enables one particular subpage and hides the rest. + * @param {string} visiblePage - name of subpage. + * @private + */ + setVisiblePage_: function(visiblePage) { + this.disabled = false; + this.updateText_(); + $('bubble').hide(); + if (!this.imagesRequested_) { + chrome.send('supervisedUserGetImages'); + this.imagesRequested_ = true; + } + var pageNames = + ['intro', 'manager', 'username', 'import', 'created', 'error']; + var pageButtons = { + 'intro': 'start', + 'error': 'error', + 'import': 'import', + 'import-password': 'import', + 'created': 'gotit' + }; + this.hideStatus_(); + var pageToDisplay = visiblePage; + if (visiblePage == 'import-password') + pageToDisplay = 'username'; - for (i in pageNames) { - var pageName = pageNames[i]; - var page = $('supervised-user-creation-' + pageName); - page.hidden = (pageName != pageToDisplay); - if (pageName == pageToDisplay) - $('step-logo').hidden = page.classList.contains('step-no-logo'); - } + for (i in pageNames) { + var pageName = pageNames[i]; + var page = $('supervised-user-creation-' + pageName); + page.hidden = (pageName != pageToDisplay); + if (pageName == pageToDisplay) + $('step-logo').hidden = page.classList.contains('step-no-logo'); + } - for (i in this.buttonIds) { - var button = this.getScreenButton(this.buttonIds[i]); - button.hidden = button.pages.indexOf(visiblePage) < 0; - button.disabled = false; - } + for (i in this.buttonIds) { + var button = this.getScreenButton(this.buttonIds[i]); + button.hidden = button.pages.indexOf(visiblePage) < 0; + button.disabled = false; + } - this.getScreenElement('import-link').hidden = true; - this.getScreenElement('create-link').hidden = true; + this.getScreenElement('import-link').hidden = true; + this.getScreenElement('create-link').hidden = true; - if (pageButtons[visiblePage]) - this.getScreenButton(pageButtons[visiblePage]).focus(); + if (pageButtons[visiblePage]) + this.getScreenButton(pageButtons[visiblePage]).focus(); - this.currentPage_ = visiblePage; + this.currentPage_ = visiblePage; - if (visiblePage == 'manager' || visiblePage == 'intro') { - $('supervised-user-creation-password').classList.remove( - 'password-error'); - if (this.managerList_.pods.length > 0) - this.managerList_.selectPod(this.managerList_.pods[0]); - $('login-header-bar').updateUI_(); - } + if (visiblePage == 'manager' || visiblePage == 'intro') { + $('supervised-user-creation-password') + .classList.remove('password-error'); + if (this.managerList_.pods.length > 0) + this.managerList_.selectPod(this.managerList_.pods[0]); + $('login-header-bar').updateUI_(); + } - if (visiblePage == 'username' || visiblePage == 'import-password') { - var elements = this.getScreenElement(pageToDisplay). - querySelectorAll('.hide-on-import'); - for (var i = 0; i < elements.length; i++) { - elements[i].classList.toggle('hidden-on-import', - visiblePage == 'import-password'); - } - } - if (visiblePage == 'username') { - var imageGrid = this.getScreenElement('image-grid'); - // select some image. - var selected = this.imagesData_[ - Math.floor(Math.random() * this.imagesData_.length)]; - this.context_.selectedImageUrl = selected.url; - imageGrid.selectedItemUrl = selected.url; - chrome.send('supervisedUserSelectImage', - [selected.url, 'default']); - this.getScreenElement('image-grid').redraw(); - this.checkUserName_(); - this.updateNextButtonForUser_(); - this.getScreenElement('name').focus(); - this.getScreenElement('import-link').hidden = - this.importList_.pods.length == 0; - } else if (visiblePage == 'import-password') { - var imageGrid = this.getScreenElement('image-grid'); - var selected; - if ('selectedImageUrl' in this.context_) { - selected = this.context_.selectedImageUrl; - } else { - // select some image. - selected = this.imagesData_[ - Math.floor(Math.random() * this.imagesData_.length)].url; - chrome.send('supervisedUserSelectImage', - [selected, 'default']); - } - imageGrid.selectedItemUrl = selected; - this.getScreenElement('image-grid').redraw(); + if (visiblePage == 'username' || visiblePage == 'import-password') { + var elements = this.getScreenElement(pageToDisplay) + .querySelectorAll('.hide-on-import'); + for (var i = 0; i < elements.length; i++) { + elements[i].classList.toggle( + 'hidden-on-import', visiblePage == 'import-password'); + } + } + if (visiblePage == 'username') { + var imageGrid = this.getScreenElement('image-grid'); + // select some image. + var selected = this.imagesData_[Math.floor( + Math.random() * this.imagesData_.length)]; + this.context_.selectedImageUrl = selected.url; + imageGrid.selectedItemUrl = selected.url; + chrome.send('supervisedUserSelectImage', [selected.url, 'default']); + this.getScreenElement('image-grid').redraw(); + this.checkUserName_(); + this.updateNextButtonForUser_(); + this.getScreenElement('name').focus(); + this.getScreenElement('import-link').hidden = + this.importList_.pods.length == 0; + } else if (visiblePage == 'import-password') { + var imageGrid = this.getScreenElement('image-grid'); + var selected; + if ('selectedImageUrl' in this.context_) { + selected = this.context_.selectedImageUrl; + } else { + // select some image. + selected = + this.imagesData_[Math.floor( + Math.random() * this.imagesData_.length)] + .url; + chrome.send('supervisedUserSelectImage', [selected, 'default']); + } + imageGrid.selectedItemUrl = selected; + this.getScreenElement('image-grid').redraw(); - this.updateNextButtonForUser_(); + this.updateNextButtonForUser_(); - this.getScreenElement('password').focus(); - this.getScreenElement('import-link').hidden = true; - } else { - this.getScreenElement('image-grid').stopCamera(); - } - if (visiblePage == 'import') { - this.getScreenElement('create-link').hidden = false; - this.getScreenButton('import').disabled = - !this.importList_.selectedPod_ || - this.importList_.selectedPod_.user.exists; - } - $('supervised-user-creation-navigation').closeVisible = - (visiblePage != 'created'); + this.getScreenElement('password').focus(); + this.getScreenElement('import-link').hidden = true; + } else { + this.getScreenElement('image-grid').stopCamera(); + } + if (visiblePage == 'import') { + this.getScreenElement('create-link').hidden = false; + this.getScreenButton('import').disabled = + !this.importList_.selectedPod_ || + this.importList_.selectedPod_.user.exists; + } + $('supervised-user-creation-navigation').closeVisible = + (visiblePage != 'created'); - chrome.send('currentSupervisedUserPage', [this.currentPage_]); - }, + chrome.send('currentSupervisedUserPage', [this.currentPage_]); + }, - setButtonDisabledStatus: function(buttonName, status) { - var button = $('supervised-user-creation-' + buttonName + '-button'); - button.disabled = status; - }, + setButtonDisabledStatus: function(buttonName, status) { + var button = $('supervised-user-creation-' + buttonName + '-button'); + button.disabled = status; + }, - gotItButtonPressed_: function() { - chrome.send('finishLocalSupervisedUserCreation'); - }, + gotItButtonPressed_: function() { + chrome.send('finishLocalSupervisedUserCreation'); + }, - handleErrorButtonPressed_: function() { - chrome.send('abortLocalSupervisedUserCreation'); - }, + handleErrorButtonPressed_: function() { + chrome.send('abortLocalSupervisedUserCreation'); + }, - startButtonPressed_: function() { - this.setVisiblePage_('manager'); - this.setButtonDisabledStatus('next', true); - }, + startButtonPressed_: function() { + this.setVisiblePage_('manager'); + this.setButtonDisabledStatus('next', true); + }, - nextButtonPressed_: function() { - if (this.currentPage_ == 'manager') { - this.validateAndLogInAsManager_(); - return; - } - if (this.currentPage_ == 'username') { - this.validateAndCreateSupervisedUser_(); - } - }, + nextButtonPressed_: function() { + if (this.currentPage_ == 'manager') { + this.validateAndLogInAsManager_(); + return; + } + if (this.currentPage_ == 'username') { + this.validateAndCreateSupervisedUser_(); + } + }, - importButtonPressed_: function() { - this.importSupervisedUser_(); - }, + importButtonPressed_: function() { + this.importSupervisedUser_(); + }, - importLinkPressed_: function() { - this.setVisiblePage_('import'); - }, + importLinkPressed_: function() { + this.setVisiblePage_('import'); + }, - handleSuggestImport_: function(user_id) { - this.setVisiblePage_('import'); - this.importList_.selectUser(user_id); - }, + handleSuggestImport_: function(user_id) { + this.setVisiblePage_('import'); + this.importList_.selectUser(user_id); + }, - createLinkPressed_: function() { - this.setVisiblePage_('username'); - this.lastIncorrectUserName_ = null; - this.lastVerifiedName_ = null; - this.checkUserName_(); - }, + createLinkPressed_: function() { + this.setVisiblePage_('username'); + this.lastIncorrectUserName_ = null; + this.lastVerifiedName_ = null; + this.checkUserName_(); + }, - prevButtonPressed_: function() { - this.setVisiblePage_('intro'); - }, + prevButtonPressed_: function() { + this.setVisiblePage_('intro'); + }, - showProgress: function(text) { - var status = this.getScreenElement('status'); - var statusText = status.querySelector('.id-text'); - statusText.textContent = text; - statusText.classList.remove('error'); - status.querySelector('.id-spinner').hidden = false; - status.hidden = false; - this.getScreenElement('import-link').hidden = true; - this.getScreenElement('create-link').hidden = true; - }, + showProgress: function(text) { + var status = this.getScreenElement('status'); + var statusText = status.querySelector('.id-text'); + statusText.textContent = text; + statusText.classList.remove('error'); + status.querySelector('.id-spinner').hidden = false; + status.hidden = false; + this.getScreenElement('import-link').hidden = true; + this.getScreenElement('create-link').hidden = true; + }, - showStatusError: function(text) { - var status = this.getScreenElement('status'); - var statusText = status.querySelector('.id-text'); - statusText.textContent = text; - statusText.classList.add('error'); - status.querySelector('.id-spinner').hidden = true; - status.hidden = false; - this.getScreenElement('import-link').hidden = true; - this.getScreenElement('create-link').hidden = true; - }, + showStatusError: function(text) { + var status = this.getScreenElement('status'); + var statusText = status.querySelector('.id-text'); + statusText.textContent = text; + statusText.classList.add('error'); + status.querySelector('.id-spinner').hidden = true; + status.hidden = false; + this.getScreenElement('import-link').hidden = true; + this.getScreenElement('create-link').hidden = true; + }, - hideStatus_: function() { - var status = this.getScreenElement('status'); - status.hidden = true; - }, + hideStatus_: function() { + var status = this.getScreenElement('status'); + status.hidden = true; + }, - /** - * Updates state of login header so that necessary buttons are displayed. - */ - onBeforeShow: function(data) { - $('login-header-bar').signinUIState = - SIGNIN_UI_STATE.SUPERVISED_USER_CREATION_FLOW; - if (data['managers']) { - this.loadManagers(data['managers']); - } - var imageGrid = this.getScreenElement('image-grid'); - imageGrid.updateAndFocus(); - }, + /** + * Updates state of login header so that necessary buttons are + * displayed. + */ + onBeforeShow: function(data) { + $('login-header-bar').signinUIState = + SIGNIN_UI_STATE.SUPERVISED_USER_CREATION_FLOW; + if (data['managers']) { + this.loadManagers(data['managers']); + } + var imageGrid = this.getScreenElement('image-grid'); + imageGrid.updateAndFocus(); + }, - /** - * Update state of login header so that necessary buttons are displayed. - */ - onBeforeHide: function() { - $('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN; - this.getScreenElement('image-grid').stopCamera(); - }, + /** + * Update state of login header so that necessary buttons are displayed. + */ + onBeforeHide: function() { + $('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN; + this.getScreenElement('image-grid').stopCamera(); + }, - /** - * Returns a control which should receive an initial focus. - */ - get defaultControl() { - return $('supervised-user-creation-name'); - }, + /** + * Returns a control which should receive an initial focus. + */ + get defaultControl() { + return $('supervised-user-creation-name'); + }, - /** - * True if the the screen is disabled (handles no user interaction). - * @type {boolean} - */ - disabled_: false, + /** + * True if the the screen is disabled (handles no user interaction). + * @type {boolean} + */ + disabled_: false, - get disabled() { - return this.disabled_; - }, + get disabled() { + return this.disabled_; + }, - set disabled(value) { - this.disabled_ = value; - var controls = this.querySelectorAll('button,input'); - for (var i = 0, control; control = controls[i]; ++i) { - control.disabled = value; - } - $('login-header-bar').disabled = value; - }, + set disabled(value) { + this.disabled_ = value; + var controls = this.querySelectorAll('button,input'); + for (var i = 0, control; control = controls[i]; ++i) { + control.disabled = value; + } + $('login-header-bar').disabled = value; + }, - /** - * Called by backend part to propagate list of possible managers. - * @param {Array} userList - list of users that can be managers. - */ - loadManagers: function(userList) { - $('supervised-user-creation-managers-block').hidden = false; - this.managerList_.clearPods(); - for (var i = 0; i < userList.length; ++i) - this.managerList_.addPod(userList[i]); - if (userList.length > 0) - this.managerList_.selectPod(this.managerList_.pods[0]); - }, + /** + * Called by backend part to propagate list of possible managers. + * @param {Array} userList - list of users that can be managers. + */ + loadManagers: function(userList) { + $('supervised-user-creation-managers-block').hidden = false; + this.managerList_.clearPods(); + for (var i = 0; i < userList.length; ++i) + this.managerList_.addPod(userList[i]); + if (userList.length > 0) + this.managerList_.selectPod(this.managerList_.pods[0]); + }, - /** - * Cancels user creation and drops to user screen (either sign). - */ - cancel: function() { - var notSignedInPages = ['intro', 'manager']; - var postCreationPages = ['created']; - if (notSignedInPages.indexOf(this.currentPage_) >= 0) { - chrome.send('hideLocalSupervisedUserCreation'); + /** + * Cancels user creation and drops to user screen (either sign). + */ + cancel: function() { + var notSignedInPages = ['intro', 'manager']; + var postCreationPages = ['created']; + if (notSignedInPages.indexOf(this.currentPage_) >= 0) { + chrome.send('hideLocalSupervisedUserCreation'); - // Make sure no manager password is kept: - this.managerList_.clearPods(); + // Make sure no manager password is kept: + this.managerList_.clearPods(); - Oobe.showUserPods(); - return; - } - if (postCreationPages.indexOf(this.currentPage_) >= 0) { - chrome.send('finishLocalSupervisedUserCreation'); - return; - } - chrome.send('abortLocalSupervisedUserCreation'); - }, + Oobe.showUserPods(); + return; + } + if (postCreationPages.indexOf(this.currentPage_) >= 0) { + chrome.send('finishLocalSupervisedUserCreation'); + return; + } + chrome.send('abortLocalSupervisedUserCreation'); + }, - updateText_: function() { - var managerDisplayId = this.context_.managerDisplayId; - this.updateElementText_('intro-alternate-text', - 'createSupervisedUserIntroAlternateText'); - this.updateElementText_('created-text-1', - 'createSupervisedUserCreatedText1', - this.context_.supervisedName); - // TODO(antrim): Move wrapping with strong in grd file, and eliminate this - //call. - this.updateElementText_('created-text-2', - 'createSupervisedUserCreatedText2', - this.wrapStrong( - loadTimeData.getString('managementURL')), - this.context_.supervisedName); - this.updateElementText_('created-text-3', - 'createSupervisedUserCreatedText3', - managerDisplayId); - this.updateElementText_('name-explanation', - 'createSupervisedUserNameExplanation', - managerDisplayId); - }, + updateText_: function() { + var managerDisplayId = this.context_.managerDisplayId; + this.updateElementText_( + 'intro-alternate-text', 'createSupervisedUserIntroAlternateText'); + this.updateElementText_( + 'created-text-1', 'createSupervisedUserCreatedText1', + this.context_.supervisedName); + // TODO(antrim): Move wrapping with strong in grd file, and eliminate + // this + // call. + this.updateElementText_( + 'created-text-2', 'createSupervisedUserCreatedText2', + this.wrapStrong(loadTimeData.getString('managementURL')), + this.context_.supervisedName); + this.updateElementText_( + 'created-text-3', 'createSupervisedUserCreatedText3', + managerDisplayId); + this.updateElementText_( + 'name-explanation', 'createSupervisedUserNameExplanation', + managerDisplayId); + }, - wrapStrong: function(original) { - if (original == undefined) - return original; - return '<strong>' + original + '</strong>'; - }, + wrapStrong: function(original) { + if (original == undefined) + return original; + return '<strong>' + original + '</strong>'; + }, - updateElementText_: function(localId, templateName) { - var args = Array.prototype.slice.call(arguments); - args.shift(); - this.getScreenElement(localId).innerHTML = - loadTimeData.getStringF.apply(loadTimeData, args); - }, + updateElementText_: function(localId, templateName) { + var args = Array.prototype.slice.call(arguments); + args.shift(); + this.getScreenElement(localId).innerHTML = + loadTimeData.getStringF.apply(loadTimeData, args); + }, - showIntroPage: function() { - $('supervised-user-creation-password').value = ''; - $('supervised-user-creation-password-confirm').value = ''; - $('supervised-user-creation-name').value = ''; + showIntroPage: function() { + $('supervised-user-creation-password').value = ''; + $('supervised-user-creation-password-confirm').value = ''; + $('supervised-user-creation-name').value = ''; - this.lastVerifiedName_ = null; - this.lastIncorrectUserName_ = null; - this.passwordErrorVisible = false; - $('supervised-user-creation-password').classList.remove('password-error'); - this.nameErrorVisible = false; + this.lastVerifiedName_ = null; + this.lastIncorrectUserName_ = null; + this.passwordErrorVisible = false; + $('supervised-user-creation-password') + .classList.remove('password-error'); + this.nameErrorVisible = false; - this.setVisiblePage_('intro'); - }, + this.setVisiblePage_('intro'); + }, - showManagerPage: function() { - this.setVisiblePage_('manager'); - }, + showManagerPage: function() { + this.setVisiblePage_('manager'); + }, - showUsernamePage: function() { - this.setVisiblePage_('username'); - }, + showUsernamePage: function() { + this.setVisiblePage_('username'); + }, - showTutorialPage: function() { - this.setVisiblePage_('created'); - }, + showTutorialPage: function() { + this.setVisiblePage_('created'); + }, - showPage: function(page) { - this.setVisiblePage_(page); - }, + showPage: function(page) { + this.setVisiblePage_(page); + }, - showErrorPage: function(errorTitle, errorText, errorButtonText) { - this.disabled = false; - $('supervised-user-creation-error-title').innerHTML = errorTitle; - $('supervised-user-creation-error-text').innerHTML = errorText; - $('supervised-user-creation-error-button').textContent = errorButtonText; - this.setVisiblePage_('error'); - }, + showErrorPage: function(errorTitle, errorText, errorButtonText) { + this.disabled = false; + $('supervised-user-creation-error-title').innerHTML = errorTitle; + $('supervised-user-creation-error-text').innerHTML = errorText; + $('supervised-user-creation-error-button').textContent = + errorButtonText; + this.setVisiblePage_('error'); + }, - showManagerPasswordError: function() { - this.disabled = false; - this.showSelectedManagerPasswordError_(); - }, + showManagerPasswordError: function() { + this.disabled = false; + this.showSelectedManagerPasswordError_(); + }, - /* - TODO(antrim) : this is an explicit code duplications with UserImageScreen. - It should be removed by issue 251179. - */ - /** - * Currently selected user image index (take photo button is with zero - * index). - * @type {number} - */ - selectedUserImage_: -1, - imagesData: [], + /* + TODO(antrim) : this is an explicit code duplications with + UserImageScreen. It should be removed by issue 251179. + */ + /** + * Currently selected user image index (take photo button is with zero + * index). + * @type {number} + */ + selectedUserImage_: -1, + imagesData: [], - setDefaultImages: function(imagesData) { - var imageGrid = this.getScreenElement('image-grid'); - imageGrid.setDefaultImages(imagesData); - this.imagesData_ = imagesData; - }, + setDefaultImages: function(imagesData) { + var imageGrid = this.getScreenElement('image-grid'); + imageGrid.setDefaultImages(imagesData); + this.imagesData_ = imagesData; + }, - handleActivate_: function() { - var imageGrid = this.getScreenElement('image-grid'); - if (imageGrid.selectedItemUrl == ButtonImages.TAKE_PHOTO) { - this.handleTakePhoto_(); - return; - } - this.nextButtonPressed_(); - }, + handleActivate_: function() { + var imageGrid = this.getScreenElement('image-grid'); + if (imageGrid.selectedItemUrl == ButtonImages.TAKE_PHOTO) { + this.handleTakePhoto_(); + return; + } + this.nextButtonPressed_(); + }, - /** - * Handles selection change. - * @param {Event} e Selection change event. - * @private - */ - handleSelect_: function(e) { - var imageGrid = this.getScreenElement('image-grid'); - this.updateNextButtonForUser_(); + /** + * Handles selection change. + * @param {Event} e Selection change event. + * @private + */ + handleSelect_: function(e) { + var imageGrid = this.getScreenElement('image-grid'); + this.updateNextButtonForUser_(); - $('supervised-user-creation-flip-photo').tabIndex = - (imageGrid.selectionType == 'camera') ? 0 : -1; - if (imageGrid.cameraLive || imageGrid.selectionType != 'camera') - imageGrid.previewElement.classList.remove('phototaken'); - else - imageGrid.previewElement.classList.add('phototaken'); + $('supervised-user-creation-flip-photo').tabIndex = + (imageGrid.selectionType == 'camera') ? 0 : -1; + if (imageGrid.cameraLive || imageGrid.selectionType != 'camera') + imageGrid.previewElement.classList.remove('phototaken'); + else + imageGrid.previewElement.classList.add('phototaken'); - if (!imageGrid.cameraLive || imageGrid.selectionType != 'camera') { - this.context_.selectedImageUrl = imageGrid.selectedItemUrl; - chrome.send('supervisedUserSelectImage', - [imageGrid.selectedItemUrl, imageGrid.selectionType]); - } - // Start/stop camera on (de)selection. - if (!imageGrid.inProgramSelection && - imageGrid.selectionType != e.oldSelectionType) { - if (imageGrid.selectionType == 'camera') { - // Programmatic selection of camera item is done in - // startCamera callback where streaming is started by itself. - imageGrid.startCamera( - function() { + if (!imageGrid.cameraLive || imageGrid.selectionType != 'camera') { + this.context_.selectedImageUrl = imageGrid.selectedItemUrl; + chrome.send( + 'supervisedUserSelectImage', + [imageGrid.selectedItemUrl, imageGrid.selectionType]); + } + // Start/stop camera on (de)selection. + if (!imageGrid.inProgramSelection && + imageGrid.selectionType != e.oldSelectionType) { + if (imageGrid.selectionType == 'camera') { + // Programmatic selection of camera item is done in + // startCamera callback where streaming is started by itself. + imageGrid.startCamera(function() { // Start capture if camera is still the selected item. - $('supervised-user-creation-image-preview-img').classList. - toggle('animated-transform', true); + $('supervised-user-creation-image-preview-img') + .classList.toggle('animated-transform', true); return imageGrid.selectedItem == imageGrid.cameraImage; }); - } else { - $('supervised-user-creation-image-preview-img').classList.toggle( - 'animated-transform', false); - imageGrid.stopCamera(); - } - } - }, + } else { + $('supervised-user-creation-image-preview-img') + .classList.toggle('animated-transform', false); + imageGrid.stopCamera(); + } + } + }, - /** - * Handle camera-photo flip. - */ - handleFlipPhoto_: function() { - var imageGrid = this.getScreenElement('image-grid'); - imageGrid.previewElement.classList.add('animation'); - imageGrid.flipPhoto = !imageGrid.flipPhoto; - var flipMessageId = imageGrid.flipPhoto ? - 'photoFlippedAccessibleText' : 'photoFlippedBackAccessibleText'; - announceAccessibleMessage(loadTimeData.getString(flipMessageId)); - }, + /** + * Handle camera-photo flip. + */ + handleFlipPhoto_: function() { + var imageGrid = this.getScreenElement('image-grid'); + imageGrid.previewElement.classList.add('animation'); + imageGrid.flipPhoto = !imageGrid.flipPhoto; + var flipMessageId = imageGrid.flipPhoto ? + 'photoFlippedAccessibleText' : + 'photoFlippedBackAccessibleText'; + announceAccessibleMessage(loadTimeData.getString(flipMessageId)); + }, - /** - * Handle photo capture from the live camera stream. - */ - handleTakePhoto_: function(e) { - this.getScreenElement('image-grid').takePhoto(); - chrome.send('supervisedUserTakePhoto'); - }, + /** + * Handle photo capture from the live camera stream. + */ + handleTakePhoto_: function(e) { + this.getScreenElement('image-grid').takePhoto(); + chrome.send('supervisedUserTakePhoto'); + }, - handlePhotoTaken_: function(e) { - chrome.send('supervisedUserPhotoTaken', [e.dataURL]); - announceAccessibleMessage( - loadTimeData.getString('photoCaptureAccessibleText')); - }, + handlePhotoTaken_: function(e) { + chrome.send('supervisedUserPhotoTaken', [e.dataURL]); + announceAccessibleMessage( + loadTimeData.getString('photoCaptureAccessibleText')); + }, - /** - * Handle photo updated event. - * @param {Event} e Event with 'dataURL' property containing a data URL. - */ - handlePhotoUpdated_: function(e) { - chrome.send('supervisedUserPhotoTaken', [e.dataURL]); - }, + /** + * Handle photo updated event. + * @param {Event} e Event with 'dataURL' property containing a data URL. + */ + handlePhotoUpdated_: function(e) { + chrome.send('supervisedUserPhotoTaken', [e.dataURL]); + }, - /** - * Handle discarding the captured photo. - */ - handleDiscardPhoto_: function(e) { - var imageGrid = this.getScreenElement('image-grid'); - imageGrid.discardPhoto(); - chrome.send('supervisedUserDiscardPhoto'); - announceAccessibleMessage( - loadTimeData.getString('photoDiscardAccessibleText')); - }, + /** + * Handle discarding the captured photo. + */ + handleDiscardPhoto_: function(e) { + var imageGrid = this.getScreenElement('image-grid'); + imageGrid.discardPhoto(); + chrome.send('supervisedUserDiscardPhoto'); + announceAccessibleMessage( + loadTimeData.getString('photoDiscardAccessibleText')); + }, - setCameraPresent: function(present) { - this.getScreenElement('image-grid').cameraPresent = present; - }, + setCameraPresent: function(present) { + this.getScreenElement('image-grid').cameraPresent = present; + }, - setExistingSupervisedUsers: function(users) { - var selectedUser = null; - // Store selected user - if (this.importList_.selectedPod) - selectedUser = this.importList_.selectedPod.user.id; + setExistingSupervisedUsers: function(users) { + var selectedUser = null; + // Store selected user + if (this.importList_.selectedPod) + selectedUser = this.importList_.selectedPod.user.id; - var userList = users; - userList.sort(function(a, b) { - // Put existing users last. - if (a.exists != b.exists) - return a.exists ? 1 : -1; - // Sort rest by name. - return a.name.localeCompare(b.name, [], {sensitivity: 'base'}); - }); + var userList = users; + userList.sort(function(a, b) { + // Put existing users last. + if (a.exists != b.exists) + return a.exists ? 1 : -1; + // Sort rest by name. + return a.name.localeCompare(b.name, [], {sensitivity: 'base'}); + }); - this.importList_.clearPods(); - var selectedIndex = -1; - for (var i = 0; i < userList.length; ++i) { - this.importList_.addPod(userList[i]); - if (selectedUser == userList[i].id) - selectedIndex = i; - } + this.importList_.clearPods(); + var selectedIndex = -1; + for (var i = 0; i < userList.length; ++i) { + this.importList_.addPod(userList[i]); + if (selectedUser == userList[i].id) + selectedIndex = i; + } - if (userList.length == 1) - this.importList_.selectPod(this.importList_.pods[0]); + if (userList.length == 1) + this.importList_.selectPod(this.importList_.pods[0]); - if (selectedIndex >= 0) - this.importList_.selectPod(this.importList_.pods[selectedIndex]); + if (selectedIndex >= 0) + this.importList_.selectPod(this.importList_.pods[selectedIndex]); - if (this.currentPage_ == 'username') - this.getScreenElement('import-link').hidden = (userList.length == 0); - }, - }; -}); - + if (this.currentPage_ == 'username') + this.getScreenElement('import-link').hidden = + (userList.length == 0); + }, + }; + });
diff --git a/chrome/browser/resources/chromeos/login/screen_tpm_error.js b/chrome/browser/resources/chromeos/login/screen_tpm_error.js index ff5359a..04c6615 100644 --- a/chrome/browser/resources/chromeos/login/screen_tpm_error.js +++ b/chrome/browser/resources/chromeos/login/screen_tpm_error.js
@@ -8,9 +8,7 @@ login.createScreen('TPMErrorMessageScreen', 'tpm-error-message', function() { return { - EXTERNAL_API: [ - 'show' - ], + EXTERNAL_API: ['show'], /** * Buttons in oobe wizard's button strip. @@ -20,9 +18,9 @@ var rebootButton = this.ownerDocument.createElement('button'); rebootButton.id = 'reboot-button'; rebootButton.textContent = - loadTimeData.getString('errorTpmFailureRebootButton'); + loadTimeData.getString('errorTpmFailureRebootButton'); rebootButton.addEventListener('click', function() { - chrome.send('rebootSystem'); + chrome.send('rebootSystem'); }); return [rebootButton]; }, @@ -35,4 +33,3 @@ } }; }); -
diff --git a/chrome/browser/resources/chromeos/login/screen_unrecoverable_cryptohome_error.js b/chrome/browser/resources/chromeos/login/screen_unrecoverable_cryptohome_error.js index a00d536..62ffc3b 100644 --- a/chrome/browser/resources/chromeos/login/screen_unrecoverable_cryptohome_error.js +++ b/chrome/browser/resources/chromeos/login/screen_unrecoverable_cryptohome_error.js
@@ -2,51 +2,49 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -login.createScreen('UnrecoverableCryptohomeErrorScreen', - 'unrecoverable-cryptohome-error', function() { - return { - EXTERNAL_API: [ - 'show', - 'resumeAfterFeedbackUI' - ], +login.createScreen( + 'UnrecoverableCryptohomeErrorScreen', 'unrecoverable-cryptohome-error', + function() { + return { + EXTERNAL_API: ['show', 'resumeAfterFeedbackUI'], - /** @override */ - decorate: function() { - this.card_ = $('unrecoverable-cryptohome-error-card'); - this.throbber_ = $('unrecoverable-cryptohome-error-busy'); + /** @override */ + decorate: function() { + this.card_ = $('unrecoverable-cryptohome-error-card'); + this.throbber_ = $('unrecoverable-cryptohome-error-busy'); - this.card_.addEventListener('done', function(e) { - this.setLoading_(true); - $('oobe').hidden = true; // Hide while showing the feedback UI. - chrome.send('sendFeedbackAndResyncUserData'); - }.bind(this)); - }, + this.card_.addEventListener('done', function(e) { + this.setLoading_(true); + $('oobe').hidden = true; // Hide while showing the feedback UI. + chrome.send('sendFeedbackAndResyncUserData'); + }.bind(this)); + }, - /** - * Sets whether to show the loading throbber. - * @param {boolean} loading - */ - setLoading_: function(loading) { - this.card_.hidden = loading; - this.throbber_.hidden = !loading; - }, + /** + * Sets whether to show the loading throbber. + * @param {boolean} loading + */ + setLoading_: function(loading) { + this.card_.hidden = loading; + this.throbber_.hidden = !loading; + }, - /** - * Show the unrecoverable cryptohome error screen to ask user permission - * to collect a feedback report. - */ - show: function() { - this.setLoading_(false); + /** + * Show the unrecoverable cryptohome error screen to ask user permission + * to collect a feedback report. + */ + show: function() { + this.setLoading_(false); - Oobe.getInstance().headerHidden = true; - Oobe.showScreen({id: SCREEN_UNRECOVERABLE_CRYPTOHOME_ERROR}); - }, + Oobe.getInstance().headerHidden = true; + Oobe.showScreen({id: SCREEN_UNRECOVERABLE_CRYPTOHOME_ERROR}); + }, - /** - * Shows the loading UI after the feedback UI is dismissed. - */ - resumeAfterFeedbackUI: function() { - $('oobe').hidden = false; - } - }; -}); + /** + * Shows the loading UI after the feedback UI is dismissed. + */ + resumeAfterFeedbackUI: function() { + $('oobe').hidden = false; + } + }; + });
diff --git a/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js b/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js index 202c4942..cda4415 100644 --- a/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js +++ b/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js
@@ -18,7 +18,7 @@ /** * Updates state of login header so that necessary buttons are displayed. - **/ + */ onBeforeShow: function(data) { $('login-header-bar').signinUIState = SIGNIN_UI_STATE.WRONG_HWID_WARNING; }, @@ -27,14 +27,11 @@ * Updates localized content of the screen that is not updated via template. */ updateLocalizedContent: function() { - $('wrong-hwid-message-content').innerHTML = - '<p>' + - loadTimeData.getStringF('wrongHWIDMessageFirstPart', - '<strong>', '</strong>') + - '</p><p>' + - loadTimeData.getString('wrongHWIDMessageSecondPart') + + $('wrong-hwid-message-content').innerHTML = '<p>' + + loadTimeData.getStringF( + 'wrongHWIDMessageFirstPart', '<strong>', '</strong>') + + '</p><p>' + loadTimeData.getString('wrongHWIDMessageSecondPart') + '</p>'; } }; }); -
diff --git a/chrome/browser/resources/chromeos/login/throbber_notice.js b/chrome/browser/resources/chromeos/login/throbber_notice.js index 2b56e0b..412ca3d 100644 --- a/chrome/browser/resources/chromeos/login/throbber_notice.js +++ b/chrome/browser/resources/chromeos/login/throbber_notice.js
@@ -5,7 +5,5 @@ Polymer({ is: 'throbber-notice', - properties: { - text: String - } + properties: {text: String} });
diff --git a/chrome/browser/resources/chromeos/mobile_setup.js b/chrome/browser/resources/chromeos/mobile_setup.js index f1b8e25..d9f3d027 100644 --- a/chrome/browser/resources/chromeos/mobile_setup.js +++ b/chrome/browser/resources/chromeos/mobile_setup.js
@@ -5,8 +5,7 @@ cr.define('mobile', function() { - function MobileSetup() { - } + function MobileSetup() {} cr.addSingletonGetter(MobileSetup); @@ -28,12 +27,12 @@ MobileSetup.EXTENSION_PAGE_URL = 'chrome-extension://iadeocfgjdjdmpenejdbfeaocpbikmab'; - MobileSetup.ACTIVATION_PAGE_URL = MobileSetup.EXTENSION_PAGE_URL + - '/activation.html'; - MobileSetup.PORTAL_OFFLINE_PAGE_URL = MobileSetup.EXTENSION_PAGE_URL + - '/portal_offline.html'; - MobileSetup.REDIRECT_POST_PAGE_URL = MobileSetup.EXTENSION_PAGE_URL + - '/redirect.html'; + MobileSetup.ACTIVATION_PAGE_URL = + MobileSetup.EXTENSION_PAGE_URL + '/activation.html'; + MobileSetup.PORTAL_OFFLINE_PAGE_URL = + MobileSetup.EXTENSION_PAGE_URL + '/portal_offline.html'; + MobileSetup.REDIRECT_POST_PAGE_URL = + MobileSetup.EXTENSION_PAGE_URL + '/redirect.html'; MobileSetup.prototype = { // Mobile device information. @@ -64,14 +63,13 @@ self = this; this.frameName_ = frame_name; - cr.ui.dialogs.BaseDialog.OK_LABEL = - loadTimeData.getString('ok_button'); + cr.ui.dialogs.BaseDialog.OK_LABEL = loadTimeData.getString('ok_button'); cr.ui.dialogs.BaseDialog.CANCEL_LABEL = loadTimeData.getString('cancel_button'); this.confirm_ = new cr.ui.dialogs.ConfirmDialog(document.body); window.addEventListener('message', function(e) { - self.onMessageReceived_(e); + self.onMessageReceived_(e); }); $('closeButton').addEventListener('click', function(e) { @@ -161,8 +159,7 @@ $('statusHeader').textContent = loadTimeData.getString('connecting_header'); - $('auxHeader').textContent = - loadTimeData.getString('please_wait'); + $('auxHeader').textContent = loadTimeData.getString('please_wait'); $('paymentForm').classList.add('hidden'); $('finalStatus').classList.add('hidden'); this.setCarrierPage_(MobileSetup.ACTIVATION_PAGE_URL); @@ -179,8 +176,7 @@ $('statusHeader').textContent = loadTimeData.getString('activating_header'); - $('auxHeader').textContent = - loadTimeData.getString('please_wait'); + $('auxHeader').textContent = loadTimeData.getString('please_wait'); $('paymentForm').classList.add('hidden'); $('finalStatus').classList.add('hidden'); this.setCarrierPage_(MobileSetup.ACTIVATION_PAGE_URL); @@ -206,12 +202,11 @@ var statusHeaderText; var carrierPage; if (deviceInfo.activation_type == 'NonCellular') { - statusHeaderText = loadTimeData.getString( - 'portal_unreachable_header'); + statusHeaderText = + loadTimeData.getString('portal_unreachable_header'); carrierPage = MobileSetup.PORTAL_OFFLINE_PAGE_URL; } else if (deviceInfo.activation_type == 'OTA') { - statusHeaderText = - loadTimeData.getString('connecting_header'); + statusHeaderText = loadTimeData.getString('connecting_header'); carrierPage = MobileSetup.ACTIVATION_PAGE_URL; } $('statusHeader').textContent = statusHeaderText; @@ -252,8 +247,7 @@ case MobileSetup.PLAN_ACTIVATION_ERROR: $('statusHeader').textContent = ''; $('auxHeader').textContent = ''; - $('finalHeader').textContent = - loadTimeData.getString('error_header'); + $('finalHeader').textContent = loadTimeData.getString('error_header'); $('finalMessage').textContent = deviceInfo.error; $('systemStatus').classList.add('hidden'); $('canvas').classList.add('hidden'); @@ -292,7 +286,7 @@ }, sendPostFrame_: function(frameUrl) { - var msg = { type: 'postFrame' }; + var msg = {type: 'postFrame'}; $(this.frameName_).contentWindow.postMessage(msg, frameUrl); }, @@ -307,8 +301,8 @@ 'MDN': this.deviceInfo_.MDN } }; - $(this.frameName_).contentWindow.postMessage(msg, - this.deviceInfo_.payment_url); + $(this.frameName_) + .contentWindow.postMessage(msg, this.deviceInfo_.payment_url); } }; @@ -317,34 +311,36 @@ var ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); - var segmentCount = Math.min(12, canvas.width / 1.6); // Number of segments - var rotation = 0.75; // Counterclockwise rotation + var segmentCount = Math.min(12, canvas.width / 1.6); // Number of segments + var rotation = 0.75; // Counterclockwise rotation // Rotate canvas over time ctx.translate(canvas.width / 2, canvas.height / 2); ctx.rotate(Math.PI * 2 / (segmentCount + rotation)); ctx.translate(-canvas.width / 2, -canvas.height / 2); - var gap = canvas.width / 24; // Gap between segments - var oRadius = canvas.width / 2; // Outer radius - var iRadius = oRadius * 0.618; // Inner radius - var oCircumference = Math.PI * 2 * oRadius; // Outer circumference - var iCircumference = Math.PI * 2 * iRadius; // Inner circumference - var oGap = gap / oCircumference; // Gap size as fraction of outer ring - var iGap = gap / iCircumference; // Gap size as fraction of inner ring - var oArc = Math.PI * 2 * (1 / segmentCount - oGap); // Angle of outer arcs - var iArc = Math.PI * 2 * (1 / segmentCount - iGap); // Angle of inner arcs + var gap = canvas.width / 24; // Gap between segments + var oRadius = canvas.width / 2; // Outer radius + var iRadius = oRadius * 0.618; // Inner radius + var oCircumference = Math.PI * 2 * oRadius; // Outer circumference + var iCircumference = Math.PI * 2 * iRadius; // Inner circumference + var oGap = gap / oCircumference; // Gap size as fraction of outer ring + var iGap = gap / iCircumference; // Gap size as fraction of inner ring + var oArc = Math.PI * 2 * (1 / segmentCount - oGap); // Angle of outer arcs + var iArc = Math.PI * 2 * (1 / segmentCount - iGap); // Angle of inner arcs - for (i = 0; i < segmentCount; i++) { // Draw each segment + for (i = 0; i < segmentCount; i++) { // Draw each segment var opacity = Math.pow(1.0 - i / segmentCount, 3.0); - opacity = (0.15 + opacity * 0.8); // Vary from 0.15 to 0.95 - var angle = - Math.PI * 2 * i / segmentCount; + opacity = (0.15 + opacity * 0.8); // Vary from 0.15 to 0.95 + var angle = -Math.PI * 2 * i / segmentCount; ctx.beginPath(); - ctx.arc(canvas.width / 2, canvas.height / 2, oRadius, - angle - oArc / 2, angle + oArc / 2, false); - ctx.arc(canvas.width / 2, canvas.height / 2, iRadius, - angle + iArc / 2, angle - iArc / 2, true); + ctx.arc( + canvas.width / 2, canvas.height / 2, oRadius, angle - oArc / 2, + angle + oArc / 2, false); + ctx.arc( + canvas.width / 2, canvas.height / 2, iRadius, angle + iArc / 2, + angle - iArc / 2, true); ctx.closePath(); ctx.fillStyle = 'rgba(240, 30, 29, ' + opacity + ')'; ctx.fill(); @@ -364,14 +360,12 @@ }; MobileSetup.loadPage = function() { - mobile.MobileSetup.getInstance().initialize('paymentForm', - mobile.MobileSetup.ACTIVATION_PAGE_URL); + mobile.MobileSetup.getInstance().initialize( + 'paymentForm', mobile.MobileSetup.ACTIVATION_PAGE_URL); }; // Export - return { - MobileSetup: MobileSetup - }; + return {MobileSetup: MobileSetup}; }); document.addEventListener('DOMContentLoaded', mobile.MobileSetup.loadPage);
diff --git a/chrome/browser/resources/chromeos/mobile_setup_portal.js b/chrome/browser/resources/chromeos/mobile_setup_portal.js index 53808d1..389dc0f 100644 --- a/chrome/browser/resources/chromeos/mobile_setup_portal.js +++ b/chrome/browser/resources/chromeos/mobile_setup_portal.js
@@ -12,17 +12,9 @@ var INVALID_DEVICE_INFO_PAGE_URL = EXTENSION_BASE_URL + 'invalid_device_info.html'; - var NetworkState = { - UNKNOWN: 0, - PORTAL_REACHABLE: 1, - PORTAL_UNREACHABLE: 2 - }; + var NetworkState = {UNKNOWN: 0, PORTAL_REACHABLE: 1, PORTAL_UNREACHABLE: 2}; - var CarrierPageType = { - NOT_SET: 0, - PORTAL_OFFLINE: 1, - INVALID_DEVICE_INFO: 2 - }; + var CarrierPageType = {NOT_SET: 0, PORTAL_OFFLINE: 1, INVALID_DEVICE_INFO: 2}; function PortalImpl() { // Mobile device information. @@ -76,7 +68,7 @@ this.setCarrierPage_(CarrierPageType.PORTAL_OFFLINE); $('portalFrame').hidden = true; $('systemStatus').hidden = false; - } else { + } else { // If the portal is reachable and device info is valid, set and show // portalFrame; and hide system status displaying 'offline portal' page. this.setPortalFrameIfNeeded_(this.deviceInfo_); @@ -158,34 +150,39 @@ var ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); - var segmentCount = Math.min(12, canvas.width / 1.6); // Number of segments - var rotation = 0.75; // Counterclockwise rotation + var segmentCount = + Math.min(12, canvas.width / 1.6); // Number of segments + var rotation = 0.75; // Counterclockwise rotation // Rotate canvas over time ctx.translate(canvas.width / 2, canvas.height / 2); ctx.rotate(Math.PI * 2 / (segmentCount + rotation)); ctx.translate(-canvas.width / 2, -canvas.height / 2); - var gap = canvas.width / 24; // Gap between segments - var oRadius = canvas.width / 2; // Outer radius - var iRadius = oRadius * 0.618; // Inner radius - var oCircumference = Math.PI * 2 * oRadius; // Outer circumference - var iCircumference = Math.PI * 2 * iRadius; // Inner circumference - var oGap = gap / oCircumference; // Gap size as fraction of outer ring - var iGap = gap / iCircumference; // Gap size as fraction of inner ring - var oArc = Math.PI * 2 * (1 / segmentCount - oGap); // Angle of outer arcs - var iArc = Math.PI * 2 * (1 / segmentCount - iGap); // Angle of inner arcs + var gap = canvas.width / 24; // Gap between segments + var oRadius = canvas.width / 2; // Outer radius + var iRadius = oRadius * 0.618; // Inner radius + var oCircumference = Math.PI * 2 * oRadius; // Outer circumference + var iCircumference = Math.PI * 2 * iRadius; // Inner circumference + var oGap = gap / oCircumference; // Gap size as fraction of outer ring + var iGap = gap / iCircumference; // Gap size as fraction of inner ring + var oArc = + Math.PI * 2 * (1 / segmentCount - oGap); // Angle of outer arcs + var iArc = + Math.PI * 2 * (1 / segmentCount - iGap); // Angle of inner arcs - for (i = 0; i < segmentCount; i++) { // Draw each segment + for (i = 0; i < segmentCount; i++) { // Draw each segment var opacity = Math.pow(1.0 - i / segmentCount, 3.0); - opacity = (0.15 + opacity * 0.8); // Vary from 0.15 to 0.95 - var angle = - Math.PI * 2 * i / segmentCount; + opacity = (0.15 + opacity * 0.8); // Vary from 0.15 to 0.95 + var angle = -Math.PI * 2 * i / segmentCount; ctx.beginPath(); - ctx.arc(canvas.width / 2, canvas.height / 2, oRadius, - angle - oArc / 2, angle + oArc / 2, false); - ctx.arc(canvas.width / 2, canvas.height / 2, iRadius, - angle + iArc / 2, angle - iArc / 2, true); + ctx.arc( + canvas.width / 2, canvas.height / 2, oRadius, angle - oArc / 2, + angle + oArc / 2, false); + ctx.arc( + canvas.width / 2, canvas.height / 2, iRadius, angle + iArc / 2, + angle - iArc / 2, true); ctx.closePath(); ctx.fillStyle = 'rgba(240, 30, 29, ' + opacity + ')'; ctx.fill(); @@ -210,10 +207,8 @@ }; // Export - return { - MobileSetupPortal: MobileSetupPortal - }; + return {MobileSetupPortal: MobileSetupPortal}; }); -document.addEventListener('DOMContentLoaded', - mobile.MobileSetupPortal.loadPage); +document.addEventListener( + 'DOMContentLoaded', mobile.MobileSetupPortal.loadPage);
diff --git a/chrome/browser/resources/chromeos/network_ui/network_ui.js b/chrome/browser/resources/chromeos/network_ui/network_ui.js index aa2510a..80b413fa 100644 --- a/chrome/browser/resources/chromeos/network_ui/network_ui.js +++ b/chrome/browser/resources/chromeos/network_ui/network_ui.js
@@ -27,29 +27,14 @@ // a single state field or an array of state fields. If more than one is // specified then the first non empty value is used. var NETWORK_STATE_FIELDS = [ - 'GUID', - 'service_path', - 'Name', - 'Type', - 'ConnectionState', - 'connectable', - 'ErrorState', - 'WiFi.Security', - ['Cellular.NetworkTechnology', 'EAP.EAP'], - 'Cellular.ActivationState', - 'Cellular.RoamingState', - 'WiFi.Frequency', + 'GUID', 'service_path', 'Name', 'Type', 'ConnectionState', 'connectable', + 'ErrorState', 'WiFi.Security', ['Cellular.NetworkTechnology', 'EAP.EAP'], + 'Cellular.ActivationState', 'Cellular.RoamingState', 'WiFi.Frequency', 'WiFi.SignalStrength' ]; var FAVORITE_STATE_FIELDS = [ - 'GUID', - 'service_path', - 'Name', - 'Type', - 'profile_path', - 'visible', - 'Source' + 'GUID', 'service_path', 'Name', 'Type', 'profile_path', 'visible', 'Source' ]; /** @@ -58,7 +43,7 @@ * @return {!HTMLTableCellElement} A new td element. */ var createTableCellElement = function() { - return /** @type {!HTMLTableCellElement} */(document.createElement('td')); + return /** @type {!HTMLTableCellElement} */ (document.createElement('td')); }; /** @@ -67,7 +52,7 @@ * @return {!HTMLTableRowElement} A new tr element. */ var createTableRowElement = function() { - return /** @type {!HTMLTableRowElement} */(document.createElement('tr')); + return /** @type {!HTMLTableRowElement} */ (document.createElement('tr')); }; /** @@ -83,7 +68,7 @@ * key (any part of it) is not defined. */ var getOncProperty = function(networkState, key) { - var dict = /** @type {!Object} */(networkState); + var dict = /** @type {!Object} */ (networkState); var keys = key.split('.'); while (keys.length > 1) { var k = keys.shift(); @@ -106,7 +91,7 @@ cell.className = 'state-table-expand-button-cell'; var button = document.createElement('button'); button.addEventListener('click', function(event) { - toggleExpandRow(/** @type {!HTMLElement} */(event.target), guid); + toggleExpandRow(/** @type {!HTMLElement} */ (event.target), guid); }); button.className = 'state-table-expand-button'; button.textContent = '+'; @@ -125,7 +110,7 @@ var createStateTableIcon = function(networkState) { var cell = createTableCellElement(); cell.className = 'state-table-icon-cell'; - var icon = /** @type {!CrNetworkIconElement} */( + var icon = /** @type {!CrNetworkIconElement} */ ( document.createElement('cr-network-icon')); icon.isListItem = true; icon.networkState = networkState; @@ -237,7 +222,7 @@ */ var toggleExpandRow = function(btn, guid) { var cell = btn.parentNode; - var row = /** @type {!HTMLTableRowElement} */(cell.parentNode); + var row = /** @type {!HTMLTableRowElement} */ (cell.parentNode); if (btn.textContent == '-') { btn.textContent = '+'; row.parentNode.removeChild(row.nextSibling); @@ -279,13 +264,16 @@ chrome.send('getShillProperties', [guid]); } else if (selectedId == 'state') { chrome.networkingPrivate.getState(guid, function(properties) { - showDetail(properties, chrome.runtime.lastError); }); + showDetail(properties, chrome.runtime.lastError); + }); } else if (selectedId == 'managed') { chrome.networkingPrivate.getManagedProperties(guid, function(properties) { - showDetail(properties, chrome.runtime.lastError); }); + showDetail(properties, chrome.runtime.lastError); + }); } else { chrome.networkingPrivate.getProperties(guid, function(properties) { - showDetail(properties, chrome.runtime.lastError); }); + showDetail(properties, chrome.runtime.lastError); + }); } return expandedRow; }; @@ -322,12 +310,16 @@ */ var requestNetworks = function() { chrome.networkingPrivate.getNetworks( - {'networkType': chrome.networkingPrivate.NetworkType.ALL, - 'visible': true}, + { + 'networkType': chrome.networkingPrivate.NetworkType.ALL, + 'visible': true + }, onVisibleNetworksReceived); chrome.networkingPrivate.getNetworks( - {'networkType': chrome.networkingPrivate.NetworkType.ALL, - 'configured': true}, + { + 'networkType': chrome.networkingPrivate.NetworkType.ALL, + 'configured': true + }, onFavoriteNetworksReceived); }; @@ -369,7 +361,5 @@ chrome.send('addNetwork', [event.detail.customData]); }); - return { - getShillPropertiesResult: getShillPropertiesResult - }; + return {getShillPropertiesResult: getShillPropertiesResult}; })();
diff --git a/chrome/browser/resources/chromeos/power.js b/chrome/browser/resources/chromeos/power.js index 41a6e710..b2493d4 100644 --- a/chrome/browser/resources/chromeos/power.js +++ b/chrome/browser/resources/chromeos/power.js
@@ -45,8 +45,8 @@ } if (size < 2) { - printErrorText(plotCtx, - loadTimeData.getString('notEnoughDataAvailableYet')); + printErrorText( + plotCtx, loadTimeData.getString('notEnoughDataAvailableYet')); return; } @@ -103,10 +103,12 @@ var offset = 1 * devicePixelRatio; drawLine(ctx, x, y, x + width - offset, y, color); drawLine(ctx, x, y, x, y + height - offset, color); - drawLine(ctx, x, y + height - offset, x + width - offset, - y + height - offset, color); - drawLine(ctx, x + width - offset, y, x + width - offset, - y + height - offset, color); + drawLine( + ctx, x, y + height - offset, x + width - offset, y + height - offset, + color); + drawLine( + ctx, x + width - offset, y, x + width - offset, y + height - offset, + color); } function drawLegend() { @@ -135,12 +137,12 @@ continue; } var legendText = getLegend(plots[i].name); - xLoc += legendSquareSide + getTextWidth(legendCtx, legendText) + - 2 * padding; + xLoc += + legendSquareSide + getTextWidth(legendCtx, legendText) + 2 * padding; if (i < plots.length - 1) { var xLocNext = xLoc + - getTextWidth(legendCtx, getLegend(plots[i + 1].name)) + - legendSquareSide; + getTextWidth(legendCtx, getLegend(plots[i + 1].name)) + + legendSquareSide; if (xLocNext >= legendCanvas.width) { xLoc = padding; yLoc = yLoc + 2 * padding + textHeight; @@ -149,8 +151,7 @@ } legendCanvas.height = yLoc + textHeight + padding; - legendCanvas.style.height = - legendCanvas.height / devicePixelRatio + 'px'; + legendCanvas.style.height = legendCanvas.height / devicePixelRatio + 'px'; xLoc = padding; yLoc = padding; @@ -166,8 +167,8 @@ if (i < plots.length - 1) { var xLocNext = xLoc + - getTextWidth(legendCtx, getLegend(plots[i + 1].name)) + - legendSquareSide; + getTextWidth(legendCtx, getLegend(plots[i + 1].name)) + + legendSquareSide; if (xLocNext >= legendCanvas.width) { xLoc = padding; yLoc = yLoc + 2 * padding + textHeight; @@ -188,9 +189,8 @@ var xMinWidth = getTextWidth(plotCtx, xMinStr); var xMaxWidth = getTextWidth(plotCtx, xMaxStr); - var xOrigin = padding + Math.max(yMinWidth, - yMaxWidth, - Math.round(xMinWidth / 2)); + var xOrigin = + padding + Math.max(yMinWidth, yMaxWidth, Math.round(xMinWidth / 2)); var yOrigin = padding + textHeight; var width = plotCanvas.width - xOrigin - Math.floor(xMaxWidth / 2) - padding; if (width < size) { @@ -210,33 +210,28 @@ // Draw the x and y bound values. drawText(plotCtx, yMaxStr, xOrigin - yMaxWidth, yOrigin + textHeight); drawText(plotCtx, yMinStr, xOrigin - yMinWidth, yOrigin + height); - drawText(plotCtx, - xMinStr, - xOrigin - xMinWidth / 2, - yOrigin + height + textHeight); - drawText(plotCtx, - xMaxStr, - xOrigin + width - xMaxWidth / 2, - yOrigin + height + textHeight); + drawText( + plotCtx, xMinStr, xOrigin - xMinWidth / 2, + yOrigin + height + textHeight); + drawText( + plotCtx, xMaxStr, xOrigin + width - xMaxWidth / 2, + yOrigin + height + textHeight); // Draw y-level (horizontal) lines. - drawLine(plotCtx, - xOrigin + 1, yOrigin + height / 4, - xOrigin + width - 2, yOrigin + height / 4, - gridColor); - drawLine(plotCtx, - xOrigin + 1, yOrigin + height / 2, - xOrigin + width - 2, yOrigin + height / 2, gridColor); - drawLine(plotCtx, - xOrigin + 1, yOrigin + 3 * height / 4, - xOrigin + width - 2, yOrigin + 3 * height / 4, - gridColor); + drawLine( + plotCtx, xOrigin + 1, yOrigin + height / 4, xOrigin + width - 2, + yOrigin + height / 4, gridColor); + drawLine( + plotCtx, xOrigin + 1, yOrigin + height / 2, xOrigin + width - 2, + yOrigin + height / 2, gridColor); + drawLine( + plotCtx, xOrigin + 1, yOrigin + 3 * height / 4, xOrigin + width - 2, + yOrigin + 3 * height / 4, gridColor); // Draw half-level value. - drawText(plotCtx, - yHalfStr, - xOrigin - yHalfWidth, - yOrigin + height / 2 + textHeight / 2); + drawText( + plotCtx, yHalfStr, xOrigin - yHalfWidth, + yOrigin + height / 2 + textHeight / 2); // Draw the plots. var yValRange = yMax - yMin; @@ -258,16 +253,16 @@ } var xPos = xOrigin + Math.floor(i / (size - 1) * (width - 1)); var yPos = yOrigin + height - 1 - - Math.round((val - yMin) / yValRange * (height - 1)); + Math.round((val - yMin) / yValRange * (height - 1)); if (beginPath) { plotCtx.moveTo(xPos, yPos); // A simple move to does not print anything. Hence, draw a little // square here to mark a beginning. plotCtx.fillStyle = '#000'; - plotCtx.fillRect(xPos - linePlotEndMarkerWidth, - yPos - linePlotEndMarkerWidth, - linePlotEndMarkerWidth * devicePixelRatio, - linePlotEndMarkerWidth * devicePixelRatio); + plotCtx.fillRect( + xPos - linePlotEndMarkerWidth, yPos - linePlotEndMarkerWidth, + linePlotEndMarkerWidth * devicePixelRatio, + linePlotEndMarkerWidth * devicePixelRatio); beginPath = false; } else { plotCtx.lineTo(xPos, yPos); @@ -275,10 +270,10 @@ // Draw a little square to mark an end to go with the start // markers from above. plotCtx.fillStyle = '#000'; - plotCtx.fillRect(xPos - linePlotEndMarkerWidth, - yPos - linePlotEndMarkerWidth, - linePlotEndMarkerWidth * devicePixelRatio, - linePlotEndMarkerWidth * devicePixelRatio); + plotCtx.fillRect( + xPos - linePlotEndMarkerWidth, yPos - linePlotEndMarkerWidth, + linePlotEndMarkerWidth * devicePixelRatio, + linePlotEndMarkerWidth * devicePixelRatio); } } } @@ -320,10 +315,9 @@ function drawTimeGuide(tDataIndex) { var x = xOrigin + tDataIndex / (size - 1) * (width - 1); drawLine(plotCtx, x, yOrigin, x, yOrigin + height - 1, '#000'); - drawText(plotCtx, - tData[tDataIndex], - x - getTextWidth(plotCtx, tData[tDataIndex]) / 2, - yOrigin - 2); + drawText( + plotCtx, tData[tDataIndex], + x - getTextWidth(plotCtx, tData[tDataIndex]) / 2, yOrigin - 2); for (var count = 0; count < plots.length; count++) { var yData = plots[count].data; @@ -362,8 +356,8 @@ var boundingRect = plotCanvas.getBoundingClientRect(); var x = Math.round((event.clientX - boundingRect.left) * devicePixelRatio); var y = Math.round((event.clientY - boundingRect.top) * devicePixelRatio); - if (x < xOrigin || x >= xOrigin + width || - y < yOrigin || y >= yOrigin + height) { + if (x < xOrigin || x >= xOrigin + width || y < yOrigin || + y >= yOrigin + height) { return; } @@ -385,13 +379,15 @@ plotCanvas.addEventListener('mouseout', onMouseOut); } -var sleepSampleInterval = 30 * 1000; // in milliseconds. +var sleepSampleInterval = 30 * 1000; // in milliseconds. var sleepText = loadTimeData.getString('systemSuspended'); var invalidDataText = loadTimeData.getString('invalidData'); var offlineText = loadTimeData.getString('offlineText'); -var plotColors = ['Red', 'Blue', 'Green', 'Gold', 'CadetBlue', 'LightCoral', - 'LightSlateGray', 'Peru', 'DarkRed', 'LawnGreen', 'Tan']; +var plotColors = [ + 'Red', 'Blue', 'Green', 'Gold', 'CadetBlue', 'LightCoral', 'LightSlateGray', + 'Peru', 'DarkRed', 'LawnGreen', 'Tan' +]; /** * Add canvases for plotting to |plotsDiv|. For every header in |headerArray|, @@ -465,9 +461,9 @@ * 'sleepDuration' field is for the time in milliseconds the system spent * in sleep/suspend state. */ -function addTimeDataSample(plots, tData, absTime, sampleArray, - sampleTime, previousSampleTime, - systemResumedArray) { +function addTimeDataSample( + plots, tData, absTime, sampleArray, sampleTime, previousSampleTime, + systemResumedArray) { for (var i = 0; i < plots.length; i++) { if (plots[i].data.length != tData.length) { throw new Error('Mismatch in time and plot data.'); @@ -537,13 +533,11 @@ function showBatteryChargeData(powerSupplyArray, systemResumedArray) { var chargeTimeData = []; var chargeAbsTime = []; - var chargePlot = [ - { - name: loadTimeData.getString('batteryChargePercentageHeader'), - color: 'Blue', - data: [] - } - ]; + var chargePlot = [{ + name: loadTimeData.getString('batteryChargePercentageHeader'), + color: 'Blue', + data: [] + }]; var dischargeRateTimeData = []; var dischargeRateAbsTime = []; var dischargeRatePlot = [ @@ -563,18 +557,15 @@ data: [] } ]; - var minDischargeRate = 1000; // A high unrealistic number to begin with. - var maxDischargeRate = -1000; // A low unrealistic number to begin with. + var minDischargeRate = 1000; // A high unrealistic number to begin with. + var maxDischargeRate = -1000; // A low unrealistic number to begin with. for (var i = 0; i < powerSupplyArray.length; i++) { var j = Math.max(i - 1, 0); - addTimeDataSample(chargePlot, - chargeTimeData, - chargeAbsTime, - [powerSupplyArray[i].batteryPercent], - powerSupplyArray[i].time, - powerSupplyArray[j].time, - systemResumedArray); + addTimeDataSample( + chargePlot, chargeTimeData, chargeAbsTime, + [powerSupplyArray[i].batteryPercent], powerSupplyArray[i].time, + powerSupplyArray[j].time, systemResumedArray); var dischargeRate = powerSupplyArray[i].batteryDischargeRate; var inputSampleCount = $('sample-count-input').value; @@ -601,13 +592,10 @@ minDischargeRate = Math.min(dischargeRate, minDischargeRate); maxDischargeRate = Math.max(dischargeRate, maxDischargeRate); - addTimeDataSample(dischargeRatePlot, - dischargeRateTimeData, - dischargeRateAbsTime, - [dischargeRate, movingAverage, binnedAverage], - powerSupplyArray[i].time, - powerSupplyArray[j].time, - systemResumedArray); + addTimeDataSample( + dischargeRatePlot, dischargeRateTimeData, dischargeRateAbsTime, + [dischargeRate, movingAverage, binnedAverage], powerSupplyArray[i].time, + powerSupplyArray[j].time, systemResumedArray); } if (minDischargeRate == maxDischargeRate) { // This means that all the samples had the same value. Hence, offset the @@ -619,31 +607,24 @@ plotsDiv = $('battery-charge-plots-div'); canvases = addCanvases( - [loadTimeData.getString('batteryChargePercentageHeader'), - loadTimeData.getString('batteryDischargeRateHeader')], + [ + loadTimeData.getString('batteryChargePercentageHeader'), + loadTimeData.getString('batteryDischargeRateHeader') + ], plotsDiv); - batteryChargeCanvases = canvases[ - loadTimeData.getString('batteryChargePercentageHeader')]; + batteryChargeCanvases = + canvases[loadTimeData.getString('batteryChargePercentageHeader')]; plotLineGraph( - batteryChargeCanvases['plot'], - batteryChargeCanvases['legend'], - chargeTimeData, - chargePlot, - 0.00, - 100.00, - 3); + batteryChargeCanvases['plot'], batteryChargeCanvases['legend'], + chargeTimeData, chargePlot, 0.00, 100.00, 3); - dischargeRateCanvases = canvases[ - loadTimeData.getString('batteryDischargeRateHeader')]; + dischargeRateCanvases = + canvases[loadTimeData.getString('batteryDischargeRateHeader')]; plotLineGraph( - dischargeRateCanvases['plot'], - dischargeRateCanvases['legend'], - dischargeRateTimeData, - dischargeRatePlot, - minDischargeRate, - maxDischargeRate, - 3); + dischargeRateCanvases['plot'], dischargeRateCanvases['legend'], + dischargeRateTimeData, dischargeRatePlot, minDischargeRate, + maxDischargeRate, 3); } /** @@ -671,11 +652,9 @@ * @param {HTMLDivElement} plotsDivId The div element in which the plots should * be added. */ -function showStateOccupancyData(timeInStateData, - systemResumedArray, - i18nHeaderString, - unitString, - plotsDivId) { +function showStateOccupancyData( + timeInStateData, systemResumedArray, i18nHeaderString, unitString, + plotsDivId) { var cpuPlots = []; for (var cpu = 0; cpu < timeInStateData.length; cpu++) { var cpuData = timeInStateData[cpu]; @@ -698,11 +677,8 @@ if (unitString != null) { stateName += ' ' + unitString; } - plots.push({ - name: stateName, - data: [], - color: plotColors[stateCount] - }); + plots.push( + {name: stateName, data: [], color: plotColors[stateCount]}); stateIndexMap.push(state); stateCount += 1; } @@ -712,12 +688,8 @@ // If stateCount is 0, then it means the CPU has been offline // throughout. Just add a single plot for such a case. if (stateCount == 0) { - plots.push({ - name: null, - data: [], - color: null - }); - stateCount = 1; // Some invalid state! + plots.push({name: null, data: [], color: null}); + stateCount = 1; // Some invalid state! } // Pass the samples through the function addTimeDataSample to add 'sleep' @@ -734,13 +706,9 @@ } var k = Math.max(i - 1, 0); - addTimeDataSample(plots, - tData, - absTime, - valArray, - sample.time, - cpuData[k].time, - systemResumedArray); + addTimeDataSample( + plots, tData, absTime, valArray, sample.time, cpuData[k].time, + systemResumedArray); } // Calculate the percentage occupancy of each state. A valid number is @@ -752,7 +720,7 @@ if (typeof stateData[i] === 'number') { if (typeof stateData[i - 1] === 'number') { stateData[i] = (stateData[i] - stateData[i - 1]) / - (absTime[i] - absTime[i - 1]) * 100; + (absTime[i] - absTime[i - 1]) * 100; } else { stateData[i] = invalidDataText; } @@ -777,30 +745,22 @@ canvases = addCanvases(headers, $(plotsDivId)); for (var cpu = 0; cpu < timeInStateData.length; cpu++) { cpuCanvases = canvases[headers[cpu]]; - plotLineGraph(cpuCanvases['plot'], - cpuCanvases['legend'], - cpuPlots[cpu]['tData'], - cpuPlots[cpu]['plots'], - 0, - 100, - 3); + plotLineGraph( + cpuCanvases['plot'], cpuCanvases['legend'], cpuPlots[cpu]['tData'], + cpuPlots[cpu]['plots'], 0, 100, 3); } } function showCpuIdleData(idleStateData, systemResumedArray) { - showStateOccupancyData(idleStateData, - systemResumedArray, - 'idleStateOccupancyPercentageHeader', - null, - 'cpu-idle-plots-div'); + showStateOccupancyData( + idleStateData, systemResumedArray, 'idleStateOccupancyPercentageHeader', + null, 'cpu-idle-plots-div'); } function showCpuFreqData(freqStateData, systemResumedArray) { - showStateOccupancyData(freqStateData, - systemResumedArray, - 'frequencyStateOccupancyPercentageHeader', - 'MHz', - 'cpu-freq-plots-div'); + showStateOccupancyData( + freqStateData, systemResumedArray, + 'frequencyStateOccupancyPercentageHeader', 'MHz', 'cpu-freq-plots-div'); } function requestBatteryChargeData() { @@ -848,8 +808,7 @@ document.addEventListener('DOMContentLoaded', function() { $('battery-charge-section').hidden = true; $('battery-charge-show-button').onclick = showHideCallback( - 'battery-charge-section', - 'battery-charge-show-button', + 'battery-charge-section', 'battery-charge-show-button', requestBatteryChargeData); $('battery-charge-reload-button').onclick = requestBatteryChargeData; $('sample-count-input').onclick = requestBatteryChargeData;
diff --git a/chrome/browser/resources/chromeos/proxy_settings.js b/chrome/browser/resources/chromeos/proxy_settings.js index 45bf609..d8e11a21 100644 --- a/chrome/browser/resources/chromeos/proxy_settings.js +++ b/chrome/browser/resources/chromeos/proxy_settings.js
@@ -48,8 +48,7 @@ disableTextSelectAndDrag(function(e) { var src = e.target; return src instanceof HTMLTextAreaElement || - src instanceof HTMLInputElement && - /text|url/.test(src.type); + src instanceof HTMLInputElement && /text|url/.test(src.type); }); document.addEventListener('DOMContentLoaded', load);
diff --git a/chrome/browser/resources/chromeos/quick_unlock/md_pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/md_pin_keyboard.js index d3740c76..bac665b 100644 --- a/chrome/browser/resources/chromeos/quick_unlock/md_pin_keyboard.js +++ b/chrome/browser/resources/chromeos/quick_unlock/md_pin_keyboard.js
@@ -125,8 +125,7 @@ */ onPasswordElementAttached_: function(inputElement) { this.showPinInput_ = inputElement == this.$.pinInput.inputElement; - inputElement.addEventListener('input', - this.handleInputChanged_.bind(this)); + inputElement.addEventListener('input', this.handleInputChanged_.bind(this)); }, /** @@ -207,7 +206,7 @@ /** Fires a submit event with the current PIN value. */ firePinSubmitEvent_: function() { - this.fire('submit', { pin: this.value }); + this.fire('submit', {pin: this.value}); }, /** @@ -219,7 +218,7 @@ onPinValueChange_: function(value, previous) { if (value != previous) { this.passwordElement.value = this.value; - this.fire('pin-change', { pin: value }); + this.fire('pin-change', {pin: value}); } }, @@ -254,8 +253,8 @@ */ onBackspacePointerDown_: function(event) { this.startAutoBackspaceId_ = setTimeout(function() { - this.repeatBackspaceIntervalId_ = setInterval( - this.onPinClear_.bind(this), REPEAT_BACKSPACE_DELAY_MS); + this.repeatBackspaceIntervalId_ = + setInterval(this.onPinClear_.bind(this), REPEAT_BACKSPACE_DELAY_MS); }.bind(this), INITIAL_BACKSPACE_DELAY_MS); if (!event.target.receivedFocusFromKeyboard)
diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js index d3740c76..bac665b 100644 --- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js +++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -125,8 +125,7 @@ */ onPasswordElementAttached_: function(inputElement) { this.showPinInput_ = inputElement == this.$.pinInput.inputElement; - inputElement.addEventListener('input', - this.handleInputChanged_.bind(this)); + inputElement.addEventListener('input', this.handleInputChanged_.bind(this)); }, /** @@ -207,7 +206,7 @@ /** Fires a submit event with the current PIN value. */ firePinSubmitEvent_: function() { - this.fire('submit', { pin: this.value }); + this.fire('submit', {pin: this.value}); }, /** @@ -219,7 +218,7 @@ onPinValueChange_: function(value, previous) { if (value != previous) { this.passwordElement.value = this.value; - this.fire('pin-change', { pin: value }); + this.fire('pin-change', {pin: value}); } }, @@ -254,8 +253,8 @@ */ onBackspacePointerDown_: function(event) { this.startAutoBackspaceId_ = setTimeout(function() { - this.repeatBackspaceIntervalId_ = setInterval( - this.onPinClear_.bind(this), REPEAT_BACKSPACE_DELAY_MS); + this.repeatBackspaceIntervalId_ = + setInterval(this.onPinClear_.bind(this), REPEAT_BACKSPACE_DELAY_MS); }.bind(this), INITIAL_BACKSPACE_DELAY_MS); if (!event.target.receivedFocusFromKeyboard)
diff --git a/chrome/browser/resources/chromeos/select_to_speak/.eslintrc.js b/chrome/browser/resources/chromeos/select_to_speak/.eslintrc.js index a1eee24..1521554 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/.eslintrc.js +++ b/chrome/browser/resources/chromeos/select_to_speak/.eslintrc.js
@@ -3,10 +3,7 @@ // found in the LICENSE file. module.exports = { - 'env': { - 'browser': true, - 'es6': true - }, + 'env': {'browser': true, 'es6': true}, 'rules': { // Override restrictions for document.getElementById usage since, // chrome://resources/js/util.js is not accessible for select_to_speak.
diff --git a/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js b/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js index a2fcdf6f..cf388e73 100644 --- a/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js +++ b/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js
@@ -20,10 +20,7 @@ var right = Math.max(x1, x2); var top = Math.min(y1, y2); var bottom = Math.max(y1, y2); - return {left: left, - top: top, - width: right - left, - height: bottom - top}; + return {left: left, top: top, width: right - left, height: bottom - top}; } /** @@ -81,8 +78,7 @@ // the center of that box using the automation API. The result of the // hit test is a MOUSE_RELEASED accessibility event. desktop.addEventListener( - EventType.MOUSE_RELEASED, this.onAutomationHitTest_.bind(this), - true); + EventType.MOUSE_RELEASED, this.onAutomationHitTest_.bind(this), true); }.bind(this)); /** @private { ?string } */ @@ -98,7 +94,7 @@ this.speechRate_ = 1.0; /** @const { string } */ - this.color_ = "#f73a98"; + this.color_ = '#f73a98'; this.initPreferences_(); @@ -151,8 +147,7 @@ return false; var rect = rectFromPoints( - this.mouseStart_.x, this.mouseStart_.y, - evt.screenX, evt.screenY); + this.mouseStart_.x, this.mouseStart_.y, evt.screenX, evt.screenY); chrome.accessibilityPrivate.setFocusRing([rect], this.color_); return false; }, @@ -197,19 +192,17 @@ // container. In the future we might include other container-like // roles here. var root = evt.target; - while (root.parent && - root.role != RoleType.WINDOW && - root.role != RoleType.ROOT_WEB_AREA && - root.role != RoleType.DESKTOP && - root.role != RoleType.DIALOG && - root.role != RoleType.ALERT_DIALOG && - root.role != RoleType.TOOLBAR) { + while (root.parent && root.role != RoleType.WINDOW && + root.role != RoleType.ROOT_WEB_AREA && + root.role != RoleType.DESKTOP && root.role != RoleType.DIALOG && + root.role != RoleType.ALERT_DIALOG && + root.role != RoleType.TOOLBAR) { root = root.parent; } var rect = rectFromPoints( - this.mouseStart_.x, this.mouseStart_.y, - this.mouseEnd_.x, this.mouseEnd_.y); + this.mouseStart_.x, this.mouseStart_.y, this.mouseEnd_.x, + this.mouseEnd_.y); var nodes = []; this.findAllMatching_(root, rect, nodes); this.startSpeechQueue_(nodes); @@ -322,19 +315,20 @@ var options = { rate: this.rate_, 'enqueue': true, - onEvent: (function(node, isLast, event) { - if (event.type == 'start') { - chrome.accessibilityPrivate.setFocusRing( - [node.location], this.color_); - } else if (event.type == 'interrupted' || - event.type == 'cancelled') { - chrome.accessibilityPrivate.setFocusRing([]); - } else if (event.type == 'end') { - if (isLast) { - chrome.accessibilityPrivate.setFocusRing([]); - } - } - }).bind(this, node, isLast) + onEvent: + (function(node, isLast, event) { + if (event.type == 'start') { + chrome.accessibilityPrivate.setFocusRing( + [node.location], this.color_); + } else if ( + event.type == 'interrupted' || event.type == 'cancelled') { + chrome.accessibilityPrivate.setFocusRing([]); + } else if (event.type == 'end') { + if (isLast) { + chrome.accessibilityPrivate.setFocusRing([]); + } + } + }).bind(this, node, isLast) }; // Pick the voice name from prefs first, or the one that matches @@ -354,7 +348,8 @@ if (this.voiceNameFromPrefs_ && this.validVoiceNames_.has(this.voiceNameFromPrefs_)) { options['voiceName'] = this.voiceNameFromPrefs_; - } else if (this.voiceNameFromLocale_ && + } else if ( + this.voiceNameFromLocale_ && this.validVoiceNames_.has(this.voiceNameFromLocale_)) { options['voiceName'] = this.voiceNameFromLocale_; } @@ -370,25 +365,27 @@ */ initPreferences_: function() { var updatePrefs = (function() { - chrome.storage.sync.get(['voice', 'rate'], (function(prefs) { - if (prefs['voice']) { - this.voiceNameFromPrefs_ = prefs['voice']; - } - if (prefs['rate']) { - this.rate_ = parseFloat(prefs['rate']); - } else { - chrome.storage.sync.set({'rate': this.rate_}); - } - }).bind(this)); - }).bind(this); + chrome.storage.sync.get( + ['voice', 'rate'], + (function(prefs) { + if (prefs['voice']) { + this.voiceNameFromPrefs_ = prefs['voice']; + } + if (prefs['rate']) { + this.rate_ = parseFloat(prefs['rate']); + } else { + chrome.storage.sync.set({'rate': this.rate_}); + } + }).bind(this)); + }).bind(this); updatePrefs(); chrome.storage.onChanged.addListener(updatePrefs); this.updateDefaultVoice_(); window.speechSynthesis.onvoiceschanged = (function() { - this.updateDefaultVoice_(); - }).bind(this); + this.updateDefaultVoice_(); + }).bind(this); }, /** @@ -398,37 +395,40 @@ var uiLocale = chrome.i18n.getMessage('@@ui_locale'); uiLocale = uiLocale.replace('_', '-').toLowerCase(); - chrome.tts.getVoices((function(voices) { - console.log('updateDefaultVoice_ voices: ' + voices.length); - this.validVoiceNames_ = new Set(); + chrome.tts.getVoices( + (function(voices) { + console.log('updateDefaultVoice_ voices: ' + voices.length); + this.validVoiceNames_ = new Set(); - if (voices.length == 0) - return; + if (voices.length == 0) + return; - voices.forEach((function(voice) { - this.validVoiceNames_.add(voice.voiceName); - }).bind(this)); + voices.forEach((function(voice) { + this.validVoiceNames_.add(voice.voiceName); + }).bind(this)); - voices.sort(function(a, b) { - function score(voice) { - var lang = voice.lang.toLowerCase(); - var s = 0; - if (lang == uiLocale) - s += 2; - if (lang.substr(0, 2) == uiLocale.substr(0, 2)) - s += 1; - return s; - } - return score(b) - score(a); - }); + voices.sort(function(a, b) { + function score(voice) { + var lang = voice.lang.toLowerCase(); + var s = 0; + if (lang == uiLocale) + s += 2; + if (lang.substr(0, 2) == uiLocale.substr(0, 2)) + s += 1; + return s; + } + return score(b) - score(a); + }); - this.voiceNameFromLocale_ = voices[0].voiceName; + this.voiceNameFromLocale_ = voices[0].voiceName; - chrome.storage.sync.get(['voice'], (function(prefs) { - if (!prefs['voice']) { - chrome.storage.sync.set({'voice': voices[0].voiceName}); - } - }).bind(this)); - }).bind(this)); + chrome.storage.sync.get( + ['voice'], + (function(prefs) { + if (!prefs['voice']) { + chrome.storage.sync.set({'voice': voices[0].voiceName}); + } + }).bind(this)); + }).bind(this)); } };
diff --git a/chrome/browser/resources/chromeos/set_time.js b/chrome/browser/resources/chromeos/set_time.js index 9ff4d8b..9201d655 100644 --- a/chrome/browser/resources/chromeos/set_time.js +++ b/chrome/browser/resources/chromeos/set_time.js
@@ -52,8 +52,9 @@ var currentTimezoneId = loadTimeData.getValue('currentTimezoneId'); if (currentTimezoneId) { this.setTimezone_(currentTimezoneId); - $('timezone-select').addEventListener( - 'change', this.onTimezoneChange_.bind(this), false); + $('timezone-select') + .addEventListener( + 'change', this.onTimezoneChange_.bind(this), false); $('timezone').hidden = false; } @@ -62,8 +63,8 @@ $('time').addEventListener('blur', this.onTimeBlur_.bind(this), false); $('date').addEventListener('blur', this.onTimeBlur_.bind(this), false); - $('set-time').addEventListener( - 'submit', this.onSubmit_.bind(this), false); + $('set-time') + .addEventListener('submit', this.onSubmit_.bind(this), false); }, /** @@ -96,8 +97,8 @@ // Start timer to update these inputs every minute. var secondsRemaining = 60 - now.getSeconds(); - this.timeTimeout_ = window.setTimeout(this.updateTime_.bind(this), - secondsRemaining * 1000); + this.timeTimeout_ = window.setTimeout( + this.updateTime_.bind(this), secondsRemaining * 1000); }, /** @@ -158,8 +159,8 @@ // within the window. if (window.innerHeight < document.body.scrollHeight) { // Resize window to fit scrollHeight and the title bar. - var newHeight = document.body.scrollHeight + - window.outerHeight - window.innerHeight; + var newHeight = document.body.scrollHeight + window.outerHeight - + window.innerHeight; window.resizeTo(window.outerWidth, newHeight); } }, @@ -177,8 +178,10 @@ // JSON string is in local time. var localDate = new Date(date); localDate.setMinutes(date.getMinutes() - date.getTimezoneOffset()); - return {date: localDate.toISOString().slice(0, 10), - time: localDate.toISOString().slice(11, 16)}; + return { + date: localDate.toISOString().slice(0, 10), + time: localDate.toISOString().slice(11, 16) + }; }, }; @@ -190,9 +193,7 @@ TimeSetter.getInstance().updateTime_(); }; - return { - TimeSetter: TimeSetter - }; + return {TimeSetter: TimeSetter}; }); document.addEventListener('DOMContentLoaded', function() {
diff --git a/chrome/browser/resources/chromeos/sim_unlock.js b/chrome/browser/resources/chromeos/sim_unlock.js index 29c0fa2..0d20e88 100644 --- a/chrome/browser/resources/chromeos/sim_unlock.js +++ b/chrome/browser/resources/chromeos/sim_unlock.js
@@ -4,15 +4,13 @@ cr.define('mobile', function() { - function SimUnlock() { - } + function SimUnlock() {} cr.addSingletonGetter(SimUnlock); // State of the dialog. SimUnlock.SIM_UNLOCK_LOADING = -1; - SimUnlock.SIM_ABSENT_NOT_LOCKED = 0, - SimUnlock.SIM_NOT_LOCKED_ASK_PIN = 1; + SimUnlock.SIM_ABSENT_NOT_LOCKED = 0, SimUnlock.SIM_NOT_LOCKED_ASK_PIN = 1; SimUnlock.SIM_NOT_LOCKED_CHANGE_PIN = 2; SimUnlock.SIM_LOCKED_PIN = 3; SimUnlock.SIM_LOCKED_NO_PIN_TRIES_LEFT = 4; @@ -39,10 +37,8 @@ initialized_: false, mode_: SimUnlock.SIM_DIALOG_UNLOCK, pukValue_: '', - defaultDialogSize_: { - 'width': window.innerWidth, - 'height': window.innerHeight - }, + defaultDialogSize_: + {'width': window.innerWidth, 'height': window.innerHeight}, state_: SimUnlock.SIM_UNLOCK_LOADING, changeState_: function(simInfo) { @@ -62,8 +58,8 @@ pinMessage = loadTimeData.getStringF('enterPinTriesMessage', tries); $('pin-error-msg').classList.remove('error'); } else if (error == SimUnlock.ERROR_PIN) { - pinMessage = loadTimeData.getStringF( - 'incorrectPinTriesMessage', tries); + pinMessage = + loadTimeData.getStringF('incorrectPinTriesMessage', tries); $('pin-error-msg').classList.add('error'); } $('pin-error-msg').textContent = pinMessage; @@ -77,8 +73,8 @@ pinMessage = loadTimeData.getString('enterPinMessage'); $('pin-error-msg').classList.remove('error'); } else if (error == SimUnlock.ERROR_PIN) { - pinMessage = loadTimeData.getStringF( - 'incorrectPinTriesMessage', tries); + pinMessage = + loadTimeData.getStringF('incorrectPinTriesMessage', tries); $('pin-error-msg').classList.add('error'); } $('pin-error-msg').textContent = pinMessage; @@ -93,8 +89,8 @@ pinMessage = loadTimeData.getString('changePinMessage'); $('choose-pin-msg').classList.remove('error'); } else if (error == SimUnlock.ERROR_PIN) { - pinMessage = loadTimeData.getStringF( - 'incorrectPinTriesMessage', tries); + pinMessage = + loadTimeData.getStringF('incorrectPinTriesMessage', tries); $('choose-pin-msg').classList.add('error'); } $('choose-pin-msg').textContent = pinMessage; @@ -140,8 +136,9 @@ }, updateDialogSize_: function(deltaX, deltaY) { - window.resizeTo(this.defaultDialogSize_.width + deltaX, - this.defaultDialogSize_.height + deltaY); + window.resizeTo( + this.defaultDialogSize_.width + deltaX, + this.defaultDialogSize_.height + deltaY); }, hideAll_: function() { @@ -157,8 +154,8 @@ var changePinMode = this.state_ == SimUnlock.SIM_NOT_LOCKED_CHANGE_PIN; if (newPin.length < SimUnlock.PIN_MIN_LENGTH || newPin2.length < SimUnlock.PIN_MIN_LENGTH || - (changePinMode && - $('old-pin-input').value.length < SimUnlock.PIN_MIN_LENGTH)) { + (changePinMode && + $('old-pin-input').value.length < SimUnlock.PIN_MIN_LENGTH)) { return; } if (newPin != newPin2) { @@ -235,12 +232,11 @@ } }); $('pin-input').addEventListener('keyup', function(event) { - $('enter-pin-confirm').disabled = - $('enter-pin-dismiss').disabled || + $('enter-pin-confirm').disabled = $('enter-pin-dismiss').disabled || this.value.length < SimUnlock.PIN_MIN_LENGTH; }); - $('pin-input').addEventListener('textInput', - SimUnlock.processInput.bind(this)); + $('pin-input') + .addEventListener('textInput', SimUnlock.processInput.bind(this)); $('enter-pin-confirm').addEventListener('click', function(event) { SimUnlock.submitPin(); }); @@ -264,12 +260,11 @@ } }); $('puk-input').addEventListener('keyup', function(event) { - $('enter-puk-confirm').disabled = - $('enter-puk-dismiss').disabled || + $('enter-puk-confirm').disabled = $('enter-puk-dismiss').disabled || this.value.length < SimUnlock.PUK_LENGTH; }); - $('puk-input').addEventListener('textInput', - SimUnlock.processInput.bind(this)); + $('puk-input') + .addEventListener('textInput', SimUnlock.processInput.bind(this)); $('enter-puk-confirm').addEventListener('click', function(event) { SimUnlock.pukEntered($('puk-input').value); }); @@ -286,14 +281,13 @@ } }); $('old-pin-input').addEventListener('keyup', function(event) { - $('choose-pin-confirm').disabled = - $('choose-pin-dismiss').disabled || + $('choose-pin-confirm').disabled = $('choose-pin-dismiss').disabled || this.value.length < SimUnlock.PIN_MIN_LENGTH || $('new-pin-input').value.length < SimUnlock.PIN_MIN_LENGTH || $('retype-new-pin-input').value.length < SimUnlock.PIN_MIN_LENGTH; }); - $('old-pin-input').addEventListener('textInput', - SimUnlock.processInput.bind(this)); + $('old-pin-input') + .addEventListener('textInput', SimUnlock.processInput.bind(this)); $('new-pin-input').addEventListener('keydown', function(event) { if (event.key == 'Enter') { if (this.value.length >= SimUnlock.PIN_MIN_LENGTH) @@ -307,38 +301,36 @@ var oldPinLengthOk = $('old-pin-input').value.length >= SimUnlock.PIN_MIN_LENGTH; var oldPinOk = !changePinMode || oldPinLengthOk; - $('choose-pin-confirm').disabled = - $('choose-pin-dismiss').disabled || + $('choose-pin-confirm').disabled = $('choose-pin-dismiss').disabled || this.value.length < SimUnlock.PIN_MIN_LENGTH || $('retype-new-pin-input').value.length < SimUnlock.PIN_MIN_LENGTH || !oldPinOk; }); - $('new-pin-input').addEventListener('textInput', - SimUnlock.processInput.bind(this)); + $('new-pin-input') + .addEventListener('textInput', SimUnlock.processInput.bind(this)); $('retype-new-pin-input').addEventListener('keyup', function(event) { var changePinMode = SimUnlock.getInstance().state == SimUnlock.SIM_NOT_LOCKED_CHANGE_PIN; var oldPinLengthOk = $('old-pin-input').value.length >= SimUnlock.PIN_MIN_LENGTH; var oldPinOk = !changePinMode || oldPinLengthOk; - $('choose-pin-confirm').disabled = - $('choose-pin-dismiss').disabled || + $('choose-pin-confirm').disabled = $('choose-pin-dismiss').disabled || this.value.length < SimUnlock.PIN_MIN_LENGTH || $('new-pin-input').value.length < SimUnlock.PIN_MIN_LENGTH || !oldPinOk; }); $('retype-new-pin-input').addEventListener('keydown', function(event) { if (event.key == 'Enter') { - SimUnlock.newPinEntered($('new-pin-input').value, - $('retype-new-pin-input').value); + SimUnlock.newPinEntered( + $('new-pin-input').value, $('retype-new-pin-input').value); return; } }); - $('retype-new-pin-input').addEventListener('textInput', - SimUnlock.processInput.bind(this)); + $('retype-new-pin-input') + .addEventListener('textInput', SimUnlock.processInput.bind(this)); $('choose-pin-confirm').addEventListener('click', function(event) { - SimUnlock.newPinEntered($('new-pin-input').value, - $('retype-new-pin-input').value); + SimUnlock.newPinEntered( + $('new-pin-input').value, $('retype-new-pin-input').value); }); $('choose-pin-dismiss').addEventListener('click', function(event) { SimUnlock.cancel(); @@ -420,9 +412,7 @@ }; // Export - return { - SimUnlock: SimUnlock - }; + return {SimUnlock: SimUnlock}; });
diff --git a/chrome/browser/resources/chromeos/slow.js b/chrome/browser/resources/chromeos/slow.js index 14a5e82..509a732f 100644 --- a/chrome/browser/resources/chromeos/slow.js +++ b/chrome/browser/resources/chromeos/slow.js
@@ -3,13 +3,10 @@ // found in the LICENSE file. cr.define('options', function() { - function Slow() { - } + function Slow() {} cr.addSingletonGetter(Slow); - Slow.prototype = { - initialized_: false - }; + Slow.prototype = {initialized_: false}; Slow.initialize = function() { $('slow-disable').addEventListener('click', function(event) { @@ -35,14 +32,12 @@ }; // Export - return { - Slow: Slow - }; + return {Slow: Slow}; }); function load() { options.Slow.initialize(); - chrome.send('loadComplete'); + chrome.send('loadComplete'); } document.addEventListener('DOMContentLoaded', load);
diff --git a/chrome/browser/resources/chromeos/switch_access/automation_manager.js b/chrome/browser/resources/chromeos/switch_access/automation_manager.js index 38e54479..13975dd8 100644 --- a/chrome/browser/resources/chromeos/switch_access/automation_manager.js +++ b/chrome/browser/resources/chromeos/switch_access/automation_manager.js
@@ -57,9 +57,9 @@ * @const */ AutomationManager.Color = { - SCOPE: '#de742f', // dark orange - GROUP: '#ffbb33', // light orange - LEAF: '#78e428' //light green + SCOPE: '#de742f', // dark orange + GROUP: '#ffbb33', // light orange + LEAF: '#78e428' // light green }; AutomationManager.prototype = { @@ -74,8 +74,7 @@ this.printNode_(this.node_); this.desktop_.addEventListener( - chrome.automation.EventType.FOCUS, - this.handleFocusChange_.bind(this), + chrome.automation.EventType.FOCUS, this.handleFocusChange_.bind(this), false); // TODO(elichtenberg): Eventually use a more specific filter than @@ -159,8 +158,8 @@ // tree is deleted. Once fixed, can delete this. Should only need to check // if target is current node. let removedByRWA = - treeChange.target.role === chrome.automation.RoleType.ROOT_WEB_AREA - && !this.node_.role; + treeChange.target.role === chrome.automation.RoleType.ROOT_WEB_AREA && + !this.node_.role; if (!removedByRWA && treeChange.target !== this.node_) return; @@ -300,19 +299,17 @@ let start = opt_start || scope; let leafPred = function(node) { - return (node !== scope && AutomationPredicate.isSubtreeLeaf(node, scope)) - || !AutomationPredicate.isInterestingSubtree(node); + return (node !== scope && + AutomationPredicate.isSubtreeLeaf(node, scope)) || + !AutomationPredicate.isInterestingSubtree(node); }; let visitPred = function(node) { // Avoid visiting the top-level root node (i.e., the desktop node). - return node !== this.desktop_ - && AutomationPredicate.isSubtreeLeaf(node, scope); + return node !== this.desktop_ && + AutomationPredicate.isSubtreeLeaf(node, scope); }.bind(this); - let restrictions = { - leaf: leafPred, - visit: visitPred - }; + let restrictions = {leaf: leafPred, visit: visitPred}; return new AutomationTreeWalker(start, scope, restrictions); }, @@ -334,8 +331,8 @@ else { let numSiblings = node.parent.children.length; console.log( - 'At index ' + node.indexInParent + ', there are ' - + numSiblings + ' siblings'); + 'At index ' + node.indexInParent + ', there are ' + numSiblings + + ' siblings'); } console.log('Has ' + node.children.length + ' children'); } else {
diff --git a/chrome/browser/resources/chromeos/switch_access/automation_predicate.js b/chrome/browser/resources/chromeos/switch_access/automation_predicate.js index 195ebafd..ea76bd2f 100644 --- a/chrome/browser/resources/chromeos/switch_access/automation_predicate.js +++ b/chrome/browser/resources/chromeos/switch_access/automation_predicate.js
@@ -19,8 +19,8 @@ * @return {boolean} */ AutomationPredicate.isSubtreeLeaf = function(node, scope) { - return AutomationPredicate.isInteresting(node) - || AutomationPredicate.isGroup(node, scope); + return AutomationPredicate.isInteresting(node) || + AutomationPredicate.isGroup(node, scope); }; /** @@ -42,8 +42,8 @@ // Work around for client nested in client. No need to have user select both // clients for a window. Once locations for outer client updates correctly, // this won't be needed. - if (node.role === chrome.automation.RoleType.CLIENT - && node.role === scope.role && node !== scope) + if (node.role === chrome.automation.RoleType.CLIENT && + node.role === scope.role && node !== scope) return false; let interestingBranches = 0; @@ -67,8 +67,8 @@ AutomationPredicate.hasSameLocation_ = function(node1, node2) { let l1 = node1.location; let l2 = node2.location; - return l1.left === l2.left && l1.top === l2.top && l1.width === l2.width - && l1.height === l2.height; + return l1.left === l2.left && l1.top === l2.top && l1.width === l2.width && + l1.height === l2.height; }; /** @@ -80,8 +80,8 @@ */ AutomationPredicate.isInterestingSubtree = function(node) { let children = node.children || []; - return AutomationPredicate.isInteresting(node) - || children.some(AutomationPredicate.isInterestingSubtree); + return AutomationPredicate.isInteresting(node) || + children.some(AutomationPredicate.isInterestingSubtree); }; /** @@ -102,21 +102,21 @@ // StateType. // Skip things that are offscreen - if (state[chrome.automation.StateType.OFFSCREEN] - || loc.top < 0 || loc.left < 0) + if (state[chrome.automation.StateType.OFFSCREEN] || loc.top < 0 || + loc.left < 0) return false; // Should just leave these as groups - if (role === chrome.automation.RoleType.WEB_VIEW - || role === chrome.automation.RoleType.ROOT_WEB_AREA) + if (role === chrome.automation.RoleType.WEB_VIEW || + role === chrome.automation.RoleType.ROOT_WEB_AREA) return false; if (parent) { // crbug.com/710559 // Work around for browser tabs - if (role === chrome.automation.RoleType.TAB - && parent.role === chrome.automation.RoleType.TAB_LIST - && root.role === chrome.automation.RoleType.DESKTOP) + if (role === chrome.automation.RoleType.TAB && + parent.role === chrome.automation.RoleType.TAB_LIST && + root.role === chrome.automation.RoleType.DESKTOP) return true; }
diff --git a/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js b/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js index 7231a6b..644f623 100644 --- a/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js +++ b/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js
@@ -29,8 +29,8 @@ */ init_: function() { // Capture keycodes for keys 1 through 4, and 6 through 9. - let keyCodes = ['1', '2', '3', '4', '6', '7', '8', '9'].map( - key => key.charCodeAt(0)); + let keyCodes = + ['1', '2', '3', '4', '6', '7', '8', '9'].map(key => key.charCodeAt(0)); chrome.accessibilityPrivate.setSwitchAccessKeys(keyCodes); document.addEventListener('keyup', this.handleKeyEvent_.bind(this)); },
diff --git a/chrome/browser/resources/chromeos/switch_access/prefs.js b/chrome/browser/resources/chromeos/switch_access/prefs.js index 15ae9dd..6dbfda6 100644 --- a/chrome/browser/resources/chromeos/switch_access/prefs.js +++ b/chrome/browser/resources/chromeos/switch_access/prefs.js
@@ -131,8 +131,5 @@ * * @const */ - DEFAULT_PREFS: { - 'enableAutoScan': false, - 'autoScanTime': 800 - } + DEFAULT_PREFS: {'enableAutoScan': false, 'autoScanTime': 800} };
diff --git a/chrome/browser/resources/chromeos/switch_access/tree_walker.js b/chrome/browser/resources/chromeos/switch_access/tree_walker.js index 0de3f23..0fd0e32 100644 --- a/chrome/browser/resources/chromeos/switch_access/tree_walker.js +++ b/chrome/browser/resources/chromeos/switch_access/tree_walker.js
@@ -145,7 +145,7 @@ return this.getYoungestDescendant_(sibling) || sibling; // No left-sibling. Return parent if it exists; otherwise return undefined. - //return node.parent; + // return node.parent; let parent = node.parent; if (parent) return parent;
diff --git a/chrome/browser/resources/chromeos/user_images_grid.js b/chrome/browser/resources/chromeos/user_images_grid.js index afbd981..3db762d6 100644 --- a/chrome/browser/resources/chromeos/user_images_grid.js +++ b/chrome/browser/resources/chromeos/user_images_grid.js
@@ -9,14 +9,11 @@ /** @const */ var GridSelectionController = cr.ui.GridSelectionController; /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; - /** - * Dimensions for camera capture. - * @const - */ - var CAPTURE_SIZE = { - height: 480, - width: 480 - }; + /** + * Dimensions for camera capture. + * @const + */ + var CAPTURE_SIZE = {height: 480, width: 480}; /** * Path for internal URLs. @@ -63,7 +60,9 @@ if (typeof this.dataItem.decorateFn == 'function') this.dataItem.decorateFn(this); this.setAttribute('role', 'option'); - this.oncontextmenu = function(e) { e.preventDefault(); }; + this.oncontextmenu = function(e) { + e.preventDefault(); + }; } }; @@ -126,8 +125,8 @@ decorate: function() { Grid.prototype.decorate.call(this); this.dataModel = new ArrayDataModel([]); - this.itemConstructor = /** @type {function(new:cr.ui.ListItem, *)} */( - UserImagesGridItem); + this.itemConstructor = + /** @type {function(new:cr.ui.ListItem, *)} */ (UserImagesGridItem); this.selectionModel = new ListSingleSelectionModel(); this.inProgramSelection_ = false; this.addEventListener('dblclick', this.handleDblClick_.bind(this)); @@ -222,8 +221,7 @@ this.stopCamera(); this.cameraStartInProgress_ = true; navigator.webkitGetUserMedia( - {video: true}, - this.handleCameraAvailable_.bind(this, onAvailable), + {video: true}, this.handleCameraAvailable_.bind(this, onAvailable), this.handleCameraAbsent_.bind(this)); }, @@ -429,10 +427,10 @@ this.previewElement_ = value; this.previewImage_ = value.querySelector('img'); this.cameraVideo_ = value.querySelector('video'); - this.cameraVideo_.addEventListener('canplay', - this.handleVideoStarted_.bind(this)); - this.cameraVideo_.addEventListener('timeupdate', - this.handleVideoUpdate_.bind(this)); + this.cameraVideo_.addEventListener( + 'canplay', this.handleVideoStarted_.bind(this)); + this.cameraVideo_.addEventListener( + 'timeupdate', this.handleVideoUpdate_.bind(this)); this.updatePreview_(); // Initialize camera state and check for its presence. this.cameraLive = true; @@ -457,8 +455,8 @@ if (!this.cameraLive) { // Flip current still photo. var e = new Event('photoupdated'); - e.dataURL = this.flipPhoto ? - this.flipFrame_(this.previewImage_) : this.previewImage_.src; + e.dataURL = this.flipPhoto ? this.flipFrame_(this.previewImage_) : + this.previewImage_.src; this.dispatchEvent(e); } }, @@ -472,13 +470,13 @@ takePhoto: function() { if (!this.cameraOnline) return false; - var canvas = /** @type {HTMLCanvasElement} */( - document.createElement('canvas')); + var canvas = + /** @type {HTMLCanvasElement} */ (document.createElement('canvas')); canvas.width = CAPTURE_SIZE.width; canvas.height = CAPTURE_SIZE.height; this.captureFrame_( this.cameraVideo_, - /** @type {CanvasRenderingContext2D} */(canvas.getContext('2d')), + /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')), CAPTURE_SIZE); // Preload image before displaying it. var previewImg = new Image(); @@ -513,8 +511,8 @@ var width = video.videoWidth; var height = video.videoHeight; if (width < destSize.width || height < destSize.height) { - console.error('Video capture size too small: ' + - width + 'x' + height + '!'); + console.error( + 'Video capture size too small: ' + width + 'x' + height + '!'); } var src = {}; if (width / destSize.width > height / destSize.height) { @@ -528,8 +526,9 @@ } src.x = (width - src.width) / 2; src.y = (height - src.height) / 2; - ctx.drawImage(video, src.x, src.y, src.width, src.height, - 0, 0, destSize.width, destSize.height); + ctx.drawImage( + video, src.x, src.y, src.width, src.height, 0, 0, destSize.width, + destSize.height); }, /** @@ -561,8 +560,8 @@ * @return {!Object} Image data inserted into the data model. */ // TODO(ivankr): this function needs some argument list refactoring. - addItem: function(url, opt_title, opt_clickHandler, opt_position, - opt_decorateFn) { + addItem: function( + url, opt_title, opt_clickHandler, opt_position, opt_decorateFn) { var imageInfo = { url: url, title: opt_title, @@ -600,11 +599,8 @@ var wasSelected = this.selectionModel.selectedIndex == imageIndex; this.removeItem(imageInfo); var newInfo = this.addItem( - imageUrl, - opt_title === undefined ? imageInfo.title : opt_title, - imageInfo.clickHandler, - imageIndex, - imageInfo.decorateFn); + imageUrl, opt_title === undefined ? imageInfo.title : opt_title, + imageInfo.clickHandler, imageIndex, imageInfo.decorateFn); // Update image data with the reset of the keys from the old data. for (var k in imageInfo) { if (!(k in newInfo)) @@ -627,8 +623,8 @@ this.dataModel.splice(index, 1); if (wasSelected) { // If item removed was selected, select the item next to it. - this.selectedItem = this.dataModel.item( - Math.min(this.dataModel.length - 1, index)); + this.selectedItem = + this.dataModel.item(Math.min(this.dataModel.length - 1, index)); } this.inProgramSelection_ = false; } @@ -672,7 +668,5 @@ PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING' }; - return { - UserImagesGrid: UserImagesGrid - }; + return {UserImagesGrid: UserImagesGrid}; });
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/constants.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/constants.js index 47e7afa..b7c75fe 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/constants.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/constants.js
@@ -63,13 +63,13 @@ * Wallpaper sources enum. */ WallpaperSourceEnum: { - Online: 'ONLINE', - Daily: 'DAILY', - OEM: 'OEM', - Custom: 'CUSTOM', - ThirdParty: 'THIRDPARTY', - AddNew: 'ADDNEW', - Default: 'DEFAULT' + Online: 'ONLINE', + Daily: 'DAILY', + OEM: 'OEM', + Custom: 'CUSTOM', + ThirdParty: 'THIRDPARTY', + AddNew: 'ADDNEW', + Default: 'DEFAULT' }, /** @@ -90,10 +90,7 @@ /** * Wallpaper directory enum. */ - WallpaperDirNameEnum: { - ORIGINAL: 'original', - THUMBNAIL: 'thumbnail' - }, + WallpaperDirNameEnum: {ORIGINAL: 'original', THUMBNAIL: 'thumbnail'}, /** * The filename prefix for a third party wallpaper.
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js index 058a50b0..ebed5e98 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js
@@ -9,8 +9,7 @@ var surpriseWallpaper = null; -function SurpriseWallpaper() { -} +function SurpriseWallpaper() {} /** * Gets SurpriseWallpaper instance. In case it hasn't been initialized, a new @@ -40,7 +39,8 @@ // wallpaper picker. If any other error occurs, proceed with local copy of // rss. WallpaperUtil.fetchURL(Constants.WallpaperRssURL, 'document', function(xhr) { - WallpaperUtil.saveToLocalStorage(Constants.AccessLocalRssKey, + WallpaperUtil.saveToLocalStorage( + Constants.AccessLocalRssKey, new XMLSerializer().serializeToString(xhr.responseXML)); self.updateSurpriseWallpaper(xhr.responseXML); }, onFailure); @@ -62,16 +62,16 @@ */ SurpriseWallpaper.prototype.fallbackToLocalRss_ = function() { var self = this; - Constants.WallpaperLocalStorage.get(Constants.AccessLocalRssKey, - function(items) { - var rssString = items[Constants.AccessLocalRssKey]; - if (rssString) { - self.updateSurpriseWallpaper(new DOMParser().parseFromString(rssString, - 'text/xml')); - } else { - self.updateSurpriseWallpaper(); - } - }); + Constants.WallpaperLocalStorage.get( + Constants.AccessLocalRssKey, function(items) { + var rssString = items[Constants.AccessLocalRssKey]; + if (rssString) { + self.updateSurpriseWallpaper( + new DOMParser().parseFromString(rssString, 'text/xml')); + } else { + self.updateSurpriseWallpaper(); + } + }); }; /** @@ -85,26 +85,31 @@ var date = new Date(new Date().toDateString()).getTime(); for (var i = 0; i < items.length; i++) { item = items[i]; - var disableDate = new Date(item.getElementsByTagNameNS( - Constants.WallpaperNameSpaceURI, 'disableDate')[0].textContent). - getTime(); - var enableDate = new Date(item.getElementsByTagNameNS( - Constants.WallpaperNameSpaceURI, 'enableDate')[0].textContent). - getTime(); + var disableDate = + new Date(item.getElementsByTagNameNS( + Constants.WallpaperNameSpaceURI, 'disableDate')[0] + .textContent) + .getTime(); + var enableDate = + new Date(item.getElementsByTagNameNS( + Constants.WallpaperNameSpaceURI, 'enableDate')[0] + .textContent) + .getTime(); var regionsString = item.getElementsByTagNameNS( - Constants.WallpaperNameSpaceURI, 'regions')[0].textContent; + Constants.WallpaperNameSpaceURI, 'regions')[0] + .textContent; var regions = regionsString.split(', '); if (enableDate <= date && disableDate > date && regions.indexOf(navigator.language) != -1) { var self = this; - this.setWallpaperFromRssItem_(item, - function() {}, - function(status) { - if (status != 404) - self.retryLater_(); - else - self.updateRandomWallpaper_(); - }); + this.setWallpaperFromRssItem_( + item, function() {}, + function(status) { + if (status != 404) + self.retryLater_(); + else + self.updateRandomWallpaper_(); + }); return; } } @@ -147,34 +152,37 @@ */ SurpriseWallpaper.prototype.setRandomWallpaper_ = function(dateString) { var self = this; - Constants.WallpaperLocalStorage.get(Constants.AccessLocalManifestKey, - function(items) { - var manifest = items[Constants.AccessLocalManifestKey]; - if (manifest && manifest.wallpaper_list) { - var filtered = manifest.wallpaper_list.filter(function(element) { - // Older version manifest do not have available_for_surprise_me field. - // In this case, no wallpaper should be filtered out. - return element.available_for_surprise_me || - element.available_for_surprise_me == undefined; + Constants.WallpaperLocalStorage.get( + Constants.AccessLocalManifestKey, function(items) { + var manifest = items[Constants.AccessLocalManifestKey]; + if (manifest && manifest.wallpaper_list) { + var filtered = manifest.wallpaper_list.filter(function(element) { + // Older version manifest do not have available_for_surprise_me + // field. In this case, no wallpaper should be filtered out. + return element.available_for_surprise_me || + element.available_for_surprise_me == undefined; + }); + var index = Math.floor(Math.random() * filtered.length); + var wallpaper = filtered[index]; + var wallpaperURL = + wallpaper.base_url + Constants.HighResolutionSuffix; + var onSuccess = function() { + WallpaperUtil.saveWallpaperInfo( + wallpaperURL, wallpaper.default_layout, + Constants.WallpaperSourceEnum.Daily, ''); + WallpaperUtil.saveToLocalStorage( + Constants.AccessLastSurpriseWallpaperChangedDate, dateString, + function() { + WallpaperUtil.saveToSyncStorage( + Constants.AccessLastSurpriseWallpaperChangedDate, + dateString); + }); + }; + WallpaperUtil.setOnlineWallpaper( + wallpaperURL, wallpaper.default_layout, onSuccess, + self.retryLater_.bind(self)); + } }); - var index = Math.floor(Math.random() * filtered.length); - var wallpaper = filtered[index]; - var wallpaperURL = wallpaper.base_url + Constants.HighResolutionSuffix; - var onSuccess = function() { - WallpaperUtil.saveWallpaperInfo(wallpaperURL, wallpaper.default_layout, - Constants.WallpaperSourceEnum.Daily, ''); - WallpaperUtil.saveToLocalStorage( - Constants.AccessLastSurpriseWallpaperChangedDate, - dateString, function() { - WallpaperUtil.saveToSyncStorage( - Constants.AccessLastSurpriseWallpaperChangedDate, - dateString); - }); - }; - WallpaperUtil.setOnlineWallpaper(wallpaperURL, wallpaper.default_layout, - onSuccess, self.retryLater_.bind(self)); - } - }); }; /** @@ -185,26 +193,25 @@ * @param {function} onFailure Failure callback. * @private */ -SurpriseWallpaper.prototype.setWallpaperFromRssItem_ = function(item, - onSuccess, - onFailure) { +SurpriseWallpaper.prototype.setWallpaperFromRssItem_ = function( + item, onSuccess, onFailure) { var url = item.querySelector('link').textContent; - var layout = item.getElementsByTagNameNS( - Constants.WallpaperNameSpaceURI, 'layout')[0].textContent; + var layout = + item.getElementsByTagNameNS(Constants.WallpaperNameSpaceURI, 'layout')[0] + .textContent; var self = this; WallpaperUtil.fetchURL(url, 'arraybuffer', function(xhr) { if (xhr.response != null) { - chrome.wallpaperPrivate.setCustomWallpaper(xhr.response, layout, false, - 'surprise_wallpaper', - onSuccess); - WallpaperUtil.saveWallpaperInfo(url, layout, - Constants.WallpaperSourceEnum.Daily, ''); + chrome.wallpaperPrivate.setCustomWallpaper( + xhr.response, layout, false, 'surprise_wallpaper', onSuccess); + WallpaperUtil.saveWallpaperInfo( + url, layout, Constants.WallpaperSourceEnum.Daily, ''); var dateString = new Date().toDateString(); WallpaperUtil.saveToLocalStorage( - Constants.AccessLastSurpriseWallpaperChangedDate, - dateString, function() { + Constants.AccessLastSurpriseWallpaperChangedDate, dateString, + function() { WallpaperUtil.saveToSyncStorage( - Constants.AccessLastSurpriseWallpaperChangedDate, dataString); + Constants.AccessLastSurpriseWallpaperChangedDate, dataString); }); } else { self.updateRandomWallpaper_(); @@ -220,9 +227,9 @@ // Makes last changed date invalid. WallpaperUtil.saveToLocalStorage( Constants.AccessLastSurpriseWallpaperChangedDate, '', function() { - WallpaperUtil.saveToSyncStorage( - Constants.AccessLastSurpriseWallpaperChangedDate, ''); - }); + WallpaperUtil.saveToSyncStorage( + Constants.AccessLastSurpriseWallpaperChangedDate, ''); + }); }; /** @@ -252,21 +259,23 @@ return; } - chrome.app.window.create('main.html', { - frame: 'none', - width: WALLPAPER_PICKER_WIDTH, - height: WALLPAPER_PICKER_HEIGHT, - resizable: false, - alphaEnabled: true - }, function(w) { - wallpaperPickerWindow = w; - chrome.wallpaperPrivate.minimizeInactiveWindows(); - w.onClosed.addListener(function() { - wallpaperPickerWindow = null; - chrome.wallpaperPrivate.restoreMinimizedWindows(); - }); - WallpaperUtil.testSendMessage('wallpaper-window-created'); - }); + chrome.app.window.create( + 'main.html', { + frame: 'none', + width: WALLPAPER_PICKER_WIDTH, + height: WALLPAPER_PICKER_HEIGHT, + resizable: false, + alphaEnabled: true + }, + function(w) { + wallpaperPickerWindow = w; + chrome.wallpaperPrivate.minimizeInactiveWindows(); + w.onClosed.addListener(function() { + wallpaperPickerWindow = null; + chrome.wallpaperPrivate.restoreMinimizedWindows(); + }); + WallpaperUtil.testSendMessage('wallpaper-window-created'); + }); }); chrome.syncFileSystem.onFileStatusChanged.addListener(function(detail) { @@ -284,18 +293,17 @@ // custom wallpaper is set. Constants.WallpaperLocalStorage.get( Constants.AccessLocalWallpaperInfoKey, function(items) { - var localData = items[Constants.AccessLocalWallpaperInfoKey]; - if (localData && - localData.url == detail.fileEntry.name && - localData.source == Constants.WallpaperSourceEnum.Custom) { - WallpaperUtil.setCustomWallpaperFromSyncFS(localData.url, - localData.layout); - } - }); + var localData = items[Constants.AccessLocalWallpaperInfoKey]; + if (localData && localData.url == detail.fileEntry.name && + localData.source == Constants.WallpaperSourceEnum.Custom) { + WallpaperUtil.setCustomWallpaperFromSyncFS( + localData.url, localData.layout); + } + }); // We only need to store the custom wallpaper if it was set by the // built-in wallpaper picker. if (!detail.fileEntry.name.startsWith( - Constants.ThirdPartyWallpaperPrefix)) { + Constants.ThirdPartyWallpaperPrefix)) { WallpaperUtil.storeWallpaperFromSyncFSToLocalFS(detail.fileEntry); } } else if (detail.action == 'deleted') { @@ -344,19 +352,23 @@ wpDocument.querySelector('#wallpaper-grid').classList.remove('small'); Constants.WallpaperSyncStorage.get( Constants.AccessSyncSurpriseMeEnabledKey, function(item) { - var enable = item[Constants.AccessSyncSurpriseMeEnabledKey]; - if (enable) { - wpDocument.querySelector('#checkbox').classList.add('checked'); - if (wpDocument.querySelector('.check')) - wpDocument.querySelector('.check').style.visibility = 'hidden'; - } else { - wpDocument.querySelector('#checkbox').classList.remove('checked'); - if (wpDocument.querySelector('.check')) - wpDocument.querySelector('.check').style.visibility = 'visible'; - } - wpDocument.querySelector('#categories-list').disabled = enable; - wpDocument.querySelector('#wallpaper-grid').disabled = enable; - }); + var enable = item[Constants.AccessSyncSurpriseMeEnabledKey]; + if (enable) { + wpDocument.querySelector('#checkbox') + .classList.add('checked'); + if (wpDocument.querySelector('.check')) + wpDocument.querySelector('.check').style.visibility = + 'hidden'; + } else { + wpDocument.querySelector('#checkbox') + .classList.remove('checked'); + if (wpDocument.querySelector('.check')) + wpDocument.querySelector('.check').style.visibility = + 'visible'; + } + wpDocument.querySelector('#categories-list').disabled = enable; + wpDocument.querySelector('#wallpaper-grid').disabled = enable; + }); } }; @@ -380,68 +392,84 @@ Constants.WallpaperSyncStorage.get( Constants.AccessSyncSurpriseMeEnabledKey, function(enabledItems) { - var syncSurpriseMeEnabled = - enabledItems[Constants.AccessSyncSurpriseMeEnabledKey]; + var syncSurpriseMeEnabled = + enabledItems[Constants.AccessSyncSurpriseMeEnabledKey]; - Constants.WallpaperSyncStorage.get( - Constants.AccessLastSurpriseWallpaperChangedDate, - function(items) { - var syncLastSurpriseMeChangedDate = - items[Constants.AccessLastSurpriseWallpaperChangedDate]; + Constants.WallpaperSyncStorage.get( + Constants.AccessLastSurpriseWallpaperChangedDate, + function(items) { + var syncLastSurpriseMeChangedDate = + items[Constants.AccessLastSurpriseWallpaperChangedDate]; - var today = new Date().toDateString(); - // If SurpriseMe is enabled and surprise wallpaper hasn't been - // changed today, we should not sync the change, instead onAlarm() - // will be triggered to update a surprise me wallpaper. - if (!syncSurpriseMeEnabled || - (syncSurpriseMeEnabled && - syncLastSurpriseMeChangedDate == today)) { - Constants.WallpaperLocalStorage.get( - Constants.AccessLocalWallpaperInfoKey, function(infoItems) { - var localInfo = - infoItems[Constants.AccessLocalWallpaperInfoKey]; - // Normally, the wallpaper info saved in local storage and sync - // storage are the same. If the synced value changed by sync - // service, they may different. In that case, change wallpaper - // to the one saved in sync storage and update the local value. - if (!localInfo || - localInfo.url != syncInfo.url || - localInfo.layout != syncInfo.layout || - localInfo.source != syncInfo.source) { - if (syncInfo.source == Constants.WallpaperSourceEnum.Online) { - // TODO(bshe): Consider schedule an alarm to set online - // wallpaper later when failed. Note that we need to cancel - // the retry if user set another wallpaper before retry - // alarm invoked. - WallpaperUtil.setOnlineWallpaper(syncInfo.url, - syncInfo.layout, function() {}, function() {}); - } else if (syncInfo.source == - Constants.WallpaperSourceEnum.Custom) { - WallpaperUtil.setCustomWallpaperFromSyncFS(syncInfo.url, - syncInfo.layout); - } else if (syncInfo.source == - Constants.WallpaperSourceEnum.Default) { - chrome.wallpaperPrivate.resetWallpaper(); - } + var today = new Date().toDateString(); + // If SurpriseMe is enabled and surprise wallpaper hasn't + // been changed today, we should not sync the change, + // instead onAlarm() will be triggered to update a surprise + // me wallpaper. + if (!syncSurpriseMeEnabled || + (syncSurpriseMeEnabled && + syncLastSurpriseMeChangedDate == today)) { + Constants.WallpaperLocalStorage.get( + Constants.AccessLocalWallpaperInfoKey, + function(infoItems) { + var localInfo = + infoItems[Constants + .AccessLocalWallpaperInfoKey]; + // Normally, the wallpaper info saved in local + // storage and sync storage are the same. If the + // synced value changed by sync service, they may + // different. In that case, change wallpaper to the + // one saved in sync storage and update the local + // value. + if (!localInfo || localInfo.url != syncInfo.url || + localInfo.layout != syncInfo.layout || + localInfo.source != syncInfo.source) { + if (syncInfo.source == + Constants.WallpaperSourceEnum.Online) { + // TODO(bshe): Consider schedule an alarm to set + // online wallpaper later when failed. Note that + // we need to cancel the retry if user set + // another wallpaper before retry alarm invoked. + WallpaperUtil.setOnlineWallpaper( + syncInfo.url, syncInfo.layout, + function() {}, function() {}); + } else if ( + syncInfo.source == + Constants.WallpaperSourceEnum.Custom) { + WallpaperUtil.setCustomWallpaperFromSyncFS( + syncInfo.url, syncInfo.layout); + } else if ( + syncInfo.source == + Constants.WallpaperSourceEnum.Default) { + chrome.wallpaperPrivate.resetWallpaper(); + } - // If the old wallpaper is a third party wallpaper we should - // remove it from the local & sync file system to free space. - if (localInfo && localInfo.url.indexOf( - Constants.ThirdPartyWallpaperPrefix) != -1) { - WallpaperUtil.deleteWallpaperFromLocalFS(localInfo.url); - WallpaperUtil.deleteWallpaperFromSyncFS(localInfo.url); - } + // If the old wallpaper is a third party wallpaper + // we should remove it from the local & sync file + // system to free space. + if (localInfo && + localInfo.url.indexOf( + Constants.ThirdPartyWallpaperPrefix) != + -1) { + WallpaperUtil.deleteWallpaperFromLocalFS( + localInfo.url); + WallpaperUtil.deleteWallpaperFromSyncFS( + localInfo.url); + } - if (syncInfo && syncInfo.hasOwnProperty('appName')) - updateCheckMarkAndAppNameIfAppliable(syncInfo.appName); + if (syncInfo && + syncInfo.hasOwnProperty('appName')) + updateCheckMarkAndAppNameIfAppliable( + syncInfo.appName); - WallpaperUtil.saveToLocalStorage( - Constants.AccessLocalWallpaperInfoKey, syncInfo); - } - }); - } - }); - }); + WallpaperUtil.saveToLocalStorage( + Constants.AccessLocalWallpaperInfoKey, + syncInfo); + } + }); + } + }); + }); } } else { // If sync theme is disabled, use values from chrome.storage.local to @@ -465,9 +493,9 @@ wallpaper, thumbnail, layout, appName) { WallpaperUtil.saveToLocalStorage( Constants.AccessLocalSurpriseMeEnabledKey, false, function() { - WallpaperUtil.saveToSyncStorage(Constants.AccessSyncSurpriseMeEnabledKey, - false); - }); + WallpaperUtil.saveToSyncStorage( + Constants.AccessSyncSurpriseMeEnabledKey, false); + }); SurpriseWallpaper.getInstance().disable(); // Make third party wallpaper syncable through different devices.
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/main.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/main.js index adf044a88..9fc1f6eb 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/main.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/main.js
@@ -4,7 +4,7 @@ /** * Global wallpaperManager reference useful for poking at from the console. -*/ + */ var wallpaperManager; function init() {
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/main_scripts.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/main_scripts.js index dbeb13a..4f57fb6 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/main_scripts.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/main_scripts.js
@@ -5,24 +5,32 @@ // <include src="../../../../../../ui/webui/resources/js/cr.js"> // <include src="../../../../../../ui/webui/resources/js/event_tracker.js"> // <include src="../../../../../../ui/webui/resources/js/load_time_data.js"> -// <include src="../../../../../../ui/webui/resources/js/i18n_template_no_process.js"> +// <include +// src="../../../../../../ui/webui/resources/js/i18n_template_no_process.js"> // <include src="../../../../../../ui/webui/resources/js/util.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui.js"> // <include src="../../../../../../ui/webui/resources/js/cr/event_target.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/touch_handler.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/array_data_model.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/touch_handler.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/array_data_model.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/list_item.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/list_selection_model.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/list_single_selection_model.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/list_selection_controller.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/list_selection_model.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/list_single_selection_model.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/list_selection_controller.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/list.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/grid.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/command.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/position_util.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/position_util.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/menu_item.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/menu.js"> // <include src="../../../../../../ui/webui/resources/js/cr/ui/menu_button.js"> -// <include src="../../../../../../ui/webui/resources/js/cr/ui/context_menu_handler.js"> +// <include +// src="../../../../../../ui/webui/resources/js/cr/ui/context_menu_handler.js"> // <include src="constants.js"> // <include src="util.js"> // <include src="progress_manager.js">
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js index 061a492..76356d8 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
@@ -14,33 +14,33 @@ */ WallpaperUtil.deleteWallpaperFromLocalFS = function(wallpaperFilename) { WallpaperUtil.requestLocalFS(function(fs) { - var originalPath = Constants.WallpaperDirNameEnum.ORIGINAL + '/' + - wallpaperFilename; - var thumbnailPath = Constants.WallpaperDirNameEnum.THUMBNAIL + '/' + - wallpaperFilename; - fs.root.getFile(originalPath, - {create: false}, - function(fe) { - fe.remove(function() {}, null); - }, - // NotFoundError is expected. After we receive a delete - // event from either original wallpaper or wallpaper - // thumbnail, we delete both of them in local FS to achieve - // a faster synchronization. So each file is expected to be - // deleted twice and the second attempt is a noop. - function(e) { - if (e.name != 'NotFoundError') - WallpaperUtil.onFileSystemError(e); - }); - fs.root.getFile(thumbnailPath, - {create: false}, - function(fe) { - fe.remove(function() {}, null); - }, - function(e) { - if (e.name != 'NotFoundError') - WallpaperUtil.onFileSystemError(e); - }); + var originalPath = + Constants.WallpaperDirNameEnum.ORIGINAL + '/' + wallpaperFilename; + var thumbnailPath = + Constants.WallpaperDirNameEnum.THUMBNAIL + '/' + wallpaperFilename; + fs.root.getFile( + originalPath, {create: false}, + function(fe) { + fe.remove(function() {}, null); + }, + // NotFoundError is expected. After we receive a delete + // event from either original wallpaper or wallpaper + // thumbnail, we delete both of them in local FS to achieve + // a faster synchronization. So each file is expected to be + // deleted twice and the second attempt is a noop. + function(e) { + if (e.name != 'NotFoundError') + WallpaperUtil.onFileSystemError(e); + }); + fs.root.getFile( + thumbnailPath, {create: false}, + function(fe) { + fe.remove(function() {}, null); + }, + function(e) { + if (e.name != 'NotFoundError') + WallpaperUtil.onFileSystemError(e); + }); }); }; @@ -69,36 +69,36 @@ * @param {string} wallpaperFilename Name of the file that will be deleted. */ WallpaperUtil.deleteWallpaperFromSyncFS = function(wallpaperFilename) { - var thumbnailFilename = wallpaperFilename + - Constants.CustomWallpaperThumbnailSuffix; + var thumbnailFilename = + wallpaperFilename + Constants.CustomWallpaperThumbnailSuffix; var success = function(fs) { - fs.root.getFile(wallpaperFilename, - {create: false}, - function(fe) { - fe.remove(function() {}, null); - }, - function(e) { - // NotFoundError is expected under the following scenario: - // The user uses a same account on device A and device B. - // The current wallpaper is a third party wallpaper. Then - // the user changes it to a ONLINE wallpaper on device A. - // Sync file system change and local file system change - // will then both be fired on device B, which makes the - // third party wallpaper be deleted twice from the sync - // file system. We should ignore this error. - if (e.name != 'NotFoundError') - WallpaperUtil.onFileSystemError(e); - }); - fs.root.getFile(thumbnailFilename, - {create: false}, - function(fe) { - fe.remove(function() {}, null); - }, - function(e) { - // Same as above. - if (e.name != 'NotFoundError') - WallpaperUtil.onFileSystemError(e); - }); + fs.root.getFile( + wallpaperFilename, {create: false}, + function(fe) { + fe.remove(function() {}, null); + }, + function(e) { + // NotFoundError is expected under the following scenario: + // The user uses a same account on device A and device B. + // The current wallpaper is a third party wallpaper. Then + // the user changes it to a ONLINE wallpaper on device A. + // Sync file system change and local file system change + // will then both be fired on device B, which makes the + // third party wallpaper be deleted twice from the sync + // file system. We should ignore this error. + if (e.name != 'NotFoundError') + WallpaperUtil.onFileSystemError(e); + }); + fs.root.getFile( + thumbnailFilename, {create: false}, + function(fe) { + fe.remove(function() {}, null); + }, + function(e) { + // Same as above. + if (e.name != 'NotFoundError') + WallpaperUtil.onFileSystemError(e); + }); }; WallpaperUtil.requestSyncFS(success); }; @@ -142,11 +142,11 @@ if (WallpaperUtil.webkitFs) { callback(WallpaperUtil.webkitFs); } else { - window.webkitRequestFileSystem(window.PERSISTENT, 1024 * 1024 * 100, - function(fs) { - WallpaperUtil.webkitFs = fs; - callback(fs); - }); + window.webkitRequestFileSystem( + window.PERSISTENT, 1024 * 1024 * 100, function(fs) { + WallpaperUtil.webkitFs = fs; + callback(fs); + }); } }; @@ -180,20 +180,16 @@ * @param {string} wallpaperFilename The filename that going to be writen. * @param {ArrayBuffer} wallpaperData Data for image file. */ -WallpaperUtil.storeWallpaperToSyncFS = function(wallpaperFilename, - wallpaperData) { +WallpaperUtil.storeWallpaperToSyncFS = function( + wallpaperFilename, wallpaperData) { var callback = function(fs) { - fs.root.getFile(wallpaperFilename, - {create: false}, - function() {}, // already exists - function(e) { // not exists, create - fs.root.getFile(wallpaperFilename, {create: true}, - function(fe) { - WallpaperUtil.writeFile( - fe, wallpaperData); - }, - WallpaperUtil.onFileSystemError); - }); + fs.root.getFile( + wallpaperFilename, {create: false}, function() {}, // already exists + function(e) { // not exists, create + fs.root.getFile(wallpaperFilename, {create: true}, function(fe) { + WallpaperUtil.writeFile(fe, wallpaperData); + }, WallpaperUtil.onFileSystemError); + }); }; WallpaperUtil.requestSyncFS(callback); }; @@ -204,28 +200,25 @@ * @param {ArrayBuffer} wallpaperData The wallpaper data. * @param {string} saveDir The path to store wallpaper in local file system. */ -WallpaperUtil.storeWallpaperToLocalFS = function(wallpaperFilename, - wallpaperData, saveDir) { +WallpaperUtil.storeWallpaperToLocalFS = function( + wallpaperFilename, wallpaperData, saveDir) { if (!wallpaperData) { console.error('wallpaperData is null'); return; } var getDirSuccess = function(dirEntry) { - dirEntry.getFile(wallpaperFilename, - {create: false}, - function() {}, // already exists - function(e) { // not exists, create - dirEntry.getFile(wallpaperFilename, {create: true}, - function(fe) { - WallpaperUtil.writeFile(fe, - wallpaperData); - }, - WallpaperUtil.onFileSystemError); - }); + dirEntry.getFile( + wallpaperFilename, {create: false}, function() {}, // already exists + function(e) { // not exists, create + dirEntry.getFile(wallpaperFilename, {create: true}, function(fe) { + WallpaperUtil.writeFile(fe, wallpaperData); + }, WallpaperUtil.onFileSystemError); + }); }; WallpaperUtil.requestLocalFS(function(fs) { - fs.root.getDirectory(saveDir, {create: true}, getDirSuccess, - WallpaperUtil.onFileSystemError); + fs.root.getDirectory( + saveDir, {create: true}, getDirSuccess, + WallpaperUtil.onFileSystemError); }); }; @@ -244,29 +237,29 @@ } if (!wallpaperLayout) wallpaperLayout = 'CENTER_CROPPED'; - fs.root.getFile(wallpaperFilename, {create: false}, function(fileEntry) { - fileEntry.file(function(file) { - var reader = new FileReader(); - reader.onloadend = function() { - chrome.wallpaperPrivate.setCustomWallpaper( - reader.result, - wallpaperLayout, - true, - wallpaperFilename, - function(thumbnailData) { - // TODO(ranj): Ignore 'canceledWallpaper' error. - if (chrome.runtime.lastError) { - console.error(chrome.runtime.lastError.message); - return; - } - if (onSuccess) - onSuccess(); - }); - }; - reader.readAsArrayBuffer(file); - }, WallpaperUtil.onFileSystemError); - }, function(e) {} // fail to read file, expected due to download delay - ); + fs.root.getFile( + wallpaperFilename, {create: false}, + function(fileEntry) { + fileEntry.file(function(file) { + var reader = new FileReader(); + reader.onloadend = function() { + chrome.wallpaperPrivate.setCustomWallpaper( + reader.result, wallpaperLayout, true, wallpaperFilename, + function(thumbnailData) { + // TODO(ranj): Ignore 'canceledWallpaper' error. + if (chrome.runtime.lastError) { + console.error(chrome.runtime.lastError.message); + return; + } + if (onSuccess) + onSuccess(); + }); + }; + reader.readAsArrayBuffer(file); + }, WallpaperUtil.onFileSystemError); + }, + function(e) {} // fail to read file, expected due to download delay + ); }; WallpaperUtil.requestSyncFS(setWallpaperFromSyncCallback); }; @@ -316,20 +309,22 @@ // have to revert DAILY/THIRDPARTY type wallpaper info to ONLINE/CUSTOM type // after record the correct UMA stats. source = (source == Constants.WallpaperSourceEnum.Daily) ? - Constants.WallpaperSourceEnum.Online : source; + Constants.WallpaperSourceEnum.Online : + source; source = (source == Constants.WallpaperSourceEnum.ThirdParty) ? - Constants.WallpaperSourceEnum.Custom : source; + Constants.WallpaperSourceEnum.Custom : + source; var wallpaperInfo = { - url: url, - layout: layout, - source: source, - appName: appName, + url: url, + layout: layout, + source: source, + appName: appName, }; - WallpaperUtil.saveToLocalStorage(Constants.AccessLocalWallpaperInfoKey, - wallpaperInfo, function() { - WallpaperUtil.saveToSyncStorage(Constants.AccessSyncWallpaperInfoKey, - wallpaperInfo); - }); + WallpaperUtil.saveToLocalStorage( + Constants.AccessLocalWallpaperInfoKey, wallpaperInfo, function() { + WallpaperUtil.saveToSyncStorage( + Constants.AccessSyncWallpaperInfoKey, wallpaperInfo); + }); }; /** @@ -385,8 +380,8 @@ self.fetchURL(url, 'arraybuffer', function(xhr) { if (xhr.response != null) { - chrome.wallpaperPrivate.setWallpaper(xhr.response, layout, url, - onSuccess); + chrome.wallpaperPrivate.setWallpaper( + xhr.response, layout, url, onSuccess); } else { onFailure(); }
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_categories_list.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_categories_list.js index fa064a04..746ef42 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_categories_list.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_categories_list.js
@@ -82,7 +82,5 @@ }, }; - return { - WallpaperCategoriesList: WallpaperCategoriesList - }; + return {WallpaperCategoriesList: WallpaperCategoriesList}; });
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_directories.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_directories.js index dfb9158..99eb87b 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_directories.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_directories.js
@@ -58,13 +58,13 @@ return; } var self = this; - window.webkitRequestFileSystem(window.PERSISTENT, WallpaperQuota, - function(fs) { - fs.root.getDirectory(dirName, {create: true}, function(dirEntry) { - self.wallpaperDirs_[dirName] = dirEntry; - success(dirEntry); - }, failure); - }, failure); + window.webkitRequestFileSystem( + window.PERSISTENT, WallpaperQuota, function(fs) { + fs.root.getDirectory(dirName, {create: true}, function(dirEntry) { + self.wallpaperDirs_[dirName] = dirEntry; + success(dirEntry); + }, failure); + }, failure); }, /**
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js index 1907a49..effc6d48 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js
@@ -26,10 +26,8 @@ * @constructor * @extends {cr.ui.GridItem} */ - function WallpaperThumbnailsGridItem(wallpaperInfo, - dataModelId, - thumbnail, - callback) { + function WallpaperThumbnailsGridItem( + wallpaperInfo, dataModelId, thumbnail, callback) { var el = new GridItem(wallpaperInfo); el.__proto__ = WallpaperThumbnailsGridItem.prototype; el.dataModelId_ = dataModelId; @@ -100,68 +98,68 @@ var getThumbnail = function(fileName) { var setURL = function(fileEntry) { imageEl.src = fileEntry.toURL(); - self.callback_(self.dataModelId_, - self.dataItem.wallpaperId, - imageEl); + self.callback_( + self.dataModelId_, self.dataItem.wallpaperId, imageEl); }; var fallback = function() { wallpaperDirectories.getDirectory( Constants.WallpaperDirNameEnum.ORIGINAL, function(dirEntry) { - dirEntry.getFile(fileName, {create: false}, setURL, - errorHandler); - }, errorHandler); + dirEntry.getFile( + fileName, {create: false}, setURL, errorHandler); + }, errorHandler); }; var success = function(dirEntry) { dirEntry.getFile(fileName, {create: false}, setURL, fallback); }; wallpaperDirectories.getDirectory( - Constants.WallpaperDirNameEnum.THUMBNAIL, success, errorHandler); + Constants.WallpaperDirNameEnum.THUMBNAIL, success, + errorHandler); }; getThumbnail(self.dataItem.baseURL); break; case Constants.WallpaperSourceEnum.OEM: case Constants.WallpaperSourceEnum.Online: - chrome.wallpaperPrivate.getThumbnail(this.dataItem.baseURL, - this.dataItem.source, - function(data) { - if (data) { - var blob = new Blob([new Int8Array(data)], - {'type': 'image\/png'}); - imageEl.src = window.URL.createObjectURL(blob); - imageEl.addEventListener('load', function(e) { - self.callback_(self.dataModelId_, - self.dataItem.wallpaperId, - imageEl); - window.URL.revokeObjectURL(this.src); - }); - } else if (self.dataItem.source == - Constants.WallpaperSourceEnum.Online) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', self.dataItem.baseURL + ThumbnailSuffix, true); - xhr.responseType = 'arraybuffer'; - xhr.send(null); - xhr.addEventListener('load', function(e) { - if (xhr.status === 200) { - chrome.wallpaperPrivate.saveThumbnail(self.dataItem.baseURL, - xhr.response); - var blob = new Blob([new Int8Array(xhr.response)], - {'type' : 'image\/png'}); + chrome.wallpaperPrivate.getThumbnail( + this.dataItem.baseURL, this.dataItem.source, function(data) { + if (data) { + var blob = + new Blob([new Int8Array(data)], {'type': 'image\/png'}); imageEl.src = window.URL.createObjectURL(blob); - // TODO(bshe): We currently use empty div to reserve space for - // thumbnail. Use a placeholder like "loading" image may - // better. imageEl.addEventListener('load', function(e) { - self.callback_(self.dataModelId_, - self.dataItem.wallpaperId, - this); + self.callback_( + self.dataModelId_, self.dataItem.wallpaperId, imageEl); window.URL.revokeObjectURL(this.src); }); - } else { - self.callback_(self.dataModelId_); + } else if ( + self.dataItem.source == + Constants.WallpaperSourceEnum.Online) { + var xhr = new XMLHttpRequest(); + xhr.open( + 'GET', self.dataItem.baseURL + ThumbnailSuffix, true); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + xhr.addEventListener('load', function(e) { + if (xhr.status === 200) { + chrome.wallpaperPrivate.saveThumbnail( + self.dataItem.baseURL, xhr.response); + var blob = new Blob( + [new Int8Array(xhr.response)], + {'type': 'image\/png'}); + imageEl.src = window.URL.createObjectURL(blob); + // TODO(bshe): We currently use empty div to reserve space + // for thumbnail. Use a placeholder like "loading" image + // may better. + imageEl.addEventListener('load', function(e) { + self.callback_( + self.dataModelId_, self.dataItem.wallpaperId, this); + window.URL.revokeObjectURL(this.src); + }); + } else { + self.callback_(self.dataModelId_); + } + }); } }); - } - }); break; case Constants.WallpaperSourceEnum.Daily: case Constants.WallpaperSourceEnum.ThirdParty: @@ -322,9 +320,7 @@ * @param {object} opt_thumbnail The thumbnail image that associated with * the opt_wallpaperId. */ - pendingItemComplete: function(dataModelId, - opt_wallpaperId, - opt_thumbnail) { + pendingItemComplete: function(dataModelId, opt_wallpaperId, opt_thumbnail) { if (dataModelId != this.dataModelId_) return; this.pendingItems_--; @@ -352,9 +348,11 @@ this.itemConstructor = function(value) { var dataModelId = self.dataModelId_; self.pendingItems_++; - return WallpaperThumbnailsGridItem(value, dataModelId, + return WallpaperThumbnailsGridItem( + value, dataModelId, (value.wallpaperId == null) ? - null : self.thumbnailList_[value.wallpaperId], + null : + self.thumbnailList_[value.wallpaperId], self.pendingItemComplete.bind(self)); }; this.selectionModel = new ListSingleSelectionModel(); @@ -439,7 +437,5 @@ } }; - return { - WallpaperThumbnailsGrid: WallpaperThumbnailsGrid - }; + return {WallpaperThumbnailsGrid: WallpaperThumbnailsGrid}; });
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js index 0d194f3c..53f078c5 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
@@ -31,1120 +31,1107 @@ // TODO(bshe): Get rid of anonymous namespace. (function() { - /** - * URL of the learn more page for wallpaper picker. - */ - /** @const */ var LearnMoreURL = - 'https://support.google.com/chromebook/?p=wallpaper_fileerror&hl=' + - navigator.language; +/** + * URL of the learn more page for wallpaper picker. + */ +/** @const */ var LearnMoreURL = + 'https://support.google.com/chromebook/?p=wallpaper_fileerror&hl=' + + navigator.language; - /** - * Index of the All category. It is the first category in wallpaper picker. - */ - /** @const */ var AllCategoryIndex = 0; +/** + * Index of the All category. It is the first category in wallpaper picker. + */ +/** @const */ var AllCategoryIndex = 0; - /** - * Index offset of categories parsed from manifest. The All category is added - * before them. So the offset is 1. - */ - /** @const */ var OnlineCategoriesOffset = 1; +/** + * Index offset of categories parsed from manifest. The All category is added + * before them. So the offset is 1. + */ +/** @const */ var OnlineCategoriesOffset = 1; - /** - * Returns a translated string. - * - * Wrapper function to make dealing with translated strings more concise. - * - * @param {string} id The id of the string to return. - * @return {string} The translated string. - */ - function str(id) { - return loadTimeData.getString(id); +/** + * Returns a translated string. + * + * Wrapper function to make dealing with translated strings more concise. + * + * @param {string} id The id of the string to return. + * @return {string} The translated string. + */ +function str(id) { + return loadTimeData.getString(id); +} + +/** + * Returns the base name for |file_path|. + * @param {string} file_path The path of the file. + * @return {string} The base name of the file. + */ +function getBaseName(file_path) { + return file_path.substring(file_path.lastIndexOf('/') + 1); +} + +/** + * Retruns the current selected layout. + * @return {string} The selected layout. + */ +function getSelectedLayout() { + var setWallpaperLayout = $('set-wallpaper-layout'); + return setWallpaperLayout.options[setWallpaperLayout.selectedIndex].value; +} + +/** + * Loads translated strings. + */ +WallpaperManager.initStrings = function(callback) { + chrome.wallpaperPrivate.getStrings(function(strings) { + loadTimeData.data = strings; + if (callback) + callback(); + }); +}; + +/** + * Requests wallpaper manifest file from server. + */ +WallpaperManager.prototype.fetchManifest_ = function() { + var locale = navigator.language; + if (!this.enableOnlineWallpaper_) { + this.postManifestDomInit_(); + return; } - /** - * Returns the base name for |file_path|. - * @param {string} file_path The path of the file. - * @return {string} The base name of the file. - */ - function getBaseName(file_path) { - return file_path.substring(file_path.lastIndexOf('/') + 1); - } + var urls = [ + str('manifestBaseURL') + locale + '.json', + // Fallback url. Use 'en' locale by default. + str('manifestBaseURL') + 'en.json' + ]; - /** - * Retruns the current selected layout. - * @return {string} The selected layout. - */ - function getSelectedLayout() { - var setWallpaperLayout = $('set-wallpaper-layout'); - return setWallpaperLayout.options[setWallpaperLayout.selectedIndex].value; - } - - /** - * Loads translated strings. - */ - WallpaperManager.initStrings = function(callback) { - chrome.wallpaperPrivate.getStrings(function(strings) { - loadTimeData.data = strings; - if (callback) - callback(); - }); - }; - - /** - * Requests wallpaper manifest file from server. - */ - WallpaperManager.prototype.fetchManifest_ = function() { - var locale = navigator.language; - if (!this.enableOnlineWallpaper_) { - this.postManifestDomInit_(); - return; - } - - var urls = [ - str('manifestBaseURL') + locale + '.json', - // Fallback url. Use 'en' locale by default. - str('manifestBaseURL') + 'en.json']; - - var asyncFetchManifestFromUrls = function(urls, func, successCallback, - failureCallback) { - var index = 0; - var loop = { - next: function() { - if (index < urls.length) { - func(loop, urls[index]); - index++; - } else { - failureCallback(); - } - }, - - success: function(response) { - successCallback(response); - }, - - failure: function() { + var asyncFetchManifestFromUrls = function( + urls, func, successCallback, failureCallback) { + var index = 0; + var loop = { + next: function() { + if (index < urls.length) { + func(loop, urls[index]); + index++; + } else { failureCallback(); } - }; - loop.next(); - }; + }, - var fetchManifestAsync = function(loop, url) { - var xhr = new XMLHttpRequest(); - try { - xhr.addEventListener('loadend', function(e) { - if (this.status == 200 && this.responseText != null) { - try { - var manifest = JSON.parse(this.responseText); - loop.success(manifest); - } catch (e) { - loop.failure(); - } - } else { - loop.next(); - } - }); - xhr.open('GET', url, true); - xhr.send(null); - } catch (e) { - loop.failure(); + success: function(response) { + successCallback(response); + }, + + failure: function() { + failureCallback(); } }; + loop.next(); + }; - if (navigator.onLine) { - asyncFetchManifestFromUrls(urls, fetchManifestAsync, - this.onLoadManifestSuccess_.bind(this), - this.onLoadManifestFailed_.bind(this)); - } else { - // If device is offline, fetches manifest from local storage. - // TODO(bshe): Always loading the offline manifest first and replacing - // with the online one when available. - this.onLoadManifestFailed_(); + var fetchManifestAsync = function(loop, url) { + var xhr = new XMLHttpRequest(); + try { + xhr.addEventListener('loadend', function(e) { + if (this.status == 200 && this.responseText != null) { + try { + var manifest = JSON.parse(this.responseText); + loop.success(manifest); + } catch (e) { + loop.failure(); + } + } else { + loop.next(); + } + }); + xhr.open('GET', url, true); + xhr.send(null); + } catch (e) { + loop.failure(); } }; - /** - * Shows error message in a centered dialog. - * @private - * @param {string} errroMessage The string to show in the error dialog. - */ - WallpaperManager.prototype.showError_ = function(errorMessage) { - document.querySelector('.error-message').textContent = errorMessage; - $('error-container').hidden = false; - }; + if (navigator.onLine) { + asyncFetchManifestFromUrls( + urls, fetchManifestAsync, this.onLoadManifestSuccess_.bind(this), + this.onLoadManifestFailed_.bind(this)); + } else { + // If device is offline, fetches manifest from local storage. + // TODO(bshe): Always loading the offline manifest first and replacing + // with the online one when available. + this.onLoadManifestFailed_(); + } +}; - /** - * Sets manifest loaded from server. Called after manifest is successfully - * loaded. - * @param {object} manifest The parsed manifest file. - */ - WallpaperManager.prototype.onLoadManifestSuccess_ = function(manifest) { - this.manifest_ = manifest; - WallpaperUtil.saveToLocalStorage(Constants.AccessLocalManifestKey, - manifest); - this.postManifestDomInit_(); - }; +/** + * Shows error message in a centered dialog. + * @private + * @param {string} errroMessage The string to show in the error dialog. + */ +WallpaperManager.prototype.showError_ = function(errorMessage) { + document.querySelector('.error-message').textContent = errorMessage; + $('error-container').hidden = false; +}; - // Sets manifest to previously saved object if any and shows connection error. - // Called after manifest failed to load. - WallpaperManager.prototype.onLoadManifestFailed_ = function() { - var accessManifestKey = Constants.AccessLocalManifestKey; - var self = this; - Constants.WallpaperLocalStorage.get(accessManifestKey, function(items) { - self.manifest_ = items[accessManifestKey] ? - items[accessManifestKey] : null; - self.showError_(str('connectionFailed')); - self.postManifestDomInit_(); - $('wallpaper-grid').classList.add('image-picker-offline'); - }); - }; +/** + * Sets manifest loaded from server. Called after manifest is successfully + * loaded. + * @param {object} manifest The parsed manifest file. + */ +WallpaperManager.prototype.onLoadManifestSuccess_ = function(manifest) { + this.manifest_ = manifest; + WallpaperUtil.saveToLocalStorage(Constants.AccessLocalManifestKey, manifest); + this.postManifestDomInit_(); +}; - /** - * Toggle surprise me feature of wallpaper picker. It fires an storage - * onChanged event. Event handler for that event is in event_page.js. - * @private - */ - WallpaperManager.prototype.toggleSurpriseMe_ = function() { - var self = this; - var checkbox = $('surprise-me').querySelector('#checkbox'); - var shouldEnable = !checkbox.classList.contains('checked'); - var onSuccess = function() { - if (chrome.runtime.lastError == null) { - if (shouldEnable) { - self.document_.body.removeAttribute('surprise-me-disabled'); - checkbox.classList.add('checked'); - // Hides the wallpaper set by message if there is any. - $('wallpaper-set-by-message').textContent = ''; - } else { - // Unchecking the "Surprise me" checkbox falls back to the previous - // wallpaper before "Surprise me" was turned on. - if (self.wallpaperGrid_.activeItem) { - self.setSelectedWallpaper_(self.wallpaperGrid_.activeItem); - self.onWallpaperChanged_(self.wallpaperGrid_.activeItem, - self.currentWallpaper_); - } - checkbox.classList.remove('checked'); - self.document_.body.setAttribute('surprise-me-disabled', ''); - } - $('categories-list').disabled = shouldEnable; - $('wallpaper-grid').disabled = shouldEnable; - } else { - // TODO(bshe): show error message to user. - console.error('Failed to save surprise me option to chrome storage.'); - } - }; +// Sets manifest to previously saved object if any and shows connection error. +// Called after manifest failed to load. +WallpaperManager.prototype.onLoadManifestFailed_ = function() { + var accessManifestKey = Constants.AccessLocalManifestKey; + var self = this; + Constants.WallpaperLocalStorage.get(accessManifestKey, function(items) { + self.manifest_ = items[accessManifestKey] ? items[accessManifestKey] : null; + self.showError_(str('connectionFailed')); + self.postManifestDomInit_(); + $('wallpaper-grid').classList.add('image-picker-offline'); + }); +}; - // To prevent the onChanged event being fired twice, we only save the value - // to sync storage if the sync theme is enabled, otherwise save it to local - // storage. - WallpaperUtil.enabledSyncThemesCallback(function(syncEnabled) { - if (syncEnabled) - WallpaperUtil.saveToSyncStorage( - Constants.AccessSyncSurpriseMeEnabledKey, shouldEnable, onSuccess); - else - WallpaperUtil.saveToLocalStorage( - Constants.AccessLocalSurpriseMeEnabledKey, shouldEnable, onSuccess); - }); - }; - - /** - * One-time initialization of various DOM nodes. Fetching manifest may take a - * long time due to slow connection. Dom nodes that do not depend on manifest - * should be initialized here to unblock from manifest fetching. - */ - WallpaperManager.prototype.preManifestDomInit_ = function() { - $('window-close-button').addEventListener('click', function() { - window.close(); - }); - this.document_.defaultView.addEventListener( - 'resize', this.onResize_.bind(this)); - this.document_.defaultView.addEventListener( - 'keydown', this.onKeyDown_.bind(this)); - $('learn-more').href = LearnMoreURL; - $('close-error').addEventListener('click', function() { - $('error-container').hidden = true; - }); - $('close-wallpaper-selection').addEventListener('click', function() { - $('wallpaper-selection-container').hidden = true; - $('set-wallpaper-layout').disabled = true; - }); - }; - - /** - * One-time initialization of various DOM nodes. Dom nodes that do depend on - * manifest should be initialized here. - */ - WallpaperManager.prototype.postManifestDomInit_ = function() { - i18nTemplate.process(this.document_, loadTimeData); - this.initCategoriesList_(); - this.initThumbnailsGrid_(); - this.presetCategory_(); - - $('file-selector').addEventListener( - 'change', this.onFileSelectorChanged_.bind(this)); - $('set-wallpaper-layout').addEventListener( - 'change', this.onWallpaperLayoutChanged_.bind(this)); - - // Always prefer the value from local filesystem to avoid the time window - // of setting the third party app name and the third party wallpaper. - var getThirdPartyAppName = function(callback) { - Constants.WallpaperLocalStorage.get( - Constants.AccessLocalWallpaperInfoKey, function(items) { - var localInfo = items[Constants.AccessLocalWallpaperInfoKey]; - if (localInfo && localInfo.hasOwnProperty('appName')) - callback(localInfo.appName); - else if (loadTimeData.valueExists('wallpaperAppName')) - callback(str('wallpaperAppName')); - else - callback(''); - }); - }; - - getThirdPartyAppName(function(appName) { - if (!!appName) { - $('wallpaper-set-by-message').textContent = loadTimeData.getStringF( - 'currentWallpaperSetByMessage', appName); - $('wallpaper-grid').classList.add('small'); - } else { - $('wallpaper-grid').classList.remove('small'); - } - }); - - if (this.enableOnlineWallpaper_) { - var self = this; - self.document_.body.setAttribute('surprise-me-disabled', ''); - $('surprise-me').hidden = false; - $('surprise-me').addEventListener('click', - this.toggleSurpriseMe_.bind(this)); - var onSurpriseMeEnabled = function() { - $('surprise-me').querySelector('#checkbox').classList.add('checked'); - $('categories-list').disabled = true; - $('wallpaper-grid').disabled = true; +/** + * Toggle surprise me feature of wallpaper picker. It fires an storage + * onChanged event. Event handler for that event is in event_page.js. + * @private + */ +WallpaperManager.prototype.toggleSurpriseMe_ = function() { + var self = this; + var checkbox = $('surprise-me').querySelector('#checkbox'); + var shouldEnable = !checkbox.classList.contains('checked'); + var onSuccess = function() { + if (chrome.runtime.lastError == null) { + if (shouldEnable) { self.document_.body.removeAttribute('surprise-me-disabled'); - }; - - WallpaperUtil.enabledSyncThemesCallback(function(syncEnabled) { - // Surprise me has been moved from local to sync storage, prefer - // values from sync, but if unset check local and update synced pref - // if applicable. - if (syncEnabled) { - Constants.WallpaperSyncStorage.get( - Constants.AccessSyncSurpriseMeEnabledKey, function(items) { - if (items.hasOwnProperty( - Constants.AccessSyncSurpriseMeEnabledKey)) { - if (items[Constants.AccessSyncSurpriseMeEnabledKey]) { - onSurpriseMeEnabled(); - } - } else { - Constants.WallpaperLocalStorage.get( - Constants.AccessLocalSurpriseMeEnabledKey, function(items) { - if (items.hasOwnProperty( - Constants.AccessLocalSurpriseMeEnabledKey)) { - WallpaperUtil.saveToSyncStorage( - Constants.AccessSyncSurpriseMeEnabledKey, - items[Constants.AccessLocalSurpriseMeEnabledKey]); - if (items[Constants.AccessLocalSurpriseMeEnabledKey]) { - onSurpriseMeEnabled(); - } - } - }); - } - }); - } else { - Constants.WallpaperLocalStorage.get( - Constants.AccessLocalSurpriseMeEnabledKey, function(items) { - if (items.hasOwnProperty( - Constants.AccessLocalSurpriseMeEnabledKey)) { - if (items[Constants.AccessLocalSurpriseMeEnabledKey]) { - onSurpriseMeEnabled(); - } - } - }); - } - }); - - window.addEventListener('offline', function() { - chrome.wallpaperPrivate.getOfflineWallpaperList(function(lists) { - if (!self.downloadedListMap_) - self.downloadedListMap_ = {}; - for (var i = 0; i < lists.length; i++) { - self.downloadedListMap_[lists[i]] = true; - } - var thumbnails = self.document_.querySelectorAll('.thumbnail'); - for (var i = 0; i < thumbnails.length; i++) { - var thumbnail = thumbnails[i]; - var url = self.wallpaperGrid_.dataModel.item(i).baseURL; - var fileName = getBaseName(url) + Constants.HighResolutionSuffix; - if (self.downloadedListMap_ && - self.downloadedListMap_.hasOwnProperty(encodeURI(fileName))) { - thumbnail.offline = true; - } - } - }); - $('wallpaper-grid').classList.add('image-picker-offline'); - }); - window.addEventListener('online', function() { - self.downloadedListMap_ = null; - $('wallpaper-grid').classList.remove('image-picker-offline'); - }); - } - - this.onResize_(); - this.initContextMenuAndCommand_(); - WallpaperUtil.testSendMessage('launched'); - }; - - /** - * One-time initialization of context menu and command. - */ - WallpaperManager.prototype.initContextMenuAndCommand_ = function() { - this.wallpaperContextMenu_ = $('wallpaper-context-menu'); - cr.ui.Menu.decorate(this.wallpaperContextMenu_); - cr.ui.contextMenuHandler.setContextMenu(this.wallpaperGrid_, - this.wallpaperContextMenu_); - var commands = this.dialogDom_.querySelectorAll('command'); - for (var i = 0; i < commands.length; i++) - cr.ui.Command.decorate(commands[i]); - - var doc = this.document_; - doc.addEventListener('command', this.onCommand_.bind(this)); - doc.addEventListener('canExecute', this.onCommandCanExecute_.bind(this)); - }; - - /** - * Handles a command being executed. - * @param {Event} event A command event. - */ - WallpaperManager.prototype.onCommand_ = function(event) { - if (event.command.id == 'delete') { - var wallpaperGrid = this.wallpaperGrid_; - var selectedIndex = wallpaperGrid.selectionModel.selectedIndex; - var item = wallpaperGrid.dataModel.item(selectedIndex); - if (!item || item.source != Constants.WallpaperSourceEnum.Custom) - return; - this.removeCustomWallpaper(item.baseURL); - wallpaperGrid.dataModel.splice(selectedIndex, 1); - // Calculate the number of remaining custom wallpapers. The add new button - // in data model needs to be excluded. - var customWallpaperCount = wallpaperGrid.dataModel.length - 1; - if (customWallpaperCount == 0) { - // Active custom wallpaper is also copied in chronos data dir. It needs - // to be deleted. - chrome.wallpaperPrivate.resetWallpaper(); - this.onWallpaperChanged_(null, null); + checkbox.classList.add('checked'); + // Hides the wallpaper set by message if there is any. + $('wallpaper-set-by-message').textContent = ''; } else { - selectedIndex = Math.min(selectedIndex, customWallpaperCount - 1); - wallpaperGrid.selectionModel.selectedIndex = selectedIndex; - } - event.cancelBubble = true; - } - }; - - /** - * Decides if a command can be executed on current target. - * @param {Event} event A command event. - */ - WallpaperManager.prototype.onCommandCanExecute_ = function(event) { - switch (event.command.id) { - case 'delete': - var wallpaperGrid = this.wallpaperGrid_; - var selectedIndex = wallpaperGrid.selectionModel.selectedIndex; - var item = wallpaperGrid.dataModel.item(selectedIndex); - if (selectedIndex != this.wallpaperGrid_.dataModel.length - 1 && - item && item.source == Constants.WallpaperSourceEnum.Custom) { - event.canExecute = true; - break; + // Unchecking the "Surprise me" checkbox falls back to the previous + // wallpaper before "Surprise me" was turned on. + if (self.wallpaperGrid_.activeItem) { + self.setSelectedWallpaper_(self.wallpaperGrid_.activeItem); + self.onWallpaperChanged_( + self.wallpaperGrid_.activeItem, self.currentWallpaper_); } - default: - event.canExecute = false; - } - }; - - /** - * Preset to the category which contains current wallpaper. - */ - WallpaperManager.prototype.presetCategory_ = function() { - this.currentWallpaper_ = str('currentWallpaper'); - // The currentWallpaper_ is either a url contains HightResolutionSuffix or a - // custom wallpaper file name converted from an integer value represent - // time (e.g., 13006377367586070). - if (!this.enableOnlineWallpaper_ || (this.currentWallpaper_ && - this.currentWallpaper_.indexOf(Constants.HighResolutionSuffix) == -1)) { - // Custom is the last one in the categories list. - this.categoriesList_.selectionModel.selectedIndex = - this.categoriesList_.dataModel.length - 1; - return; - } - var self = this; - var presetCategoryInner = function() { - // Selects the first category in the categories list of current - // wallpaper as the default selected category when showing wallpaper - // picker UI. - var presetCategory = AllCategoryIndex; - if (self.currentWallpaper_) { - for (var key in self.manifest_.wallpaper_list) { - var url = self.manifest_.wallpaper_list[key].base_url + - Constants.HighResolutionSuffix; - if (url.indexOf(self.currentWallpaper_) != -1 && - self.manifest_.wallpaper_list[key].categories.length > 0) { - presetCategory = self.manifest_.wallpaper_list[key].categories[0] + - OnlineCategoriesOffset; - break; - } - } + checkbox.classList.remove('checked'); + self.document_.body.setAttribute('surprise-me-disabled', ''); } - self.categoriesList_.selectionModel.selectedIndex = presetCategory; - }; - if (navigator.onLine) { - presetCategoryInner(); + $('categories-list').disabled = shouldEnable; + $('wallpaper-grid').disabled = shouldEnable; } else { - // If device is offline, gets the available offline wallpaper list first. - // Wallpapers which are not in the list will display a grayscaled - // thumbnail. + // TODO(bshe): show error message to user. + console.error('Failed to save surprise me option to chrome storage.'); + } + }; + + // To prevent the onChanged event being fired twice, we only save the value + // to sync storage if the sync theme is enabled, otherwise save it to local + // storage. + WallpaperUtil.enabledSyncThemesCallback(function(syncEnabled) { + if (syncEnabled) + WallpaperUtil.saveToSyncStorage( + Constants.AccessSyncSurpriseMeEnabledKey, shouldEnable, onSuccess); + else + WallpaperUtil.saveToLocalStorage( + Constants.AccessLocalSurpriseMeEnabledKey, shouldEnable, onSuccess); + }); +}; + +/** + * One-time initialization of various DOM nodes. Fetching manifest may take a + * long time due to slow connection. Dom nodes that do not depend on manifest + * should be initialized here to unblock from manifest fetching. + */ +WallpaperManager.prototype.preManifestDomInit_ = function() { + $('window-close-button').addEventListener('click', function() { + window.close(); + }); + this.document_.defaultView.addEventListener( + 'resize', this.onResize_.bind(this)); + this.document_.defaultView.addEventListener( + 'keydown', this.onKeyDown_.bind(this)); + $('learn-more').href = LearnMoreURL; + $('close-error').addEventListener('click', function() { + $('error-container').hidden = true; + }); + $('close-wallpaper-selection').addEventListener('click', function() { + $('wallpaper-selection-container').hidden = true; + $('set-wallpaper-layout').disabled = true; + }); +}; + +/** + * One-time initialization of various DOM nodes. Dom nodes that do depend on + * manifest should be initialized here. + */ +WallpaperManager.prototype.postManifestDomInit_ = function() { + i18nTemplate.process(this.document_, loadTimeData); + this.initCategoriesList_(); + this.initThumbnailsGrid_(); + this.presetCategory_(); + + $('file-selector') + .addEventListener('change', this.onFileSelectorChanged_.bind(this)); + $('set-wallpaper-layout') + .addEventListener('change', this.onWallpaperLayoutChanged_.bind(this)); + + // Always prefer the value from local filesystem to avoid the time window + // of setting the third party app name and the third party wallpaper. + var getThirdPartyAppName = function(callback) { + Constants.WallpaperLocalStorage.get( + Constants.AccessLocalWallpaperInfoKey, function(items) { + var localInfo = items[Constants.AccessLocalWallpaperInfoKey]; + if (localInfo && localInfo.hasOwnProperty('appName')) + callback(localInfo.appName); + else if (loadTimeData.valueExists('wallpaperAppName')) + callback(str('wallpaperAppName')); + else + callback(''); + }); + }; + + getThirdPartyAppName(function(appName) { + if (!!appName) { + $('wallpaper-set-by-message').textContent = + loadTimeData.getStringF('currentWallpaperSetByMessage', appName); + $('wallpaper-grid').classList.add('small'); + } else { + $('wallpaper-grid').classList.remove('small'); + } + }); + + if (this.enableOnlineWallpaper_) { + var self = this; + self.document_.body.setAttribute('surprise-me-disabled', ''); + $('surprise-me').hidden = false; + $('surprise-me') + .addEventListener('click', this.toggleSurpriseMe_.bind(this)); + var onSurpriseMeEnabled = function() { + $('surprise-me').querySelector('#checkbox').classList.add('checked'); + $('categories-list').disabled = true; + $('wallpaper-grid').disabled = true; + self.document_.body.removeAttribute('surprise-me-disabled'); + }; + + WallpaperUtil.enabledSyncThemesCallback(function(syncEnabled) { + // Surprise me has been moved from local to sync storage, prefer + // values from sync, but if unset check local and update synced pref + // if applicable. + if (syncEnabled) { + Constants.WallpaperSyncStorage.get( + Constants.AccessSyncSurpriseMeEnabledKey, function(items) { + if (items.hasOwnProperty( + Constants.AccessSyncSurpriseMeEnabledKey)) { + if (items[Constants.AccessSyncSurpriseMeEnabledKey]) { + onSurpriseMeEnabled(); + } + } else { + Constants.WallpaperLocalStorage.get( + Constants.AccessLocalSurpriseMeEnabledKey, function(items) { + if (items.hasOwnProperty( + Constants.AccessLocalSurpriseMeEnabledKey)) { + WallpaperUtil.saveToSyncStorage( + Constants.AccessSyncSurpriseMeEnabledKey, + items[Constants.AccessLocalSurpriseMeEnabledKey]); + if (items[Constants.AccessLocalSurpriseMeEnabledKey]) { + onSurpriseMeEnabled(); + } + } + }); + } + }); + } else { + Constants.WallpaperLocalStorage.get( + Constants.AccessLocalSurpriseMeEnabledKey, function(items) { + if (items.hasOwnProperty( + Constants.AccessLocalSurpriseMeEnabledKey)) { + if (items[Constants.AccessLocalSurpriseMeEnabledKey]) { + onSurpriseMeEnabled(); + } + } + }); + } + }); + + window.addEventListener('offline', function() { chrome.wallpaperPrivate.getOfflineWallpaperList(function(lists) { if (!self.downloadedListMap_) self.downloadedListMap_ = {}; - for (var i = 0; i < lists.length; i++) + for (var i = 0; i < lists.length; i++) { self.downloadedListMap_[lists[i]] = true; - presetCategoryInner(); - }); - } - }; - - /** - * Constructs the thumbnails grid. - */ - WallpaperManager.prototype.initThumbnailsGrid_ = function() { - this.wallpaperGrid_ = $('wallpaper-grid'); - wallpapers.WallpaperThumbnailsGrid.decorate(this.wallpaperGrid_); - - this.wallpaperGrid_.addEventListener('change', this.onChange_.bind(this)); - this.wallpaperGrid_.addEventListener('dblclick', this.onClose_.bind(this)); - }; - - /** - * Handles change event dispatched by wallpaper grid. - */ - WallpaperManager.prototype.onChange_ = function() { - // splice may dispatch a change event because the position of selected - // element changing. But the actual selected element may not change after - // splice. Check if the new selected element equals to the previous selected - // element before continuing. Otherwise, wallpaper may reset to previous one - // as described in http://crbug.com/229036. - if (this.selectedItem_ == this.wallpaperGrid_.selectedItem) - return; - this.selectedItem_ = this.wallpaperGrid_.selectedItem; - this.onSelectedItemChanged_(); - }; - - /** - * Closes window if no pending wallpaper request. - */ - WallpaperManager.prototype.onClose_ = function() { - if (this.wallpaperRequest_) { - this.wallpaperRequest_.addEventListener('loadend', function() { - // Close window on wallpaper loading finished. - window.close(); - }); - } else { - window.close(); - } - }; - - /** - * Moves the check mark to |activeItem| and hides the wallpaper set by third - * party message if any. And saves the wallpaper's information to local & sync - * storage. Called when wallpaper changed successfully. - * @param {?Object} activeItem The active item in WallpaperThumbnailsGrid's - * data model. - * @param {?string} currentWallpaperURL The URL or filename of current - * wallpaper. - */ - WallpaperManager.prototype.onWallpaperChanged_ = function( - activeItem, currentWallpaperURL) { - this.wallpaperGrid_.activeItem = activeItem; - this.currentWallpaper_ = currentWallpaperURL; - // Hides the wallpaper set by message. - $('wallpaper-set-by-message').textContent = ''; - $('wallpaper-grid').classList.remove('small'); - - if (activeItem) { - WallpaperUtil.saveWallpaperInfo( - currentWallpaperURL, activeItem.layout, activeItem.source, ''); - } else { - WallpaperUtil.saveWallpaperInfo( - '', '', Constants.WallpaperSourceEnum.Default, ''); - } - }; - - /** - * Sets wallpaper to the corresponding wallpaper of selected thumbnail. - * @param {{baseURL: string, layout: string, source: string, - * availableOffline: boolean, opt_dynamicURL: string, - * opt_author: string, opt_authorWebsite: string}} - * selectedItem the selected item in WallpaperThumbnailsGrid's data - * model. - */ - WallpaperManager.prototype.setSelectedWallpaper_ = function(selectedItem) { - var self = this; - switch (selectedItem.source) { - case Constants.WallpaperSourceEnum.Custom: - var errorHandler = this.onFileSystemError_.bind(this); - var success = function(dirEntry) { - dirEntry.getFile(selectedItem.baseURL, {create: false}, - function(fileEntry) { - fileEntry.file(function(file) { - var reader = new FileReader(); - reader.readAsArrayBuffer(file); - reader.addEventListener('error', errorHandler); - reader.addEventListener('load', function(e) { - self.setCustomWallpaper(e.target.result, selectedItem.layout, - false, selectedItem.baseURL, - function(thumbnailData) { - self.onWallpaperChanged_(selectedItem, - selectedItem.baseURL); - WallpaperUtil.storeWallpaperToSyncFS( - selectedItem.baseURL, e.target.result); - WallpaperUtil.storeWallpaperToSyncFS( - selectedItem.baseURL + - Constants.CustomWallpaperThumbnailSuffix, - thumbnailData); - }, - errorHandler); - }); - }, errorHandler); - }, errorHandler); - }; - this.wallpaperDirs_.getDirectory( - Constants.WallpaperDirNameEnum.ORIGINAL, success, errorHandler); - break; - case Constants.WallpaperSourceEnum.OEM: - // Resets back to default wallpaper. - chrome.wallpaperPrivate.resetWallpaper(); - this.onWallpaperChanged_(selectedItem, selectedItem.baseURL); - break; - case Constants.WallpaperSourceEnum.Online: - var wallpaperURL = selectedItem.baseURL + - Constants.HighResolutionSuffix; - var selectedGridItem = this.wallpaperGrid_.getListItem(selectedItem); - - chrome.wallpaperPrivate.setWallpaperIfExists(wallpaperURL, - selectedItem.layout, - function(exists) { - if (exists) { - self.onWallpaperChanged_(selectedItem, wallpaperURL); - return; + } + var thumbnails = self.document_.querySelectorAll('.thumbnail'); + for (var i = 0; i < thumbnails.length; i++) { + var thumbnail = thumbnails[i]; + var url = self.wallpaperGrid_.dataModel.item(i).baseURL; + var fileName = getBaseName(url) + Constants.HighResolutionSuffix; + if (self.downloadedListMap_ && + self.downloadedListMap_.hasOwnProperty(encodeURI(fileName))) { + thumbnail.offline = true; } - - // Falls back to request wallpaper from server. - if (self.wallpaperRequest_) - self.wallpaperRequest_.abort(); - - self.wallpaperRequest_ = new XMLHttpRequest(); - self.progressManager_.reset(self.wallpaperRequest_, selectedGridItem); - - var onSuccess = function(xhr) { - var image = xhr.response; - chrome.wallpaperPrivate.setWallpaper(image, selectedItem.layout, - wallpaperURL, - function() { - self.progressManager_.hideProgressBar(selectedGridItem); - - if (chrome.runtime.lastError != undefined && - chrome.runtime.lastError.message != - str('canceledWallpaper')) { - self.showError_(chrome.runtime.lastError.message); - } else { - self.onWallpaperChanged_(selectedItem, wallpaperURL); - } - }); - self.wallpaperRequest_ = null; - }; - var onFailure = function(status) { - self.progressManager_.hideProgressBar(selectedGridItem); - self.showError_(str('downloadFailed')); - self.wallpaperRequest_ = null; - }; - WallpaperUtil.fetchURL(wallpaperURL, 'arraybuffer', onSuccess, - onFailure, self.wallpaperRequest_); - }); - break; - case Constants.WallpaperSourceEnum.Daily: - case Constants.WallpaperSourceEnum.ThirdParty: - default: - console.error('Unsupported wallpaper source.'); - } - }; - - /* - * Removes the oldest custom wallpaper. If the oldest one is set as current - * wallpaper, removes the second oldest one to free some space. This should - * only be called when exceeding wallpaper quota. - */ - WallpaperManager.prototype.removeOldestWallpaper_ = function() { - // Custom wallpapers should already sorted when put to the data model. The - // last element is the add new button, need to exclude it as well. - var oldestIndex = this.wallpaperGrid_.dataModel.length - 2; - var item = this.wallpaperGrid_.dataModel.item(oldestIndex); - if (!item || item.source != Constants.WallpaperSourceEnum.Custom) - return; - if (item.baseURL == this.currentWallpaper_) - item = this.wallpaperGrid_.dataModel.item(--oldestIndex); - if (item) { - this.removeCustomWallpaper(item.baseURL); - this.wallpaperGrid_.dataModel.splice(oldestIndex, 1); - } - }; - - /* - * Shows an error message to user and log the failed reason in console. - */ - WallpaperManager.prototype.onFileSystemError_ = function(e) { - var msg = ''; - switch (e.code) { - case FileError.QUOTA_EXCEEDED_ERR: - msg = 'QUOTA_EXCEEDED_ERR'; - // Instead of simply remove oldest wallpaper, we should consider a - // better way to handle this situation. See crbug.com/180890. - this.removeOldestWallpaper_(); - break; - case FileError.NOT_FOUND_ERR: - msg = 'NOT_FOUND_ERR'; - break; - case FileError.SECURITY_ERR: - msg = 'SECURITY_ERR'; - break; - case FileError.INVALID_MODIFICATION_ERR: - msg = 'INVALID_MODIFICATION_ERR'; - break; - case FileError.INVALID_STATE_ERR: - msg = 'INVALID_STATE_ERR'; - break; - default: - msg = 'Unknown Error'; - break; - } - console.error('Error: ' + msg); - this.showError_(str('accessFileFailure')); - }; - - /** - * Handles changing of selectedItem in wallpaper manager. - */ - WallpaperManager.prototype.onSelectedItemChanged_ = function() { - this.setWallpaperAttribution_(this.selectedItem_); - - if (!this.selectedItem_ || this.selectedItem_.source == 'ADDNEW') - return; - - if (this.selectedItem_.baseURL && !this.wallpaperGrid_.inProgramSelection) { - if (this.selectedItem_.source == Constants.WallpaperSourceEnum.Custom) { - var items = {}; - var key = this.selectedItem_.baseURL; - var self = this; - Constants.WallpaperLocalStorage.get(key, function(items) { - self.selectedItem_.layout = - items[key] ? items[key] : 'CENTER_CROPPED'; - self.setSelectedWallpaper_(self.selectedItem_); - }); - } else { - this.setSelectedWallpaper_(this.selectedItem_); - } - } - }; - - /** - * Set attributions of wallpaper with given URL. If URL is not valid, clear - * the attributions. - * @param {{baseURL: string, dynamicURL: string, layout: string, - * author: string, authorWebsite: string, availableOffline: boolean}} - * selectedItem selected wallpaper item in grid. - * @private - */ - WallpaperManager.prototype.setWallpaperAttribution_ = function(selectedItem) { - // Only online wallpapers have author and website attributes. All other type - // of wallpapers should not show attributions. - if (selectedItem && - selectedItem.source == Constants.WallpaperSourceEnum.Online) { - $('author-name').textContent = selectedItem.author; - $('author-website').textContent = $('author-website').href = - selectedItem.authorWebsite; - chrome.wallpaperPrivate.getThumbnail(selectedItem.baseURL, - selectedItem.source, - function(data) { - var img = $('attribute-image'); - if (data) { - var blob = new Blob([new Int8Array(data)], {'type' : 'image\/png'}); - img.src = window.URL.createObjectURL(blob); - img.addEventListener('load', function(e) { - window.URL.revokeObjectURL(this.src); - }); - } else { - img.src = ''; } }); - $('wallpaper-attribute').hidden = false; - $('attribute-image').hidden = false; + $('wallpaper-grid').classList.add('image-picker-offline'); + }); + window.addEventListener('online', function() { + self.downloadedListMap_ = null; + $('wallpaper-grid').classList.remove('image-picker-offline'); + }); + } + + this.onResize_(); + this.initContextMenuAndCommand_(); + WallpaperUtil.testSendMessage('launched'); +}; + +/** + * One-time initialization of context menu and command. + */ +WallpaperManager.prototype.initContextMenuAndCommand_ = function() { + this.wallpaperContextMenu_ = $('wallpaper-context-menu'); + cr.ui.Menu.decorate(this.wallpaperContextMenu_); + cr.ui.contextMenuHandler.setContextMenu( + this.wallpaperGrid_, this.wallpaperContextMenu_); + var commands = this.dialogDom_.querySelectorAll('command'); + for (var i = 0; i < commands.length; i++) + cr.ui.Command.decorate(commands[i]); + + var doc = this.document_; + doc.addEventListener('command', this.onCommand_.bind(this)); + doc.addEventListener('canExecute', this.onCommandCanExecute_.bind(this)); +}; + +/** + * Handles a command being executed. + * @param {Event} event A command event. + */ +WallpaperManager.prototype.onCommand_ = function(event) { + if (event.command.id == 'delete') { + var wallpaperGrid = this.wallpaperGrid_; + var selectedIndex = wallpaperGrid.selectionModel.selectedIndex; + var item = wallpaperGrid.dataModel.item(selectedIndex); + if (!item || item.source != Constants.WallpaperSourceEnum.Custom) return; + this.removeCustomWallpaper(item.baseURL); + wallpaperGrid.dataModel.splice(selectedIndex, 1); + // Calculate the number of remaining custom wallpapers. The add new button + // in data model needs to be excluded. + var customWallpaperCount = wallpaperGrid.dataModel.length - 1; + if (customWallpaperCount == 0) { + // Active custom wallpaper is also copied in chronos data dir. It needs + // to be deleted. + chrome.wallpaperPrivate.resetWallpaper(); + this.onWallpaperChanged_(null, null); + } else { + selectedIndex = Math.min(selectedIndex, customWallpaperCount - 1); + wallpaperGrid.selectionModel.selectedIndex = selectedIndex; } - $('wallpaper-attribute').hidden = true; - $('attribute-image').hidden = true; - $('author-name').textContent = ''; - $('author-website').textContent = $('author-website').href = ''; - $('attribute-image').src = ''; - }; + event.cancelBubble = true; + } +}; - /** - * Resize thumbnails grid and categories list to fit the new window size. - */ - WallpaperManager.prototype.onResize_ = function() { - this.wallpaperGrid_.redraw(); - this.categoriesList_.redraw(); - }; +/** + * Decides if a command can be executed on current target. + * @param {Event} event A command event. + */ +WallpaperManager.prototype.onCommandCanExecute_ = function(event) { + switch (event.command.id) { + case 'delete': + var wallpaperGrid = this.wallpaperGrid_; + var selectedIndex = wallpaperGrid.selectionModel.selectedIndex; + var item = wallpaperGrid.dataModel.item(selectedIndex); + if (selectedIndex != this.wallpaperGrid_.dataModel.length - 1 && item && + item.source == Constants.WallpaperSourceEnum.Custom) { + event.canExecute = true; + break; + } + default: + event.canExecute = false; + } +}; - /** - * Close the last opened overlay or app window on pressing the Escape key. - * @param {Event} event A keydown event. - */ - WallpaperManager.prototype.onKeyDown_ = function(event) { - if (event.keyCode == 27) { - // The last opened overlay coincides with the first match of querySelector - // because the Error Container is declared in the DOM before the Wallpaper - // Selection Container. - // TODO(bshe): Make the overlay selection not dependent on the DOM. - var closeButtonSelector = '.overlay-container:not([hidden]) .close'; - var closeButton = this.document_.querySelector(closeButtonSelector); - if (closeButton) { - closeButton.click(); - event.preventDefault(); - } else { - this.onClose_(); +/** + * Preset to the category which contains current wallpaper. + */ +WallpaperManager.prototype.presetCategory_ = function() { + this.currentWallpaper_ = str('currentWallpaper'); + // The currentWallpaper_ is either a url contains HightResolutionSuffix or a + // custom wallpaper file name converted from an integer value represent + // time (e.g., 13006377367586070). + if (!this.enableOnlineWallpaper_ || + (this.currentWallpaper_ && + this.currentWallpaper_.indexOf(Constants.HighResolutionSuffix) == -1)) { + // Custom is the last one in the categories list. + this.categoriesList_.selectionModel.selectedIndex = + this.categoriesList_.dataModel.length - 1; + return; + } + var self = this; + var presetCategoryInner = function() { + // Selects the first category in the categories list of current + // wallpaper as the default selected category when showing wallpaper + // picker UI. + var presetCategory = AllCategoryIndex; + if (self.currentWallpaper_) { + for (var key in self.manifest_.wallpaper_list) { + var url = self.manifest_.wallpaper_list[key].base_url + + Constants.HighResolutionSuffix; + if (url.indexOf(self.currentWallpaper_) != -1 && + self.manifest_.wallpaper_list[key].categories.length > 0) { + presetCategory = self.manifest_.wallpaper_list[key].categories[0] + + OnlineCategoriesOffset; + break; + } } } + self.categoriesList_.selectionModel.selectedIndex = presetCategory; }; + if (navigator.onLine) { + presetCategoryInner(); + } else { + // If device is offline, gets the available offline wallpaper list first. + // Wallpapers which are not in the list will display a grayscaled + // thumbnail. + chrome.wallpaperPrivate.getOfflineWallpaperList(function(lists) { + if (!self.downloadedListMap_) + self.downloadedListMap_ = {}; + for (var i = 0; i < lists.length; i++) + self.downloadedListMap_[lists[i]] = true; + presetCategoryInner(); + }); + } +}; - /** - * Constructs the categories list. - */ - WallpaperManager.prototype.initCategoriesList_ = function() { - this.categoriesList_ = $('categories-list'); - wallpapers.WallpaperCategoriesList.decorate(this.categoriesList_); +/** + * Constructs the thumbnails grid. + */ +WallpaperManager.prototype.initThumbnailsGrid_ = function() { + this.wallpaperGrid_ = $('wallpaper-grid'); + wallpapers.WallpaperThumbnailsGrid.decorate(this.wallpaperGrid_); - this.categoriesList_.selectionModel.addEventListener( - 'change', this.onCategoriesChange_.bind(this)); + this.wallpaperGrid_.addEventListener('change', this.onChange_.bind(this)); + this.wallpaperGrid_.addEventListener('dblclick', this.onClose_.bind(this)); +}; - if (this.enableOnlineWallpaper_ && this.manifest_) { - // Adds all category as first category. - this.categoriesList_.dataModel.push(str('allCategoryLabel')); - for (var key in this.manifest_.categories) { - this.categoriesList_.dataModel.push(this.manifest_.categories[key]); - } - } - // Adds custom category as last category. - this.categoriesList_.dataModel.push(str('customCategoryLabel')); - }; +/** + * Handles change event dispatched by wallpaper grid. + */ +WallpaperManager.prototype.onChange_ = function() { + // splice may dispatch a change event because the position of selected + // element changing. But the actual selected element may not change after + // splice. Check if the new selected element equals to the previous selected + // element before continuing. Otherwise, wallpaper may reset to previous one + // as described in http://crbug.com/229036. + if (this.selectedItem_ == this.wallpaperGrid_.selectedItem) + return; + this.selectedItem_ = this.wallpaperGrid_.selectedItem; + this.onSelectedItemChanged_(); +}; - /** - * Handles the custom wallpaper which user selected from file manager. Called - * when users select a file. - */ - WallpaperManager.prototype.onFileSelectorChanged_ = function() { - var files = $('file-selector').files; - if (files.length != 1) - console.error('More than one files are selected or no file selected'); - if (!files[0].type.match('image/jpeg') && - !files[0].type.match('image/png')) { - this.showError_(str('invalidWallpaper')); - return; - } - var layout = getSelectedLayout(); - var self = this; - var errorHandler = this.onFileSystemError_.bind(this); - var setSelectedFile = function(file, layout, fileName) { - var saveThumbnail = function(thumbnail) { - var success = function(dirEntry) { - dirEntry.getFile(fileName, {create: true}, function(fileEntry) { - fileEntry.createWriter(function(fileWriter) { - fileWriter.onwriteend = function(e) { - $('set-wallpaper-layout').disabled = false; - var wallpaperInfo = { - baseURL: fileName, - layout: layout, - source: Constants.WallpaperSourceEnum.Custom, - availableOffline: true - }; - self.wallpaperGrid_.dataModel.splice(0, 0, wallpaperInfo); - self.wallpaperGrid_.selectedItem = wallpaperInfo; - self.onWallpaperChanged_(wallpaperInfo, fileName); - WallpaperUtil.saveToLocalStorage(self.currentWallpaper_, - layout); - }; +/** + * Closes window if no pending wallpaper request. + */ +WallpaperManager.prototype.onClose_ = function() { + if (this.wallpaperRequest_) { + this.wallpaperRequest_.addEventListener('loadend', function() { + // Close window on wallpaper loading finished. + window.close(); + }); + } else { + window.close(); + } +}; - fileWriter.onerror = errorHandler; +/** + * Moves the check mark to |activeItem| and hides the wallpaper set by third + * party message if any. And saves the wallpaper's information to local & sync + * storage. Called when wallpaper changed successfully. + * @param {?Object} activeItem The active item in WallpaperThumbnailsGrid's + * data model. + * @param {?string} currentWallpaperURL The URL or filename of current + * wallpaper. + */ +WallpaperManager.prototype.onWallpaperChanged_ = function( + activeItem, currentWallpaperURL) { + this.wallpaperGrid_.activeItem = activeItem; + this.currentWallpaper_ = currentWallpaperURL; + // Hides the wallpaper set by message. + $('wallpaper-set-by-message').textContent = ''; + $('wallpaper-grid').classList.remove('small'); - var blob = new Blob([new Int8Array(thumbnail)], - {'type' : 'image\/jpeg'}); - fileWriter.write(blob); + if (activeItem) { + WallpaperUtil.saveWallpaperInfo( + currentWallpaperURL, activeItem.layout, activeItem.source, ''); + } else { + WallpaperUtil.saveWallpaperInfo( + '', '', Constants.WallpaperSourceEnum.Default, ''); + } +}; + +/** + * Sets wallpaper to the corresponding wallpaper of selected thumbnail. + * @param {{baseURL: string, layout: string, source: string, + * availableOffline: boolean, opt_dynamicURL: string, + * opt_author: string, opt_authorWebsite: string}} + * selectedItem the selected item in WallpaperThumbnailsGrid's data + * model. + */ +WallpaperManager.prototype.setSelectedWallpaper_ = function(selectedItem) { + var self = this; + switch (selectedItem.source) { + case Constants.WallpaperSourceEnum.Custom: + var errorHandler = this.onFileSystemError_.bind(this); + var success = function(dirEntry) { + dirEntry.getFile( + selectedItem.baseURL, {create: false}, function(fileEntry) { + fileEntry.file(function(file) { + var reader = new FileReader(); + reader.readAsArrayBuffer(file); + reader.addEventListener('error', errorHandler); + reader.addEventListener('load', function(e) { + self.setCustomWallpaper( + e.target.result, selectedItem.layout, false, + selectedItem.baseURL, function(thumbnailData) { + self.onWallpaperChanged_( + selectedItem, selectedItem.baseURL); + WallpaperUtil.storeWallpaperToSyncFS( + selectedItem.baseURL, e.target.result); + WallpaperUtil.storeWallpaperToSyncFS( + selectedItem.baseURL + + Constants.CustomWallpaperThumbnailSuffix, + thumbnailData); + }, errorHandler); + }); + }, errorHandler); }, errorHandler); - }, errorHandler); - }; - self.wallpaperDirs_.getDirectory( - Constants.WallpaperDirNameEnum.THUMBNAIL, success, errorHandler); }; - var onCustomWallpaperSuccess = function(thumbnailData, wallpaperData) { - WallpaperUtil.storeWallpaperToSyncFS(fileName, wallpaperData); - WallpaperUtil.storeWallpaperToSyncFS( - fileName + Constants.CustomWallpaperThumbnailSuffix, - thumbnailData); - saveThumbnail(thumbnailData); - }; + this.wallpaperDirs_.getDirectory( + Constants.WallpaperDirNameEnum.ORIGINAL, success, errorHandler); + break; + case Constants.WallpaperSourceEnum.OEM: + // Resets back to default wallpaper. + chrome.wallpaperPrivate.resetWallpaper(); + this.onWallpaperChanged_(selectedItem, selectedItem.baseURL); + break; + case Constants.WallpaperSourceEnum.Online: + var wallpaperURL = selectedItem.baseURL + Constants.HighResolutionSuffix; + var selectedGridItem = this.wallpaperGrid_.getListItem(selectedItem); + + chrome.wallpaperPrivate.setWallpaperIfExists( + wallpaperURL, selectedItem.layout, function(exists) { + if (exists) { + self.onWallpaperChanged_(selectedItem, wallpaperURL); + return; + } + + // Falls back to request wallpaper from server. + if (self.wallpaperRequest_) + self.wallpaperRequest_.abort(); + + self.wallpaperRequest_ = new XMLHttpRequest(); + self.progressManager_.reset( + self.wallpaperRequest_, selectedGridItem); + + var onSuccess = function(xhr) { + var image = xhr.response; + chrome.wallpaperPrivate.setWallpaper( + image, selectedItem.layout, wallpaperURL, function() { + self.progressManager_.hideProgressBar(selectedGridItem); + + if (chrome.runtime.lastError != undefined && + chrome.runtime.lastError.message != + str('canceledWallpaper')) { + self.showError_(chrome.runtime.lastError.message); + } else { + self.onWallpaperChanged_(selectedItem, wallpaperURL); + } + }); + self.wallpaperRequest_ = null; + }; + var onFailure = function(status) { + self.progressManager_.hideProgressBar(selectedGridItem); + self.showError_(str('downloadFailed')); + self.wallpaperRequest_ = null; + }; + WallpaperUtil.fetchURL( + wallpaperURL, 'arraybuffer', onSuccess, onFailure, + self.wallpaperRequest_); + }); + break; + case Constants.WallpaperSourceEnum.Daily: + case Constants.WallpaperSourceEnum.ThirdParty: + default: + console.error('Unsupported wallpaper source.'); + } +}; + +/* + * Removes the oldest custom wallpaper. If the oldest one is set as current + * wallpaper, removes the second oldest one to free some space. This should + * only be called when exceeding wallpaper quota. + */ +WallpaperManager.prototype.removeOldestWallpaper_ = function() { + // Custom wallpapers should already sorted when put to the data model. The + // last element is the add new button, need to exclude it as well. + var oldestIndex = this.wallpaperGrid_.dataModel.length - 2; + var item = this.wallpaperGrid_.dataModel.item(oldestIndex); + if (!item || item.source != Constants.WallpaperSourceEnum.Custom) + return; + if (item.baseURL == this.currentWallpaper_) + item = this.wallpaperGrid_.dataModel.item(--oldestIndex); + if (item) { + this.removeCustomWallpaper(item.baseURL); + this.wallpaperGrid_.dataModel.splice(oldestIndex, 1); + } +}; + +/* + * Shows an error message to user and log the failed reason in console. + */ +WallpaperManager.prototype.onFileSystemError_ = function(e) { + var msg = ''; + switch (e.code) { + case FileError.QUOTA_EXCEEDED_ERR: + msg = 'QUOTA_EXCEEDED_ERR'; + // Instead of simply remove oldest wallpaper, we should consider a + // better way to handle this situation. See crbug.com/180890. + this.removeOldestWallpaper_(); + break; + case FileError.NOT_FOUND_ERR: + msg = 'NOT_FOUND_ERR'; + break; + case FileError.SECURITY_ERR: + msg = 'SECURITY_ERR'; + break; + case FileError.INVALID_MODIFICATION_ERR: + msg = 'INVALID_MODIFICATION_ERR'; + break; + case FileError.INVALID_STATE_ERR: + msg = 'INVALID_STATE_ERR'; + break; + default: + msg = 'Unknown Error'; + break; + } + console.error('Error: ' + msg); + this.showError_(str('accessFileFailure')); +}; + +/** + * Handles changing of selectedItem in wallpaper manager. + */ +WallpaperManager.prototype.onSelectedItemChanged_ = function() { + this.setWallpaperAttribution_(this.selectedItem_); + + if (!this.selectedItem_ || this.selectedItem_.source == 'ADDNEW') + return; + + if (this.selectedItem_.baseURL && !this.wallpaperGrid_.inProgramSelection) { + if (this.selectedItem_.source == Constants.WallpaperSourceEnum.Custom) { + var items = {}; + var key = this.selectedItem_.baseURL; + var self = this; + Constants.WallpaperLocalStorage.get(key, function(items) { + self.selectedItem_.layout = items[key] ? items[key] : 'CENTER_CROPPED'; + self.setSelectedWallpaper_(self.selectedItem_); + }); + } else { + this.setSelectedWallpaper_(this.selectedItem_); + } + } +}; + +/** + * Set attributions of wallpaper with given URL. If URL is not valid, clear + * the attributions. + * @param {{baseURL: string, dynamicURL: string, layout: string, + * author: string, authorWebsite: string, availableOffline: boolean}} + * selectedItem selected wallpaper item in grid. + * @private + */ +WallpaperManager.prototype.setWallpaperAttribution_ = function(selectedItem) { + // Only online wallpapers have author and website attributes. All other type + // of wallpapers should not show attributions. + if (selectedItem && + selectedItem.source == Constants.WallpaperSourceEnum.Online) { + $('author-name').textContent = selectedItem.author; + $('author-website').textContent = $('author-website').href = + selectedItem.authorWebsite; + chrome.wallpaperPrivate.getThumbnail( + selectedItem.baseURL, selectedItem.source, function(data) { + var img = $('attribute-image'); + if (data) { + var blob = new Blob([new Int8Array(data)], {'type': 'image\/png'}); + img.src = window.URL.createObjectURL(blob); + img.addEventListener('load', function(e) { + window.URL.revokeObjectURL(this.src); + }); + } else { + img.src = ''; + } + }); + $('wallpaper-attribute').hidden = false; + $('attribute-image').hidden = false; + return; + } + $('wallpaper-attribute').hidden = true; + $('attribute-image').hidden = true; + $('author-name').textContent = ''; + $('author-website').textContent = $('author-website').href = ''; + $('attribute-image').src = ''; +}; + +/** + * Resize thumbnails grid and categories list to fit the new window size. + */ +WallpaperManager.prototype.onResize_ = function() { + this.wallpaperGrid_.redraw(); + this.categoriesList_.redraw(); +}; + +/** + * Close the last opened overlay or app window on pressing the Escape key. + * @param {Event} event A keydown event. + */ +WallpaperManager.prototype.onKeyDown_ = function(event) { + if (event.keyCode == 27) { + // The last opened overlay coincides with the first match of querySelector + // because the Error Container is declared in the DOM before the Wallpaper + // Selection Container. + // TODO(bshe): Make the overlay selection not dependent on the DOM. + var closeButtonSelector = '.overlay-container:not([hidden]) .close'; + var closeButton = this.document_.querySelector(closeButtonSelector); + if (closeButton) { + closeButton.click(); + event.preventDefault(); + } else { + this.onClose_(); + } + } +}; + +/** + * Constructs the categories list. + */ +WallpaperManager.prototype.initCategoriesList_ = function() { + this.categoriesList_ = $('categories-list'); + wallpapers.WallpaperCategoriesList.decorate(this.categoriesList_); + + this.categoriesList_.selectionModel.addEventListener( + 'change', this.onCategoriesChange_.bind(this)); + + if (this.enableOnlineWallpaper_ && this.manifest_) { + // Adds all category as first category. + this.categoriesList_.dataModel.push(str('allCategoryLabel')); + for (var key in this.manifest_.categories) { + this.categoriesList_.dataModel.push(this.manifest_.categories[key]); + } + } + // Adds custom category as last category. + this.categoriesList_.dataModel.push(str('customCategoryLabel')); +}; + +/** + * Handles the custom wallpaper which user selected from file manager. Called + * when users select a file. + */ +WallpaperManager.prototype.onFileSelectorChanged_ = function() { + var files = $('file-selector').files; + if (files.length != 1) + console.error('More than one files are selected or no file selected'); + if (!files[0].type.match('image/jpeg') && !files[0].type.match('image/png')) { + this.showError_(str('invalidWallpaper')); + return; + } + var layout = getSelectedLayout(); + var self = this; + var errorHandler = this.onFileSystemError_.bind(this); + var setSelectedFile = function(file, layout, fileName) { + var saveThumbnail = function(thumbnail) { var success = function(dirEntry) { dirEntry.getFile(fileName, {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { - fileWriter.addEventListener('writeend', function(e) { - var reader = new FileReader(); - reader.readAsArrayBuffer(file); - reader.addEventListener('error', errorHandler); - reader.addEventListener('load', function(e) { - self.setCustomWallpaper(e.target.result, layout, true, fileName, - function(thumbnail) { - onCustomWallpaperSuccess(thumbnail, e.target.result); - }, - function() { - self.removeCustomWallpaper(fileName); - errorHandler(); - }); - }); - }); - fileWriter.addEventListener('error', errorHandler); - fileWriter.write(file); - }, errorHandler); - }, errorHandler); - }; - self.wallpaperDirs_.getDirectory(Constants.WallpaperDirNameEnum.ORIGINAL, - success, - errorHandler); - }; - setSelectedFile(files[0], layout, new Date().getTime().toString()); - }; - - /** - * Removes wallpaper and thumbnail with fileName from FileSystem. - * @param {string} fileName The file name of wallpaper and thumbnail to be - * removed. - */ - WallpaperManager.prototype.removeCustomWallpaper = function(fileName) { - var errorHandler = this.onFileSystemError_.bind(this); - var self = this; - var removeFile = function(fileName) { - var success = function(dirEntry) { - dirEntry.getFile(fileName, {create: false}, function(fileEntry) { - fileEntry.remove(function() { - WallpaperUtil.deleteWallpaperFromSyncFS(fileName); - }, errorHandler); - }, errorHandler); - }; - - // Removes copy of original. - self.wallpaperDirs_.getDirectory(Constants.WallpaperDirNameEnum.ORIGINAL, - success, - errorHandler); - - // Removes generated thumbnail. - self.wallpaperDirs_.getDirectory(Constants.WallpaperDirNameEnum.THUMBNAIL, - success, - errorHandler); - }; - removeFile(fileName); - }; - - /** - * Sets current wallpaper and generate thumbnail if generateThumbnail is true. - * @param {ArrayBuffer} wallpaper The binary representation of wallpaper. - * @param {string} layout The user selected wallpaper layout. - * @param {boolean} generateThumbnail True if need to generate thumbnail. - * @param {string} fileName The unique file name of wallpaper. - * @param {function(thumbnail):void} success Success callback. If - * generateThumbnail is true, the callback parameter should have the - * generated thumbnail. - * @param {function(e):void} failure Failure callback. Called when there is an - * error from FileSystem. - */ - WallpaperManager.prototype.setCustomWallpaper = function(wallpaper, - layout, - generateThumbnail, - fileName, - success, - failure) { - var self = this; - var onFinished = function(opt_thumbnail) { - if (chrome.runtime.lastError != undefined && - chrome.runtime.lastError.message != str('canceledWallpaper')) { - self.showError_(chrome.runtime.lastError.message); - $('set-wallpaper-layout').disabled = true; - failure(); - } else { - success(opt_thumbnail); - } - }; - - chrome.wallpaperPrivate.setCustomWallpaper(wallpaper, layout, - generateThumbnail, - fileName, onFinished); - }; - - /** - * Handles the layout setting change of custom wallpaper. - */ - WallpaperManager.prototype.onWallpaperLayoutChanged_ = function() { - var layout = getSelectedLayout(); - var self = this; - chrome.wallpaperPrivate.setCustomWallpaperLayout(layout, function() { - if (chrome.runtime.lastError != undefined && - chrome.runtime.lastError.message != str('canceledWallpaper')) { - self.showError_(chrome.runtime.lastError.message); - self.removeCustomWallpaper(fileName); - $('set-wallpaper-layout').disabled = true; - } else { - WallpaperUtil.saveToLocalStorage(self.currentWallpaper_, layout); - self.onWallpaperChanged_(self.wallpaperGrid_.activeItem, - self.currentWallpaper_); - } - }); - }; - - /** - * Handles user clicking on a different category. - */ - WallpaperManager.prototype.onCategoriesChange_ = function() { - var categoriesList = this.categoriesList_; - var selectedIndex = categoriesList.selectionModel.selectedIndex; - if (selectedIndex == -1) - return; - var selectedListItem = categoriesList.getListItemByIndex(selectedIndex); - var bar = $('bar'); - bar.style.left = selectedListItem.offsetLeft + 'px'; - bar.style.width = selectedListItem.offsetWidth + 'px'; - - var wallpapersDataModel = new cr.ui.ArrayDataModel([]); - var selectedItem = null; - if (selectedListItem.custom) { - this.document_.body.setAttribute('custom', ''); - var errorHandler = this.onFileSystemError_.bind(this); - var toArray = function(list) { - return Array.prototype.slice.call(list || [], 0); - }; - - var self = this; - var processResults = function(entries) { - for (var i = 0; i < entries.length; i++) { - var entry = entries[i]; - var wallpaperInfo = { - // Set wallpaperId to null to avoid duplicate thumbnail images, - // see crbug.com/506135 for details. - wallpaperId: null, - baseURL: entry.name, - // The layout will be replaced by the actual value saved in - // local storage when requested later. Layout is not important - // for constructing thumbnails grid, we use CENTER_CROPPED here - // to speed up the process of constructing. So we do not need to - // wait for fetching correct layout. - layout: 'CENTER_CROPPED', + fileWriter.onwriteend = function(e) { + $('set-wallpaper-layout').disabled = false; + var wallpaperInfo = { + baseURL: fileName, + layout: layout, source: Constants.WallpaperSourceEnum.Custom, availableOffline: true - }; - wallpapersDataModel.push(wallpaperInfo); - } - if (loadTimeData.getBoolean('isOEMDefaultWallpaper')) { - var oemDefaultWallpaperElement = { - wallpaperId: null, - baseURL: 'OemDefaultWallpaper', - layout: 'CENTER_CROPPED', - source: Constants.WallpaperSourceEnum.OEM, - availableOffline: true - }; - wallpapersDataModel.push(oemDefaultWallpaperElement); - } - for (var i = 0; i < wallpapersDataModel.length; i++) { - // For custom wallpapers, the file name of |currentWallpaper_| - // includes the first directory level (corresponding to user id hash). - if (getBaseName(self.currentWallpaper_) == - wallpapersDataModel.item(i).baseURL) { - selectedItem = wallpapersDataModel.item(i); - } - } - var lastElement = { - baseURL: '', - layout: '', - source: Constants.WallpaperSourceEnum.AddNew, - availableOffline: true - }; - wallpapersDataModel.push(lastElement); - self.wallpaperGrid_.dataModel = wallpapersDataModel; - if (selectedItem) { - self.wallpaperGrid_.selectedItem = selectedItem; - self.wallpaperGrid_.activeItem = selectedItem; - } - }; + }; + self.wallpaperGrid_.dataModel.splice(0, 0, wallpaperInfo); + self.wallpaperGrid_.selectedItem = wallpaperInfo; + self.onWallpaperChanged_(wallpaperInfo, fileName); + WallpaperUtil.saveToLocalStorage(self.currentWallpaper_, layout); + }; - var success = function(dirEntry) { - var dirReader = dirEntry.createReader(); - var entries = []; - // All of a directory's entries are not guaranteed to return in a single - // call. - var readEntries = function() { - dirReader.readEntries(function(results) { - if (!results.length) { - processResults(entries.sort()); - } else { - entries = entries.concat(toArray(results)); - readEntries(); - } + fileWriter.onerror = errorHandler; + + var blob = + new Blob([new Int8Array(thumbnail)], {'type': 'image\/jpeg'}); + fileWriter.write(blob); }, errorHandler); - }; - readEntries(); // Start reading dirs. + }, errorHandler); }; - this.wallpaperDirs_.getDirectory(Constants.WallpaperDirNameEnum.ORIGINAL, - success, errorHandler); + self.wallpaperDirs_.getDirectory( + Constants.WallpaperDirNameEnum.THUMBNAIL, success, errorHandler); + }; + var onCustomWallpaperSuccess = function(thumbnailData, wallpaperData) { + WallpaperUtil.storeWallpaperToSyncFS(fileName, wallpaperData); + WallpaperUtil.storeWallpaperToSyncFS( + fileName + Constants.CustomWallpaperThumbnailSuffix, thumbnailData); + saveThumbnail(thumbnailData); + }; + var success = function(dirEntry) { + dirEntry.getFile(fileName, {create: true}, function(fileEntry) { + fileEntry.createWriter(function(fileWriter) { + fileWriter.addEventListener('writeend', function(e) { + var reader = new FileReader(); + reader.readAsArrayBuffer(file); + reader.addEventListener('error', errorHandler); + reader.addEventListener('load', function(e) { + self.setCustomWallpaper( + e.target.result, layout, true, fileName, + function(thumbnail) { + onCustomWallpaperSuccess(thumbnail, e.target.result); + }, + function() { + self.removeCustomWallpaper(fileName); + errorHandler(); + }); + }); + }); + fileWriter.addEventListener('error', errorHandler); + fileWriter.write(file); + }, errorHandler); + }, errorHandler); + }; + self.wallpaperDirs_.getDirectory( + Constants.WallpaperDirNameEnum.ORIGINAL, success, errorHandler); + }; + setSelectedFile(files[0], layout, new Date().getTime().toString()); +}; + +/** + * Removes wallpaper and thumbnail with fileName from FileSystem. + * @param {string} fileName The file name of wallpaper and thumbnail to be + * removed. + */ +WallpaperManager.prototype.removeCustomWallpaper = function(fileName) { + var errorHandler = this.onFileSystemError_.bind(this); + var self = this; + var removeFile = function(fileName) { + var success = function(dirEntry) { + dirEntry.getFile(fileName, {create: false}, function(fileEntry) { + fileEntry.remove(function() { + WallpaperUtil.deleteWallpaperFromSyncFS(fileName); + }, errorHandler); + }, errorHandler); + }; + + // Removes copy of original. + self.wallpaperDirs_.getDirectory( + Constants.WallpaperDirNameEnum.ORIGINAL, success, errorHandler); + + // Removes generated thumbnail. + self.wallpaperDirs_.getDirectory( + Constants.WallpaperDirNameEnum.THUMBNAIL, success, errorHandler); + }; + removeFile(fileName); +}; + +/** + * Sets current wallpaper and generate thumbnail if generateThumbnail is true. + * @param {ArrayBuffer} wallpaper The binary representation of wallpaper. + * @param {string} layout The user selected wallpaper layout. + * @param {boolean} generateThumbnail True if need to generate thumbnail. + * @param {string} fileName The unique file name of wallpaper. + * @param {function(thumbnail):void} success Success callback. If + * generateThumbnail is true, the callback parameter should have the + * generated thumbnail. + * @param {function(e):void} failure Failure callback. Called when there is an + * error from FileSystem. + */ +WallpaperManager.prototype.setCustomWallpaper = function( + wallpaper, layout, generateThumbnail, fileName, success, failure) { + var self = this; + var onFinished = function(opt_thumbnail) { + if (chrome.runtime.lastError != undefined && + chrome.runtime.lastError.message != str('canceledWallpaper')) { + self.showError_(chrome.runtime.lastError.message); + $('set-wallpaper-layout').disabled = true; + failure(); } else { - this.document_.body.removeAttribute('custom'); - // Need this check for test purpose. - var numOnlineWallpaper = (this.enableOnlineWallpaper_ && this.manifest_) ? - this.manifest_.wallpaper_list.length : 0; - for (var i = 0; i < numOnlineWallpaper; i++) { - if (selectedIndex == AllCategoryIndex || - this.manifest_.wallpaper_list[i].categories.indexOf( - selectedIndex - OnlineCategoriesOffset) != -1) { - var wallpaperInfo = { - wallpaperId: i, - baseURL: this.manifest_.wallpaper_list[i].base_url, - layout: this.manifest_.wallpaper_list[i].default_layout, - source: Constants.WallpaperSourceEnum.Online, - availableOffline: false, - author: this.manifest_.wallpaper_list[i].author, - authorWebsite: this.manifest_.wallpaper_list[i].author_website, - dynamicURL: this.manifest_.wallpaper_list[i].dynamic_url - }; - var fileName = getBaseName(wallpaperInfo.baseURL) + - Constants.HighResolutionSuffix; - if (this.downloadedListMap_ && - this.downloadedListMap_.hasOwnProperty(encodeURI(fileName))) { - wallpaperInfo.availableOffline = true; - } - wallpapersDataModel.push(wallpaperInfo); - var url = this.manifest_.wallpaper_list[i].base_url + - Constants.HighResolutionSuffix; - if (url == this.currentWallpaper_) { - selectedItem = wallpaperInfo; - } - } - } - this.wallpaperGrid_.dataModel = wallpapersDataModel; - if (selectedItem) { - this.wallpaperGrid_.selectedItem = selectedItem; - this.wallpaperGrid_.activeItem = selectedItem; - } + success(opt_thumbnail); } }; + chrome.wallpaperPrivate.setCustomWallpaper( + wallpaper, layout, generateThumbnail, fileName, onFinished); +}; + +/** + * Handles the layout setting change of custom wallpaper. + */ +WallpaperManager.prototype.onWallpaperLayoutChanged_ = function() { + var layout = getSelectedLayout(); + var self = this; + chrome.wallpaperPrivate.setCustomWallpaperLayout(layout, function() { + if (chrome.runtime.lastError != undefined && + chrome.runtime.lastError.message != str('canceledWallpaper')) { + self.showError_(chrome.runtime.lastError.message); + self.removeCustomWallpaper(fileName); + $('set-wallpaper-layout').disabled = true; + } else { + WallpaperUtil.saveToLocalStorage(self.currentWallpaper_, layout); + self.onWallpaperChanged_( + self.wallpaperGrid_.activeItem, self.currentWallpaper_); + } + }); +}; + +/** + * Handles user clicking on a different category. + */ +WallpaperManager.prototype.onCategoriesChange_ = function() { + var categoriesList = this.categoriesList_; + var selectedIndex = categoriesList.selectionModel.selectedIndex; + if (selectedIndex == -1) + return; + var selectedListItem = categoriesList.getListItemByIndex(selectedIndex); + var bar = $('bar'); + bar.style.left = selectedListItem.offsetLeft + 'px'; + bar.style.width = selectedListItem.offsetWidth + 'px'; + + var wallpapersDataModel = new cr.ui.ArrayDataModel([]); + var selectedItem = null; + if (selectedListItem.custom) { + this.document_.body.setAttribute('custom', ''); + var errorHandler = this.onFileSystemError_.bind(this); + var toArray = function(list) { + return Array.prototype.slice.call(list || [], 0); + }; + + var self = this; + var processResults = function(entries) { + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + var wallpaperInfo = { + // Set wallpaperId to null to avoid duplicate thumbnail images, + // see crbug.com/506135 for details. + wallpaperId: null, + baseURL: entry.name, + // The layout will be replaced by the actual value saved in + // local storage when requested later. Layout is not important + // for constructing thumbnails grid, we use CENTER_CROPPED here + // to speed up the process of constructing. So we do not need to + // wait for fetching correct layout. + layout: 'CENTER_CROPPED', + source: Constants.WallpaperSourceEnum.Custom, + availableOffline: true + }; + wallpapersDataModel.push(wallpaperInfo); + } + if (loadTimeData.getBoolean('isOEMDefaultWallpaper')) { + var oemDefaultWallpaperElement = { + wallpaperId: null, + baseURL: 'OemDefaultWallpaper', + layout: 'CENTER_CROPPED', + source: Constants.WallpaperSourceEnum.OEM, + availableOffline: true + }; + wallpapersDataModel.push(oemDefaultWallpaperElement); + } + for (var i = 0; i < wallpapersDataModel.length; i++) { + // For custom wallpapers, the file name of |currentWallpaper_| + // includes the first directory level (corresponding to user id hash). + if (getBaseName(self.currentWallpaper_) == + wallpapersDataModel.item(i).baseURL) { + selectedItem = wallpapersDataModel.item(i); + } + } + var lastElement = { + baseURL: '', + layout: '', + source: Constants.WallpaperSourceEnum.AddNew, + availableOffline: true + }; + wallpapersDataModel.push(lastElement); + self.wallpaperGrid_.dataModel = wallpapersDataModel; + if (selectedItem) { + self.wallpaperGrid_.selectedItem = selectedItem; + self.wallpaperGrid_.activeItem = selectedItem; + } + }; + + var success = function(dirEntry) { + var dirReader = dirEntry.createReader(); + var entries = []; + // All of a directory's entries are not guaranteed to return in a single + // call. + var readEntries = function() { + dirReader.readEntries(function(results) { + if (!results.length) { + processResults(entries.sort()); + } else { + entries = entries.concat(toArray(results)); + readEntries(); + } + }, errorHandler); + }; + readEntries(); // Start reading dirs. + }; + this.wallpaperDirs_.getDirectory( + Constants.WallpaperDirNameEnum.ORIGINAL, success, errorHandler); + } else { + this.document_.body.removeAttribute('custom'); + // Need this check for test purpose. + var numOnlineWallpaper = (this.enableOnlineWallpaper_ && this.manifest_) ? + this.manifest_.wallpaper_list.length : + 0; + for (var i = 0; i < numOnlineWallpaper; i++) { + if (selectedIndex == AllCategoryIndex || + this.manifest_.wallpaper_list[i].categories.indexOf( + selectedIndex - OnlineCategoriesOffset) != -1) { + var wallpaperInfo = { + wallpaperId: i, + baseURL: this.manifest_.wallpaper_list[i].base_url, + layout: this.manifest_.wallpaper_list[i].default_layout, + source: Constants.WallpaperSourceEnum.Online, + availableOffline: false, + author: this.manifest_.wallpaper_list[i].author, + authorWebsite: this.manifest_.wallpaper_list[i].author_website, + dynamicURL: this.manifest_.wallpaper_list[i].dynamic_url + }; + var fileName = + getBaseName(wallpaperInfo.baseURL) + Constants.HighResolutionSuffix; + if (this.downloadedListMap_ && + this.downloadedListMap_.hasOwnProperty(encodeURI(fileName))) { + wallpaperInfo.availableOffline = true; + } + wallpapersDataModel.push(wallpaperInfo); + var url = this.manifest_.wallpaper_list[i].base_url + + Constants.HighResolutionSuffix; + if (url == this.currentWallpaper_) { + selectedItem = wallpaperInfo; + } + } + } + this.wallpaperGrid_.dataModel = wallpapersDataModel; + if (selectedItem) { + this.wallpaperGrid_.selectedItem = selectedItem; + this.wallpaperGrid_.activeItem = selectedItem; + } + } +}; + })();
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.html b/chrome/browser/resources/settings/basic_page/basic_page.html index d08c0df4..afbd8cc 100644 --- a/chrome/browser/resources/settings/basic_page/basic_page.html +++ b/chrome/browser/resources/settings/basic_page/basic_page.html
@@ -54,8 +54,10 @@ #secondaryUserBanner { @apply(--shadow-elevation-2dp); + align-items: center; background-color: white; border-radius: 2px; + display: flex; margin: 21px 0; } @@ -96,8 +98,7 @@ </settings-reset-profile-banner> </template> <if expr="chromeos"> - <div id="secondaryUserBanner" class="layout horizontal center" - hidden="[[!showSecondaryUserBanner_]]"> + <div id="secondaryUserBanner" hidden="[[!showSecondaryUserBanner_]]"> <div id="secondaryUserIcon"></div> <div class="flex">$i18n{secondaryUserBannerText}</div> </div>
diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html index 9fd16e3..3c21962a 100644 --- a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html +++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html
@@ -291,7 +291,7 @@ } </style> <add-printer-dialog> - <div class="dialog-title">$i18n{addPrintersManuallyTitle}</div> + <div class="dialog-title">$i18n{selectManufacturerAndModelTitle}</div> <div class="dialog-body"> <div class="settings-box two-line"> <div class="start">
diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js index 28c5886..0fee051c 100644 --- a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js +++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js
@@ -466,7 +466,7 @@ this.addPrinter_(); } else if (this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) { this.configuringDialogTitle = - loadTimeData.getString('addPrintersManuallyTitle'); + loadTimeData.getString('selectManufacturerAndModelTitle'); this.addPrinter_(); } else if (this.previousDialog_ == AddPrinterDialogs.MANUALLY) { this.configuringDialogTitle =
diff --git a/chrome/browser/resources/signin/signin_dice_internals/signin_dice_internals.html b/chrome/browser/resources/signin/signin_dice_internals/signin_dice_internals.html new file mode 100644 index 0000000..54136bcd --- /dev/null +++ b/chrome/browser/resources/signin/signin_dice_internals/signin_dice_internals.html
@@ -0,0 +1,51 @@ +<!doctype html> +<html> + <head> + <meta charset="utf-8"> + <link rel="import" href="chrome://resources/html/polymer.html"> + <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> + <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> + <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> + <link rel="import" href="chrome://resources/html/cr.html"> + <link rel="import" href="chrome://resources/html/util.html"> + <style is="custom-style"> + .top-title-bar { + align-items: center; + border-bottom: 1px solid var(--paper-grey-300); + display: flex; + font-size: 16px; + height: 52px; + padding: 0 24px; + } + .container { + background-color: white; + color: #333; + width: 448px; + } + .action-container { + display: flex; + justify-content: flex-start; + padding: 16px; + } + paper-button.primary-action { + --paper-button-flat-keyboard-focus: { + background: rgb(58, 117, 215); + font-weight: 500; + }; + background: var(--google-blue-500); + color: white; + } + </style> + </head> + <body> + <div class="container"> + <div class="top-title-bar">Desktop Identity Consistency Internals</div> + <div class="action-container"> + <paper-button class="primary-action" id="enableSyncButton"> + Enable Sync + </paper-button> + </div> + </div> + </body> + <script src="signin_dice_internals.js"></script> +</html>
diff --git a/chrome/browser/resources/signin/signin_dice_internals/signin_dice_internals.js b/chrome/browser/resources/signin/signin_dice_internals/signin_dice_internals.js new file mode 100644 index 0000000..4a63983 --- /dev/null +++ b/chrome/browser/resources/signin/signin_dice_internals/signin_dice_internals.js
@@ -0,0 +1,21 @@ +/* Copyright 2017 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +cr.define('signin.dice', function() { + 'use strict'; + + function initialize() { + $('enableSyncButton').addEventListener('click', onEnableSync); + } + + function onEnableSync(e) { + chrome.send('enableSync'); + } + + return { + initialize: initialize, + }; +}); + +document.addEventListener('DOMContentLoaded', signin.dice.initialize);
diff --git a/chrome/browser/signin/local_auth.cc b/chrome/browser/signin/local_auth.cc index 9cf1e08..5ce69c4 100644 --- a/chrome/browser/signin/local_auth.cc +++ b/chrome/browser/signin/local_auth.cc
@@ -108,9 +108,7 @@ crypto::SymmetricKey::DeriveKeyFromPassword( crypto::SymmetricKey::AES, password, salt, encoding.iteration_count, encoding.hash_bits)); - std::string password_hash; - const bool success = password_key->GetRawKey(&password_hash); - DCHECK(success); + std::string password_hash = password_key->key(); DCHECK_EQ(encoding.hash_bytes, password_hash.length()); UMA_HISTOGRAM_TIMES("PasswordHash.CreateTime",
diff --git a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc index f6843dbe..ba48ede 100644 --- a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc +++ b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
@@ -4,6 +4,7 @@ #include <map> #include <memory> +#include <sstream> #include <string> #include "base/bind.h" @@ -544,8 +545,10 @@ } IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, SubFrameActivation) { - content::ConsoleObserverDelegate console_observer( - web_contents(), kDisallowSubframeConsoleMessage + "*"); + std::ostringstream message_filter; + message_filter << kDisallowSubframeConsoleMessage << "*"; + content::ConsoleObserverDelegate console_observer(web_contents(), + message_filter.str()); web_contents()->SetDelegate(&console_observer); GURL url(GetTestUrl(kTestFrameSetPath)); @@ -564,15 +567,17 @@ 1); // Console message for subframe blocking should be displayed. - EXPECT_TRUE(base::MatchPattern( - console_observer.message(), - kDisallowSubframeConsoleMessage + "*included_script.js*")); + std::ostringstream result; + result << kDisallowSubframeConsoleMessage << "*included_script.js*"; + EXPECT_TRUE(base::MatchPattern(console_observer.message(), result.str())); } IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, ActivationDisabled_NoConsoleMessage) { - content::ConsoleObserverDelegate console_observer( - web_contents(), kDisallowSubframeConsoleMessage + "*"); + std::ostringstream message_filter; + message_filter << kDisallowSubframeConsoleMessage << "*"; + content::ConsoleObserverDelegate console_observer(web_contents(), + message_filter.str()); web_contents()->SetDelegate(&console_observer); Configuration config( @@ -594,8 +599,10 @@ IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, ActivationDryRun_NoConsoleMessage) { - content::ConsoleObserverDelegate console_observer( - web_contents(), kDisallowSubframeConsoleMessage + "*"); + std::ostringstream message_filter; + message_filter << kDisallowSubframeConsoleMessage << "*"; + content::ConsoleObserverDelegate console_observer(web_contents(), + message_filter.str()); web_contents()->SetDelegate(&console_observer); Configuration config(
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 0b402fb..5a790b3 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -2062,6 +2062,10 @@ "webui/signin/md_user_manager_ui.h", "webui/signin/signin_create_profile_handler.cc", "webui/signin/signin_create_profile_handler.h", + "webui/signin/signin_dice_internals_handler.cc", + "webui/signin/signin_dice_internals_handler.h", + "webui/signin/signin_dice_internals_ui.cc", + "webui/signin/signin_dice_internals_ui.h", "webui/signin/signin_email_confirmation_dialog.cc", "webui/signin/signin_email_confirmation_dialog.h", "webui/signin/signin_email_confirmation_ui.cc",
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm index d841a098..716b6bc 100644 --- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm +++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm
@@ -137,6 +137,7 @@ messageColor, }] autorelease]]; } + [message_ sizeToFit]; [container_ addSubview:message_]; NSString* helpLinkTitle =
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc index fdb9fa0..b9871f61 100644 --- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc +++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
@@ -34,6 +34,7 @@ #include "components/autofill/core/common/autofill_constants.h" #include "components/payments/content/payment_request_spec.h" #include "components/payments/content/payment_request_state.h" +#include "components/payments/core/strings_util.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/insets.h" @@ -208,8 +209,8 @@ view->SetLayoutManager(layout); // "Cards accepted" label is "hint" grey. - view->AddChildView(CreateHintLabel(l10n_util::GetStringUTF16( - IDS_PAYMENTS_ACCEPTED_CARDS_LABEL)) + view->AddChildView(CreateHintLabel(GetAcceptedCardTypesText( + spec()->supported_card_types_set())) .release()); // 8dp padding is required between icons.
diff --git a/chrome/browser/ui/views/payments/order_summary_view_controller.cc b/chrome/browser/ui/views/payments/order_summary_view_controller.cc index 42ff50a..c1fed0e4 100644 --- a/chrome/browser/ui/views/payments/order_summary_view_controller.cc +++ b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
@@ -61,7 +61,7 @@ row->SetLayoutManager(layout); views::ColumnSet* columns = layout->AddColumnSet(0); - // The first column has resize_percent = 1 so that it streches all the way + // The first column has resize_percent = 1 so that it stretches all the way // across the row up to the amount label. This way the first label elides as // required. columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 1, @@ -83,6 +83,10 @@ currency_text = CreateHintLabel(currency); amount_text = base::MakeUnique<views::Label>(amount); } + // Strings from the website may not match the locale of the device, so align + // them according to the language of the text. This will result, for example, + // in "he" labels being right-aligned in a browser that's using "en" locale. + label_text->SetHorizontalAlignment(gfx::ALIGN_TO_HEAD); amount_text->set_id(static_cast<int>(amount_label_id)); amount_text->SetMultiLine(true); amount_text->SetAllowCharacterBreak(true);
diff --git a/chrome/browser/ui/views/payments/payment_method_view_controller.cc b/chrome/browser/ui/views/payments/payment_method_view_controller.cc index 8ed67f7..5766ef2 100644 --- a/chrome/browser/ui/views/payments/payment_method_view_controller.cc +++ b/chrome/browser/ui/views/payments/payment_method_view_controller.cc
@@ -22,12 +22,14 @@ #include "components/payments/content/payment_request_state.h" #include "components/payments/core/autofill_payment_instrument.h" #include "components/payments/core/payment_instrument.h" +#include "components/payments/core/strings_util.h" #include "components/strings/grit/components_strings.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/native_theme/native_theme.h" +#include "ui/views/border.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/md_text_button.h" #include "ui/views/layout/box_layout.h" @@ -39,8 +41,8 @@ namespace { -constexpr int kFirstTagValue = static_cast<int>( - payments::PaymentRequestCommonTags::PAYMENT_REQUEST_COMMON_TAG_MAX); +constexpr int kFirstTagValue = + static_cast<int>(PaymentRequestCommonTags::PAYMENT_REQUEST_COMMON_TAG_MAX); enum class PaymentMethodViewControllerTags : int { // The tag for the button that triggers the "add card" flow. Starts at @@ -50,7 +52,7 @@ MAX_TAG, }; -class PaymentMethodListItem : public payments::PaymentRequestItemList::Item { +class PaymentMethodListItem : public PaymentRequestItemList::Item { public: // Does not take ownership of |instrument|, which should not be null and // should outlive this object. |list| is the PaymentRequestItemList object @@ -61,11 +63,11 @@ PaymentRequestItemList* list, PaymentRequestDialogView* dialog, bool selected) - : payments::PaymentRequestItemList::Item(spec, - state, - list, - selected, - /*show_edit_button=*/true), + : PaymentRequestItemList::Item(spec, + state, + list, + selected, + /*show_edit_button=*/true), instrument_(instrument), dialog_(dialog) {} ~PaymentMethodListItem() override {} @@ -90,7 +92,7 @@ NOTREACHED(); } - // payments::PaymentRequestItemList::Item: + // PaymentRequestItemList::Item: std::unique_ptr<views::View> CreateExtraView() override { std::unique_ptr<views::ImageView> card_icon_view = CreateInstrumentIconView( instrument_->icon_resource_id(), instrument_->GetLabel()); @@ -101,14 +103,12 @@ std::unique_ptr<views::View> CreateContentView( base::string16* accessible_content) override { DCHECK(accessible_content); - std::unique_ptr<views::View> card_info_container = - base::MakeUnique<views::View>(); + auto card_info_container = base::MakeUnique<views::View>(); card_info_container->set_can_process_events_within_subtree(false); - std::unique_ptr<views::BoxLayout> box_layout = - base::MakeUnique<views::BoxLayout>( - views::BoxLayout::kVertical, - gfx::Insets(kPaymentRequestRowVerticalInsets, 0)); + auto box_layout = base::MakeUnique<views::BoxLayout>( + views::BoxLayout::kVertical, + gfx::Insets(kPaymentRequestRowVerticalInsets, 0)); box_layout->set_cross_axis_alignment( views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); card_info_container->SetLayoutManager(box_layout.release()); @@ -122,9 +122,8 @@ base::string16 missing_info; if (!instrument_->IsCompleteForPayment()) { missing_info = instrument_->GetMissingInfoLabel(); - std::unique_ptr<views::Label> missing_info_label = - base::MakeUnique<views::Label>(missing_info, - CONTEXT_DEPRECATED_SMALL); + auto missing_info_label = base::MakeUnique<views::Label>( + missing_info, CONTEXT_DEPRECATED_SMALL); missing_info_label->SetEnabledColor( missing_info_label->GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_LinkEnabled)); @@ -166,6 +165,16 @@ DISALLOW_COPY_AND_ASSIGN(PaymentMethodListItem); }; +std::unique_ptr<views::View> CreateHeaderView(const base::string16& text) { + auto label = base::MakeUnique<views::Label>(text); + label->SetMultiLine(true); + label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + label->SetBorder(views::CreateEmptyBorder( + kPaymentRequestRowVerticalInsets, kPaymentRequestRowHorizontalInsets, 0, + kPaymentRequestRowHorizontalInsets)); + return label; +} + } // namespace PaymentMethodViewController::PaymentMethodViewController( @@ -175,12 +184,10 @@ : PaymentRequestSheetController(spec, state, dialog) { const std::vector<std::unique_ptr<PaymentInstrument>>& available_instruments = state->available_instruments(); - for (const std::unique_ptr<PaymentInstrument>& instrument : - available_instruments) { - std::unique_ptr<PaymentMethodListItem> item = - base::MakeUnique<PaymentMethodListItem>( - instrument.get(), spec, state, &payment_method_list_, dialog, - instrument.get() == state->selected_instrument()); + for (const auto& instrument : available_instruments) { + auto item = base::MakeUnique<PaymentMethodListItem>( + instrument.get(), spec, state, &payment_method_list_, dialog, + instrument.get() == state->selected_instrument()); payment_method_list_.AddItem(std::move(item)); } } @@ -193,7 +200,17 @@ } void PaymentMethodViewController::FillContentView(views::View* content_view) { - content_view->SetLayoutManager(new views::FillLayout); + auto layout = base::MakeUnique<views::BoxLayout>(views::BoxLayout::kVertical); + layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); + layout->set_cross_axis_alignment( + views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH); + content_view->SetLayoutManager(layout.release()); + + base::string16 sub_header = + GetCardTypesAreAcceptedText(spec()->supported_card_types_set()); + if (!sub_header.empty()) + content_view->AddChildView(CreateHeaderView(sub_header).release()); + std::unique_ptr<views::View> list_view = payment_method_list_.CreateListView(); list_view->set_id( @@ -203,7 +220,7 @@ std::unique_ptr<views::View> PaymentMethodViewController::CreateExtraFooterView() { - std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); + auto extra_view = base::MakeUnique<views::View>(); extra_view->SetLayoutManager( new views::BoxLayout(views::BoxLayout::kHorizontal, gfx::Insets(),
diff --git a/chrome/browser/ui/views/payments/payment_request_browsertest_base.h b/chrome/browser/ui/views/payments/payment_request_browsertest_base.h index 4dc2c35..98dfb427 100644 --- a/chrome/browser/ui/views/payments/payment_request_browsertest_base.h +++ b/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
@@ -28,7 +28,7 @@ namespace autofill { class AutofillProfile; class CreditCard; -} +} // namespace autofill namespace content { class WebContents;
diff --git a/chrome/browser/ui/views/payments/payment_request_debit_browsertest.cc b/chrome/browser/ui/views/payments/payment_request_debit_browsertest.cc new file mode 100644 index 0000000..eca18710 --- /dev/null +++ b/chrome/browser/ui/views/payments/payment_request_debit_browsertest.cc
@@ -0,0 +1,116 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/macros.h" +#include "base/strings/utf_string_conversions.h" +#include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" +#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" +#include "components/autofill/core/browser/autofill_test_utils.h" +#include "components/autofill/core/browser/credit_card.h" +#include "content/public/test/browser_test_utils.h" + +namespace payments { + +constexpr auto CREDIT = ::autofill::CreditCard::CardType::CARD_TYPE_CREDIT; +constexpr auto DEBIT = ::autofill::CreditCard::CardType::CARD_TYPE_DEBIT; +constexpr auto PREPAID = ::autofill::CreditCard::CardType::CARD_TYPE_PREPAID; +constexpr auto UNKNOWN = ::autofill::CreditCard::CardType::CARD_TYPE_UNKNOWN; + +// Tests for a merchant that requests a debit card. +class PaymentRequestDebitTest : public PaymentRequestBrowserTestBase { + protected: + PaymentRequestDebitTest() + : PaymentRequestBrowserTestBase("/payment_request_debit_test.html") {} + + const std::string& GetOrCreateBillingAddressId() { + if (billing_address_id_.empty()) { + autofill::AutofillProfile billing_address = + autofill::test::GetFullProfile(); + billing_address_id_ = billing_address.guid(); + AddAutofillProfile(billing_address); + } + return billing_address_id_; + } + + void AddServerCardWithType(autofill::CreditCard::CardType card_type) { + autofill::CreditCard card = autofill::test::GetMaskedServerCard(); + card.set_card_type(card_type); + card.set_billing_address_id(GetOrCreateBillingAddressId()); + AddCreditCard(card); + } + + void CallCanMakePayment() { + ResetEventObserver(DialogEvent::CAN_MAKE_PAYMENT_CALLED); + ASSERT_TRUE( + content::ExecuteScript(GetActiveWebContents(), "canMakePayment();")); + WaitForObservedEvent(); + } + + private: + std::string billing_address_id_; + + DISALLOW_COPY_AND_ASSIGN(PaymentRequestDebitTest); +}; + +IN_PROC_BROWSER_TEST_F(PaymentRequestDebitTest, CanMakePaymentWithDebitCard) { + AddServerCardWithType(DEBIT); + CallCanMakePayment(); + ExpectBodyContains({"true"}); +} + +IN_PROC_BROWSER_TEST_F(PaymentRequestDebitTest, + CanMakePaymentWithUnknownCardType) { + AddServerCardWithType(UNKNOWN); + CallCanMakePayment(); + ExpectBodyContains({"true"}); +} + +IN_PROC_BROWSER_TEST_F(PaymentRequestDebitTest, + CannotMakePaymentWithCreditAndPrepaidCard) { + AddServerCardWithType(CREDIT); + AddServerCardWithType(PREPAID); + CallCanMakePayment(); + ExpectBodyContains({"false"}); +} + +IN_PROC_BROWSER_TEST_F(PaymentRequestDebitTest, DebitCardIsPreselected) { + AddServerCardWithType(DEBIT); + CallCanMakePayment(); + InvokePaymentRequestUI(); + EXPECT_TRUE(IsPayButtonEnabled()); + ClickOnCancel(); +} + +IN_PROC_BROWSER_TEST_F(PaymentRequestDebitTest, + UnknownCardTypeIsNotPreselected) { + AddServerCardWithType(UNKNOWN); + InvokePaymentRequestUI(); + EXPECT_FALSE(IsPayButtonEnabled()); + ClickOnCancel(); +} + +IN_PROC_BROWSER_TEST_F(PaymentRequestDebitTest, PayWithLocalCard) { + // All local cards have "unknown" card type by design. + autofill::CreditCard card = autofill::test::GetCreditCard(); + card.set_billing_address_id(GetOrCreateBillingAddressId()); + AddCreditCard(card); + InvokePaymentRequestUI(); + + // The local card of "unknown" type is not pre-selected. + EXPECT_FALSE(IsPayButtonEnabled()); + + // Select the local card and click the "Pay" button. + OpenPaymentMethodScreen(); + ResetEventObserver(DialogEvent::BACK_NAVIGATION); + ClickOnChildInListViewAndWait(/*child_index=*/0, /*num_children=*/1, + DialogViewID::PAYMENT_METHOD_SHEET_LIST_VIEW); + EXPECT_TRUE(IsPayButtonEnabled()); + + // Type in the CVC number and verify that it's sent to the page. + ResetEventObserver(DialogEvent::DIALOG_CLOSED); + PayWithCreditCardAndWait(base::ASCIIToUTF16("012")); + ExpectBodyContains({"\"cardSecurityCode\": \"012\""}); +} + +} // namespace payments
diff --git a/chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h b/chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h index cb44b09..43ff099 100644 --- a/chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h +++ b/chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h
@@ -49,7 +49,7 @@ // The following are Label objects. SHIPPING_OPTION_DESCRIPTION, SHIPPING_OPTION_AMOUNT, - SHIPPING_ADDRESS_OPTION_ERROR, + SHIPPING_ADDRESS_SECTION_HEADER_LABEL, // Used in profile labels to annotate each line of the grouping. PROFILE_LABEL_LINE_1,
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc index 2bfa4797..dc8e501 100644 --- a/chrome/browser/ui/views/payments/payment_request_views_util.cc +++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -375,7 +375,11 @@ std::unique_ptr<views::Label> shipping_label = emphasize_label ? CreateMediumLabel(text) : base::MakeUnique<views::Label>(text); - shipping_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + // Strings from the website may not match the locale of the device, so align + // them according to the language of the text. This will result, for + // example, in "he" labels being right-aligned in a browser that's using + // "en" locale. + shipping_label->SetHorizontalAlignment(gfx::ALIGN_TO_HEAD); shipping_label->set_id( static_cast<int>(DialogViewID::SHIPPING_OPTION_DESCRIPTION)); container->AddChildView(shipping_label.release());
diff --git a/chrome/browser/ui/views/payments/profile_list_view_controller.cc b/chrome/browser/ui/views/payments/profile_list_view_controller.cc index 9be4e98..a0ae9f3 100644 --- a/chrome/browser/ui/views/payments/profile_list_view_controller.cc +++ b/chrome/browser/ui/views/payments/profile_list_view_controller.cc
@@ -31,8 +31,8 @@ namespace { -constexpr int kFirstTagValue = static_cast<int>( - payments::PaymentRequestCommonTags::PAYMENT_REQUEST_COMMON_TAG_MAX); +constexpr int kFirstTagValue = + static_cast<int>(PaymentRequestCommonTags::PAYMENT_REQUEST_COMMON_TAG_MAX); enum class PaymentMethodViewControllerTags : int { // The tag for the button that triggers the "add address" flow. Starts at @@ -56,17 +56,17 @@ ProfileListViewController* controller, PaymentRequestDialogView* dialog, bool selected) - : payments::PaymentRequestItemList::Item(spec, - state, - parent_list, - selected, - /*show_edit_button=*/true), + : PaymentRequestItemList::Item(spec, + state, + parent_list, + selected, + /*show_edit_button=*/true), controller_(controller), profile_(profile) {} ~ProfileItem() override {} private: - // payments::PaymentRequestItemList::Item: + // PaymentRequestItemList::Item: std::unique_ptr<views::View> CreateContentView( base::string16* accessible_content) override { DCHECK(profile_); @@ -165,39 +165,54 @@ return DialogViewID::SHIPPING_ADDRESS_SHEET_LIST_VIEW; } + // Creates a warning message when address is not valid or an informational + // message when the user has not selected their shipping address yet. The + // warning icon is displayed only for warning messages. + // --------------------------------------------- + // | Warning icon | Warning message | + // --------------------------------------------- std::unique_ptr<views::View> CreateHeaderView() override { - if (spec()->selected_shipping_option_error().empty()) + if (!spec()->details().shipping_options.empty()) return nullptr; - std::unique_ptr<views::View> header_view = base::MakeUnique<views::View>(); - // 8 pixels between the warning icon view and the text. + auto header_view = base::MakeUnique<views::View>(); + // 8 pixels between the warning icon view (if present) and the text. constexpr int kRowHorizontalSpacing = 8; - views::BoxLayout* layout = new views::BoxLayout( + auto layout = base::MakeUnique<views::BoxLayout>( views::BoxLayout::kHorizontal, - gfx::Insets(0, payments::kPaymentRequestRowHorizontalInsets), + gfx::Insets(0, kPaymentRequestRowHorizontalInsets), kRowHorizontalSpacing); layout->set_main_axis_alignment( views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); layout->set_cross_axis_alignment( views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH); - header_view->SetLayoutManager(layout); + header_view->SetLayoutManager(layout.release()); - std::unique_ptr<views::ImageView> warning_icon = - base::MakeUnique<views::ImageView>(); - warning_icon->set_can_process_events_within_subtree(false); - warning_icon->SetImage(gfx::CreateVectorIcon( - ui::kWarningIcon, 16, - warning_icon->GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_AlertSeverityHigh))); - header_view->AddChildView(warning_icon.release()); - - std::unique_ptr<views::Label> label = base::MakeUnique<views::Label>( - spec()->selected_shipping_option_error()); + auto label = base::MakeUnique<views::Label>( + spec()->selected_shipping_option_error().empty() + ? GetShippingAddressSelectorInfoMessage(spec()->shipping_type()) + : spec()->selected_shipping_option_error()); + // If the warning message comes from the websites, then align label + // according to the language of the website's text. + label->SetHorizontalAlignment( + spec()->selected_shipping_option_error().empty() ? gfx::ALIGN_LEFT + : gfx::ALIGN_TO_HEAD); label->set_id( - static_cast<int>(DialogViewID::SHIPPING_ADDRESS_OPTION_ERROR)); - label->SetEnabledColor(label->GetNativeTheme()->GetSystemColor( - ui::NativeTheme::kColorId_AlertSeverityHigh)); + static_cast<int>(DialogViewID::SHIPPING_ADDRESS_SECTION_HEADER_LABEL)); label->SetMultiLine(true); + + if (!spec()->selected_shipping_option_error().empty()) { + auto warning_icon = base::MakeUnique<views::ImageView>(); + warning_icon->set_can_process_events_within_subtree(false); + warning_icon->SetImage(gfx::CreateVectorIcon( + ui::kWarningIcon, 16, + warning_icon->GetNativeTheme()->GetSystemColor( + ui::NativeTheme::kColorId_AlertSeverityHigh))); + header_view->AddChildView(warning_icon.release()); + label->SetEnabledColor(label->GetNativeTheme()->GetSystemColor( + ui::NativeTheme::kColorId_AlertSeverityHigh)); + } + header_view->AddChildView(label.release()); return header_view; } @@ -369,11 +384,11 @@ } void ProfileListViewController::FillContentView(views::View* content_view) { - views::BoxLayout* layout = new views::BoxLayout(views::BoxLayout::kVertical); + auto layout = base::MakeUnique<views::BoxLayout>(views::BoxLayout::kVertical); layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); layout->set_cross_axis_alignment( views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH); - content_view->SetLayoutManager(layout); + content_view->SetLayoutManager(layout.release()); std::unique_ptr<views::View> header_view = CreateHeaderView(); if (header_view) content_view->AddChildView(header_view.release()); @@ -384,7 +399,7 @@ std::unique_ptr<views::View> ProfileListViewController::CreateExtraFooterView() { - std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); + auto extra_view = base::MakeUnique<views::View>(); extra_view->SetLayoutManager( new views::BoxLayout(views::BoxLayout::kHorizontal, gfx::Insets(),
diff --git a/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc index 28b9b73..83ca2241 100644 --- a/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc +++ b/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc
@@ -51,10 +51,9 @@ // Go to the shipping address screen and select the first address (MI state). OpenShippingAddressSectionScreen(); - // There is no error at the top of this screen, because no address has been - // selected yet. - EXPECT_EQ(nullptr, dialog_view()->GetViewByID(static_cast<int>( - DialogViewID::SHIPPING_ADDRESS_OPTION_ERROR))); + EXPECT_EQ(base::ASCIIToUTF16( + "To see shipping methods and requirements, select an address"), + GetLabelText(DialogViewID::SHIPPING_ADDRESS_SECTION_HEADER_LABEL)); ResetEventObserverForSequence(std::list<DialogEvent>{ DialogEvent::SPEC_DONE_UPDATING, DialogEvent::BACK_NAVIGATION}); @@ -99,7 +98,7 @@ // The address selector has this error. EXPECT_EQ(base::ASCIIToUTF16("We do not ship to this address"), - GetLabelText(DialogViewID::SHIPPING_ADDRESS_OPTION_ERROR)); + GetLabelText(DialogViewID::SHIPPING_ADDRESS_SECTION_HEADER_LABEL)); // There is no a longer shipping option section, because no shipping options // are available for Canada. @@ -108,7 +107,6 @@ EXPECT_EQ(nullptr, dialog_view()->GetViewByID(static_cast<int>( DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION_BUTTON))); - } } // namespace payments
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 8b8d0b3..fbdc0bc 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -162,6 +162,7 @@ #include "chrome/browser/ui/sync/sync_promo_ui.h" #include "chrome/browser/ui/webui/signin/inline_login_ui.h" #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" +#include "chrome/browser/ui/webui/signin/signin_dice_internals_ui.h" #include "chrome/browser/ui/webui/signin/signin_email_confirmation_ui.h" #include "chrome/browser/ui/webui/signin/signin_error_ui.h" #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" @@ -396,6 +397,12 @@ extensions::ExtensionSystem::Get(profile)->extension_service()) { return &NewWebUI<AppLauncherPageUI>; } + // Desktop Identity Consistency is only available on Windows, Linux and macOS. + if (url.host() == chrome::kChromeUISigninDiceInternalsHost && + !profile->IsOffTheRecord() && + switches::IsAccountConsistencyDiceEnabled()) { + return &NewWebUI<SigninDiceInternalsUI>; + } #endif // defined(OS_CHROMEOS) // Bookmarks are part of NTP on Android.
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc index 01180d1..2182bd9 100644 --- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -1492,6 +1492,8 @@ IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTERS_NEARBY_TITLE}, {"addPrintersManuallyTitle", IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTERS_MANUALLY_TITLE}, + {"selectManufacturerAndModelTitle", + IDS_SETTINGS_PRINTING_CUPS_SELECT_MANUFACTURER_AND_MODEL_TITLE}, {"cancelButtonText", IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTER_BUTTON_CANCEL}, {"addPrinterButtonText", IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTER_BUTTON_ADD}, {"printerDetailsAdvanced", IDS_SETTINGS_PRINTING_CUPS_PRINTER_ADVANCED},
diff --git a/chrome/browser/ui/webui/signin/signin_dice_internals_handler.cc b/chrome/browser/ui/webui/signin/signin_dice_internals_handler.cc new file mode 100644 index 0000000..77e3d49 --- /dev/null +++ b/chrome/browser/ui/webui/signin/signin_dice_internals_handler.cc
@@ -0,0 +1,27 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/signin/signin_dice_internals_handler.h" + +#include "base/values.h" +#include "chrome/browser/profiles/profile.h" + +SigninDiceInternalsHandler::SigninDiceInternalsHandler(Profile* profile) + : profile_(profile) { + DCHECK(profile_); + DCHECK(!profile_->IsOffTheRecord()); +} + +SigninDiceInternalsHandler::~SigninDiceInternalsHandler() {} + +void SigninDiceInternalsHandler::RegisterMessages() { + web_ui()->RegisterMessageCallback( + "enableSync", base::Bind(&SigninDiceInternalsHandler::HandleEnableSync, + base::Unretained(this))); +} + +void SigninDiceInternalsHandler::HandleEnableSync(const base::ListValue* args) { + // TODO(msarda): Implement start syncing. + VLOG(1) << "[Dice] Start syncing"; +}
diff --git a/chrome/browser/ui/webui/signin/signin_dice_internals_handler.h b/chrome/browser/ui/webui/signin/signin_dice_internals_handler.h new file mode 100644 index 0000000..b9230a8 --- /dev/null +++ b/chrome/browser/ui/webui/signin/signin_dice_internals_handler.h
@@ -0,0 +1,33 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_DICE_INTERNALS_HANDLER_H_ +#define CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_DICE_INTERNALS_HANDLER_H_ + +#include "base/macros.h" +#include "content/public/browser/web_ui_message_handler.h" + +namespace base { +class ListValue; +} +class Profile; + +class SigninDiceInternalsHandler : public content::WebUIMessageHandler { + public: + explicit SigninDiceInternalsHandler(Profile* profile); + ~SigninDiceInternalsHandler() override; + + // content::WebUIMessageHandler: + void RegisterMessages() override; + + private: + // Handler for enable sync event. + void HandleEnableSync(const base::ListValue* args); + + Profile* profile_; + + DISALLOW_COPY_AND_ASSIGN(SigninDiceInternalsHandler); +}; + +#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_DICE_INTERNALS_HANDLER_H_
diff --git a/chrome/browser/ui/webui/signin/signin_dice_internals_ui.cc b/chrome/browser/ui/webui/signin/signin_dice_internals_ui.cc new file mode 100644 index 0000000..5b936a2 --- /dev/null +++ b/chrome/browser/ui/webui/signin/signin_dice_internals_ui.cc
@@ -0,0 +1,31 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/signin/signin_dice_internals_ui.h" + +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/webui/signin/signin_dice_internals_handler.h" +#include "chrome/common/url_constants.h" +#include "chrome/grit/browser_resources.h" +#include "components/grit/components_resources.h" +#include "content/public/browser/web_ui.h" +#include "content/public/browser/web_ui_data_source.h" + +SigninDiceInternalsUI::SigninDiceInternalsUI(content::WebUI* web_ui) + : WebUIController(web_ui) { + Profile* profile = Profile::FromWebUI(web_ui); + DCHECK(!profile->IsOffTheRecord()); + + content::WebUIDataSource* source = content::WebUIDataSource::Create( + chrome::kChromeUISigninDiceInternalsHost); + source->AddResourcePath("signin_dice_internals.js", + IDR_SIGNIN_DICE_INTERNALS_JS); + source->SetDefaultResource(IDR_SIGNIN_DICE_INTERNALS_HTML); + content::WebUIDataSource::Add(profile, source); + + web_ui->AddMessageHandler( + base::MakeUnique<SigninDiceInternalsHandler>(profile)); +} + +SigninDiceInternalsUI::~SigninDiceInternalsUI() {}
diff --git a/chrome/browser/ui/webui/signin/signin_dice_internals_ui.h b/chrome/browser/ui/webui/signin/signin_dice_internals_ui.h new file mode 100644 index 0000000..106f9506 --- /dev/null +++ b/chrome/browser/ui/webui/signin/signin_dice_internals_ui.h
@@ -0,0 +1,21 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_DICE_INTERNALS_UI_H_ +#define CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_DICE_INTERNALS_UI_H_ + +#include "base/macros.h" +#include "content/public/browser/web_ui_controller.h" + +// The implementation for the chrome://signin-dice-internals page. +class SigninDiceInternalsUI : public content::WebUIController { + public: + explicit SigninDiceInternalsUI(content::WebUI* web_ui); + ~SigninDiceInternalsUI() override; + + private: + DISALLOW_COPY_AND_ASSIGN(SigninDiceInternalsUI); +}; + +#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_DICE_INTERNALS_UI_H_
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc index 17791d72..e32f4bb9 100644 --- a/chrome/common/crash_keys.cc +++ b/chrome/common/crash_keys.cc
@@ -112,6 +112,8 @@ {kApValue, kSmallSize}, {kCohortName, kSmallSize}, #endif // defined(OS_WIN) + +// gpu #if !defined(OS_ANDROID) {gpu::crash_keys::kGPUVendorID, kSmallSize}, {gpu::crash_keys::kGPUDeviceID, kSmallSize}, @@ -125,6 +127,10 @@ {gpu::crash_keys::kGPUVendor, kSmallSize}, {gpu::crash_keys::kGPURenderer, kSmallSize}, #endif + // Temporary for https://crbug.com/729483. + // TODO(sunnyps): Remove after https://crbug.com/729483 is fixed. + {gpu::crash_keys::kGpuChannelFilterTrace, crash_keys::kMediumSize}, + {gpu::crash_keys::kMediaGpuChannelFilterTrace, crash_keys::kMediumSize}, // content/: {"bad_message_reason", kSmallSize}, @@ -169,7 +175,7 @@ {"channel_error_bt", kMediumSize}, {"remove_route_bt", kMediumSize}, {"rwhvm_window", kMediumSize}, - // media/: +// media/: #endif {kBug464926CrashKey, kSmallSize}, {kViewCount, kSmallSize},
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index 28fe0e1..86be9bc 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc
@@ -159,7 +159,6 @@ #endif #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif @@ -274,6 +273,11 @@ const char kChromeUIPrintHost[] = "print"; #endif // ENABLE_PRINT_PREVIEW +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +const char kChromeUIDiscardsHost[] = "discards"; +const char kChromeUISigninDiceInternalsHost[] = "signin-dice-internals"; +#endif + #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) const char kChromeUILinuxProxyConfigHost[] = "linux-proxy-config"; #endif
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index c6221cf..17e539b 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h
@@ -146,7 +146,6 @@ #endif #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif @@ -258,6 +257,11 @@ extern const char kChromeUIPrintHost[]; #endif // ENABLE_PRINT_PREVIEW +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +extern const char kChromeUISigninDiceInternalsHost[]; +extern const char kChromeUIDiscardsHost[]; +#endif + #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) extern const char kChromeUILinuxProxyConfigHost[]; #endif
diff --git a/chrome/gpu/chrome_arc_video_decode_accelerator.cc b/chrome/gpu/chrome_arc_video_decode_accelerator.cc index dc183f4a..16715b663 100644 --- a/chrome/gpu/chrome_arc_video_decode_accelerator.cc +++ b/chrome/gpu/chrome_arc_video_decode_accelerator.cc
@@ -295,11 +295,6 @@ return; } CreateInputRecord(bitstream_buffer_id, index, metadata.timestamp); - // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763. - // TODO(rockot): This fd comes from a mojo::ScopedHandle in - // GpuArcVideoService::BindSharedMemory. That should be passed through, - // rather than pulling out the fd. https://crbug.com/713763. - // TODO(rockot): Pass through a real size rather than |0|. base::UnguessableToken guid = base::UnguessableToken::Create(); vda_->Decode(media::BitstreamBuffer( bitstream_buffer_id,
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 2b81188a..524bc193 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2061,6 +2061,7 @@ "../browser/ui/views/payments/payment_request_can_make_payment_metrics_browsertest.cc", "../browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc", "../browser/ui/views/payments/payment_request_data_url_browsertest.cc", + "../browser/ui/views/payments/payment_request_debit_browsertest.cc", "../browser/ui/views/payments/payment_request_journey_logger_browsertest.cc", "../browser/ui/views/payments/payment_request_payment_app_browsertest.cc", "../browser/ui/views/payments/payment_request_payment_response_browsertest.cc",
diff --git a/chrome/test/data/payments/debit.js b/chrome/test/data/payments/debit.js new file mode 100644 index 0000000..f8f293c2c --- /dev/null +++ b/chrome/test/data/payments/debit.js
@@ -0,0 +1,65 @@ +/* + * Copyright 2017 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * Builds a payment request for a debit card. + * @return {!PaymentRequest} A payment request for a debit card. + * @private + */ +function buildPaymentRequest() { + return new PaymentRequest([{ + supportedMethods: ['basic-card'], + data: { + supportedTypes: ['debit'], + }, + }], { + total: { + label: 'Total', + amount: { + currency: 'USD', + value: '1.00', + }, + }, + }); +} + +/** Requests payment via a debit card. */ +function buy() { // eslint-disable-line no-unused-vars + try { + buildPaymentRequest() + .show() + .then(function(response) { + response.complete() + .then(function() { + print(JSON.stringify(response, undefined, 2)); + }) + .catch(function(error) { + print(error); + }); + }) + .catch(function(error) { + print(error); + }); + } catch (error) { + print(error); + } +} + +/** Checks whether payment via a debit card is possible. */ +function canMakePayment() { // eslint-disable-line no-unused-vars + try { + buildPaymentRequest() + .canMakePayment() + .then(function(result) { + print(result); + }) + .catch(function(error) { + print(error); + }); + } catch (error) { + print(error); + } +}
diff --git a/chrome/test/data/payments/payment_request_debit_test.html b/chrome/test/data/payments/payment_request_debit_test.html new file mode 100644 index 0000000..33c8ae5c --- /dev/null +++ b/chrome/test/data/payments/payment_request_debit_test.html
@@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- +Copyright 2017 The Chromium Authors. All rights reserved. +Use of this source code is governed by a BSD-style license that can be +found in the LICENSE file. +--> +<html> + +<head> + <title>Debit Test</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" type="text/css" href="style.css"> +</head> + +<body> + <div><button onclick="buy()" id="buy">Debit Buy Test</button></div> + <div><button onclick="canMakePayment()" id="canMakePayment">Debit + CanMakePayment Test</button></div> + <pre id="result"></pre> + <script src="util.js"></script> + <script src="debit.js"></script> +</body> + +</html>
diff --git a/chromecast/media/base/decrypt_context_impl_clearkey.cc b/chromecast/media/base/decrypt_context_impl_clearkey.cc index e3c8cc7..29c9b24 100644 --- a/chromecast/media/base/decrypt_context_impl_clearkey.cc +++ b/chromecast/media/base/decrypt_context_impl_clearkey.cc
@@ -51,11 +51,7 @@ output += data_offset; // Get the key. - std::string raw_key; - if (!key_->GetRawKey(&raw_key)) { - LOG(ERROR) << "Failed to get the underlying AES key"; - return false; - } + const std::string& raw_key = key_->key(); DCHECK_EQ(static_cast<int>(raw_key.length()), AES_BLOCK_SIZE); const uint8_t* key_u8 = reinterpret_cast<const uint8_t*>(raw_key.data()); AES_KEY aes_key;
diff --git a/chromeos/login/auth/key.cc b/chromeos/login/auth/key.cc index e9dada2..10180645 100644 --- a/chromeos/login/auth/key.cc +++ b/chromeos/login/auth/key.cc
@@ -94,9 +94,7 @@ crypto::SymmetricKey::DeriveKeyFromPassword( crypto::SymmetricKey::AES, secret_, salt, kNumIterations, kKeySizeInBits)); - std::string raw_secret; - key->GetRawKey(&raw_secret); - base::Base64Encode(raw_secret, &secret_); + base::Base64Encode(key->key(), &secret_); break; } case KEY_TYPE_SALTED_SHA256:
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc index 33dc123..0e343a8 100644 --- a/components/autofill/core/browser/credit_card.cc +++ b/components/autofill/core/browser/credit_card.cc
@@ -103,6 +103,7 @@ CreditCard::CreditCard(const std::string& guid, const std::string& origin) : AutofillDataModel(guid, origin), record_type_(LOCAL_CARD), + card_type_(CARD_TYPE_UNKNOWN), network_(kGenericCard), expiration_month_(0), expiration_year_(0), @@ -490,6 +491,7 @@ return; record_type_ = credit_card.record_type_; + card_type_ = credit_card.card_type_; number_ = credit_card.number_; name_on_card_ = credit_card.name_on_card_; network_ = credit_card.network_;
diff --git a/components/autofill/core/browser/credit_card.h b/components/autofill/core/browser/credit_card.h index 4dc8bb9..d5cd807c 100644 --- a/components/autofill/core/browser/credit_card.h +++ b/components/autofill/core/browser/credit_card.h
@@ -46,6 +46,17 @@ OK, }; + // The type of the card. Local cards are all CARD_TYPE_UNKNOWN. Server cards + // may have a more specific type. + // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.autofill + // GENERATED_JAVA_CLASS_NAME_OVERRIDE: CardType + enum CardType : int { + CARD_TYPE_UNKNOWN, + CARD_TYPE_CREDIT, + CARD_TYPE_DEBIT, + CARD_TYPE_PREPAID, + }; + CreditCard(const std::string& guid, const std::string& origin); // Creates a server card. The type must be MASKED_SERVER_CARD or @@ -147,6 +158,11 @@ RecordType record_type() const { return record_type_; } void set_record_type(RecordType rt) { record_type_ = rt; } + // Whether this is a credit, debit, or prepaid card. Known only for server + // cards. All local cards are CARD_TYPE_UNKNOWN. + CardType card_type() const { return card_type_; } + void set_card_type(CardType card_type) { card_type_ = card_type; } + // Returns true if there are no values (field types) set. bool IsEmpty(const std::string& app_locale) const; @@ -237,6 +253,7 @@ // See enum definition above. RecordType record_type_; + CardType card_type_; // The card number. For MASKED_SERVER_CARDs, this number will just contain the // last four digits of the card number.
diff --git a/components/autofill/core/browser/personal_data_manager_unittest.cc b/components/autofill/core/browser/personal_data_manager_unittest.cc index 2a1b23d..4225073d 100644 --- a/components/autofill/core/browser/personal_data_manager_unittest.cc +++ b/components/autofill/core/browser/personal_data_manager_unittest.cc
@@ -835,6 +835,27 @@ EXPECT_EQ(0, server_cards[i].Compare(*personal_data_->GetCreditCards()[i])); } +TEST_F(PersonalDataManagerTest, SavesServerCardType) { + EnableWalletCardImport(); + std::vector<CreditCard> server_cards; + server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "a123")); + test::SetCreditCardInfo(&server_cards.back(), "John Dillinger", + "9012" /* Visa */, "01", "2999", "1"); + server_cards.back().SetNetworkForMaskedCard(kVisaCard); + + server_cards.back().set_card_type(CreditCard::CARD_TYPE_DEBIT); + + test::SetServerCreditCards(autofill_table_, server_cards); + personal_data_->Refresh(); + EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()) + .WillOnce(QuitMainMessageLoop()); + base::RunLoop().Run(); + auto cards = personal_data_->GetCreditCards(); + ASSERT_EQ(1U, cards.size()); + + EXPECT_EQ(CreditCard::CARD_TYPE_DEBIT, cards.front()->card_type()); +} + TEST_F(PersonalDataManagerTest, AddProfilesAndCreditCards) { AutofillProfile profile0(base::GenerateGUID(), "https://www.example.com"); test::SetProfileInfo(&profile0,
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc index d98db89..f32cee2 100644 --- a/components/autofill/core/browser/webdata/autofill_table.cc +++ b/components/autofill/core/browser/webdata/autofill_table.cc
@@ -472,6 +472,9 @@ case 72: *update_compatible_version = true; return MigrateToVersion72RenameCardTypeToIssuerNetwork(); + case 73: + *update_compatible_version = false; + return MigrateToVersion73AddServerCardTypeColumn(); } return true; } @@ -1215,11 +1218,12 @@ "metadata.use_count," // 3 "metadata.use_date," // 4 "network," // 5 - "status," // 6 - "name_on_card," // 7 - "exp_month," // 8 - "exp_year," // 9 - "metadata.billing_address_id " // 10 + "type," // 6 + "status," // 7 + "name_on_card," // 8 + "exp_month," // 9 + "exp_year," // 10 + "metadata.billing_address_id " // 11 "FROM masked_credit_cards masked " "LEFT OUTER JOIN unmasked_credit_cards USING (id) " "LEFT OUTER JOIN server_card_metadata metadata USING (id)")); @@ -1256,6 +1260,12 @@ DCHECK_EQ(CreditCard::GetCardNetwork(full_card_number), card_network); } + int card_type = s.ColumnInt(index++); + if (card_type >= CreditCard::CARD_TYPE_UNKNOWN && + card_type <= CreditCard::CARD_TYPE_PREPAID) { + card->set_card_type(static_cast<CreditCard::CardType>(card_type)); + } + card->SetServerStatus(ServerStatusStringToEnum(s.ColumnString(index++))); card->SetRawInfo(CREDIT_CARD_NAME_FULL, s.ColumnString16(index++)); card->SetRawInfo(CREDIT_CARD_EXP_MONTH, s.ColumnString16(index++)); @@ -1273,22 +1283,24 @@ db_->GetUniqueStatement("INSERT INTO masked_credit_cards(" "id," // 0 "network," // 1 - "status," // 2 - "name_on_card," // 3 - "last_four," // 4 - "exp_month," // 5 - "exp_year)" // 6 - "VALUES (?,?,?,?,?,?,?)")); + "type," // 2 + "status," // 3 + "name_on_card," // 4 + "last_four," // 5 + "exp_month," // 6 + "exp_year)" // 7 + "VALUES (?,?,?,?,?,?,?,?)")); for (const CreditCard& card : credit_cards) { DCHECK_EQ(CreditCard::MASKED_SERVER_CARD, card.record_type()); masked_insert.BindString(0, card.server_id()); masked_insert.BindString(1, card.network()); - masked_insert.BindString(2, + masked_insert.BindInt(2, card.card_type()); + masked_insert.BindString(3, ServerStatusEnumToString(card.GetServerStatus())); - masked_insert.BindString16(3, card.GetRawInfo(CREDIT_CARD_NAME_FULL)); - masked_insert.BindString16(4, card.LastFourDigits()); - masked_insert.BindString16(5, card.GetRawInfo(CREDIT_CARD_EXP_MONTH)); - masked_insert.BindString16(6, + masked_insert.BindString16(4, card.GetRawInfo(CREDIT_CARD_NAME_FULL)); + masked_insert.BindString16(5, card.LastFourDigits()); + masked_insert.BindString16(6, card.GetRawInfo(CREDIT_CARD_EXP_MONTH)); + masked_insert.BindString16(7, card.GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR)); masked_insert.Run(); @@ -1355,12 +1367,12 @@ void AutofillTable::AddUnmaskedCreditCard(const std::string& id, const base::string16& full_number) { - sql::Statement s(db_->GetUniqueStatement( - "INSERT INTO unmasked_credit_cards(" - "id," - "card_number_encrypted," - "unmask_date)" - "VALUES (?,?,?)")); + sql::Statement s( + db_->GetUniqueStatement("INSERT INTO unmasked_credit_cards(" + "id," + "card_number_encrypted," + "unmask_date)" + "VALUES (?,?,?)")); s.BindString(0, id); std::string encrypted_data; @@ -1956,7 +1968,8 @@ "network VARCHAR," "last_four VARCHAR," "exp_month INTEGER DEFAULT 0," - "exp_year INTEGER DEFAULT 0)")) { + "exp_year INTEGER DEFAULT 0, " + "type INTEGER DEFAULT 0)")) { NOTREACHED(); return false; } @@ -2599,4 +2612,9 @@ transaction.Commit(); } +bool AutofillTable::MigrateToVersion73AddServerCardTypeColumn() { + return db_->Execute( + "ALTER TABLE masked_credit_cards ADD COLUMN type INTEGER DEFAULT 0"); +} + } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_table.h b/components/autofill/core/browser/webdata/autofill_table.h index 161b033f..4949791 100644 --- a/components/autofill/core/browser/webdata/autofill_table.h +++ b/components/autofill/core/browser/webdata/autofill_table.h
@@ -162,6 +162,8 @@ // name_on_card // network Issuer network of the card. For example, "VISA". Renamed // from "type" in version 72. +// type Card type. One of CreditCard::CardType enum values. +// Added in version 73. // last_four Last four digits of the card number. For de-duping // with locally stored cards and generating descriptions. // exp_month Expiration month: 1-12 @@ -464,6 +466,7 @@ bool MigrateToVersion70AddSyncMetadata(); bool MigrateToVersion71AddHasConvertedAndBillingAddressIdMetadata(); bool MigrateToVersion72RenameCardTypeToIssuerNetwork(); + bool MigrateToVersion73AddServerCardTypeColumn(); // Max data length saved in the table, AKA the maximum length allowed for // form data.
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc index 54e8be78..5f332262 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
@@ -35,7 +35,7 @@ return reinterpret_cast<void*>(&user_data_key); } -const char* CardTypeFromWalletCardType( +const char* CardNetworkFromWalletCardType( sync_pb::WalletMaskedCreditCard::WalletCardType type) { switch (type) { case sync_pb::WalletMaskedCreditCard::AMEX: @@ -60,6 +60,20 @@ } } +CreditCard::CardType CardTypeFromWalletCardClass( + sync_pb::WalletMaskedCreditCard::WalletCardClass card_class) { + switch (card_class) { + case sync_pb::WalletMaskedCreditCard::CREDIT: + return CreditCard::CARD_TYPE_CREDIT; + case sync_pb::WalletMaskedCreditCard::DEBIT: + return CreditCard::CARD_TYPE_DEBIT; + case sync_pb::WalletMaskedCreditCard::PREPAID: + return CreditCard::CARD_TYPE_PREPAID; + default: + return CreditCard::CARD_TYPE_UNKNOWN; + } +} + CreditCard::ServerStatus ServerToLocalStatus( sync_pb::WalletMaskedCreditCard::WalletCardStatus status) { switch (status) { @@ -76,7 +90,8 @@ CreditCard result(CreditCard::MASKED_SERVER_CARD, card.id()); result.SetNumber(base::UTF8ToUTF16(card.last_four())); result.SetServerStatus(ServerToLocalStatus(card.status())); - result.SetNetworkForMaskedCard(CardTypeFromWalletCardType(card.type())); + result.SetNetworkForMaskedCard(CardNetworkFromWalletCardType(card.type())); + result.set_card_type(CardTypeFromWalletCardClass(card.card_class())); result.SetRawInfo(CREDIT_CARD_NAME_FULL, base::UTF8ToUTF16(card.name_on_card())); result.SetExpirationMonth(card.exp_month()); @@ -98,8 +113,7 @@ profile.SetRawInfo(COMPANY_NAME, base::UTF8ToUTF16(address.company_name())); profile.SetRawInfo(ADDRESS_HOME_STATE, base::UTF8ToUTF16(address.address_1())); - profile.SetRawInfo(ADDRESS_HOME_CITY, - base::UTF8ToUTF16(address.address_2())); + profile.SetRawInfo(ADDRESS_HOME_CITY, base::UTF8ToUTF16(address.address_2())); profile.SetRawInfo(ADDRESS_HOME_DEPENDENT_LOCALITY, base::UTF8ToUTF16(address.address_3())); // AutofillProfile doesn't support address_4 ("sub dependent locality"). @@ -192,11 +206,9 @@ AutofillWalletSyncableService::AutofillWalletSyncableService( AutofillWebDataBackend* webdata_backend, const std::string& app_locale) - : webdata_backend_(webdata_backend) { -} + : webdata_backend_(webdata_backend) {} -AutofillWalletSyncableService::~AutofillWalletSyncableService() { -} +AutofillWalletSyncableService::~AutofillWalletSyncableService() {} syncer::SyncMergeResult AutofillWalletSyncableService::MergeDataAndStartSyncing( syncer::ModelType type, @@ -342,10 +354,8 @@ size_t prev_card_count = 0; size_t prev_address_count = 0; bool changed_cards = SetDataIfChanged( - table, wallet_cards, - &AutofillTable::GetServerCreditCards, - &AutofillTable::SetServerCreditCards, - &prev_card_count); + table, wallet_cards, &AutofillTable::GetServerCreditCards, + &AutofillTable::SetServerCreditCards, &prev_card_count); bool changed_addresses = SetDataIfChanged( table, wallet_addresses, &AutofillTable::GetServerProfiles, &AutofillTable::SetServerProfiles, &prev_address_count);
diff --git a/components/feature_engagement_tracker/public/feature_constants.cc b/components/feature_engagement_tracker/public/feature_constants.cc index 6b3448f..d372beca 100644 --- a/components/feature_engagement_tracker/public/feature_constants.cc +++ b/components/feature_engagement_tracker/public/feature_constants.cc
@@ -23,4 +23,9 @@ base::FEATURE_DISABLED_BY_DEFAULT}; #endif // OS_ANDROID +#if defined(OS_WIN) +const base::Feature kIPHNewTabFeature{"IPH_NewTab", + base::FEATURE_DISABLED_BY_DEFAULT}; +#endif // OS_WIN + } // namespace feature_engagement_tracker
diff --git a/components/feature_engagement_tracker/public/feature_constants.h b/components/feature_engagement_tracker/public/feature_constants.h index b5250b4..2c4cc38 100644 --- a/components/feature_engagement_tracker/public/feature_constants.h +++ b/components/feature_engagement_tracker/public/feature_constants.h
@@ -26,6 +26,10 @@ extern const base::Feature kIPHDownloadHomeFeature; #endif // OS_ANDROID +#if defined(OS_WIN) +extern const base::Feature kIPHNewTabFeature; +#endif // OS_WIN + } // namespace feature_engagement_tracker #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_PUBLIC_FEATURE_CONSTANTS_H_
diff --git a/components/feature_engagement_tracker/public/feature_list.cc b/components/feature_engagement_tracker/public/feature_list.cc index 74fb888d..d78eb45 100644 --- a/components/feature_engagement_tracker/public/feature_list.cc +++ b/components/feature_engagement_tracker/public/feature_list.cc
@@ -20,6 +20,9 @@ &kIPHDownloadPageFeature, &kIPHDownloadHomeFeature, #endif // OS_ANDROID +#if defined(OS_WIN) + &kIPHNewTabFeature, +#endif // OS_WIN }; } // namespace
diff --git a/components/feature_engagement_tracker/public/feature_list.h b/components/feature_engagement_tracker/public/feature_list.h index b944137..78642ddb 100644 --- a/components/feature_engagement_tracker/public/feature_list.h +++ b/components/feature_engagement_tracker/public/feature_list.h
@@ -50,6 +50,9 @@ DEFINE_VARIATION_PARAM(kIPHDownloadPageFeature, "IPH_DownloadPage"); DEFINE_VARIATION_PARAM(kIPHDownloadHomeFeature, "IPH_DownloadHome"); #endif // OS_ANDROID +#if defined(OS_WIN) +DEFINE_VARIATION_PARAM(kIPHNewTabFeature, "IPH_NewTab"); +#endif // OS_WIN } // namespace @@ -63,9 +66,11 @@ VARIATION_ENTRY(kIPHDataSaverDetailFeature), VARIATION_ENTRY(kIPHDownloadPageFeature), VARIATION_ENTRY(kIPHDownloadHomeFeature), +#elif defined(OS_WIN) + VARIATION_ENTRY(kIPHNewTabFeature), #else VARIATION_ENTRY(kIPHDummyFeature), // Ensures non-empty array. -#endif // OS_ANDROID +#endif }; #undef DEFINE_VARIATION_PARAM
diff --git a/components/nacl/loader/nacl_ipc_adapter.cc b/components/nacl/loader/nacl_ipc_adapter.cc index 03d41fae..04e62e1 100644 --- a/components/nacl/loader/nacl_ipc_adapter.cc +++ b/components/nacl/loader/nacl_ipc_adapter.cc
@@ -10,10 +10,12 @@ #include <memory> #include <tuple> #include <utility> +#include <vector> #include "base/bind.h" #include "base/location.h" #include "base/macros.h" +#include "base/memory/ptr_util.h" #include "base/memory/shared_memory.h" #include "base/task_runner_util.h" #include "base/tuple.h" @@ -267,7 +269,9 @@ int Read(NaClImcTypedMsgHdr* msg); - void AddDescriptor(NaClDescWrapper* desc) { descs_.push_back(desc); } + void AddDescriptor(std::unique_ptr<NaClDescWrapper> desc) { + descs_.push_back(std::move(desc)); + } size_t desc_count() const { return descs_.size(); } @@ -280,7 +284,7 @@ size_t data_read_cursor_; // Wrapped descriptors for transfer to untrusted code. - ScopedVector<NaClDescWrapper> descs_; + std::vector<std::unique_ptr<NaClDescWrapper>> descs_; }; NaClIPCAdapter::RewrittenMessage::RewrittenMessage() @@ -320,7 +324,7 @@ msg->ndesc_length = desc_count; for (nacl_abi_size_t i = 0; i < desc_count; i++) { // Copy the NaClDesc to the buffer and add a ref so it won't be freed - // when we clear our ScopedVector. + // when we clear our vector. msg->ndescv[i] = descs_[i]->desc(); NaClDescRef(descs_[i]->desc()); } @@ -600,7 +604,7 @@ // No default, so the compiler will warn us if new types get added. } if (nacl_desc.get()) - rewritten_msg->AddDescriptor(nacl_desc.release()); + rewritten_msg->AddDescriptor(std::move(nacl_desc)); } if (new_msg) SaveMessage(*new_msg, std::move(rewritten_msg)); @@ -671,7 +675,7 @@ NACL_ABI_O_RDONLY))); std::unique_ptr<RewrittenMessage> rewritten_msg(new RewrittenMessage); - rewritten_msg->AddDescriptor(desc_wrapper.release()); + rewritten_msg->AddDescriptor(std::move(desc_wrapper)); { base::AutoLock lock(lock_); SaveMessage(*new_msg, std::move(rewritten_msg)); @@ -692,7 +696,7 @@ struct NaClDesc* desc = NaClDescCreateWithFilePathMetadata(handle, file_path_str.c_str()); - rewritten_msg->AddDescriptor(new NaClDescWrapper(desc)); + rewritten_msg->AddDescriptor(base::MakeUnique<NaClDescWrapper>(desc)); { base::AutoLock lock(lock_); SaveMessage(*new_msg, std::move(rewritten_msg));
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.cc b/components/offline_pages/core/prefetch/prefetch_service_impl.cc index e84b846..71691d4 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_impl.cc +++ b/components/offline_pages/core/prefetch/prefetch_service_impl.cc
@@ -26,6 +26,7 @@ suggested_articles_observer_(std::move(suggested_articles_observer)) { prefetch_dispatcher_->SetService(this); prefetch_gcm_handler_->SetService(this); + suggested_articles_observer_->SetPrefetchService(this); } PrefetchServiceImpl::~PrefetchServiceImpl() = default;
diff --git a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc index 96c6783..27590e23 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc +++ b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc
@@ -21,6 +21,10 @@ metrics_collector_ = base::MakeUnique<TestOfflineMetricsCollector>(); dispatcher_ = base::MakeUnique<PrefetchDispatcherImpl>(); gcm_handler_ = base::MakeUnique<TestPrefetchGCMHandler>(); + suggested_articles_observer_ = base::MakeUnique<SuggestedArticlesObserver>(); + // This sets up the testing articles as an empty vector, we can ignore the + // result here. This allows us to not create a ContentSuggestionsService. + suggested_articles_observer_->GetTestingArticles(); } PrefetchServiceTestTaco::~PrefetchServiceTestTaco() = default;
diff --git a/components/offline_pages/core/prefetch/suggested_articles_observer.cc b/components/offline_pages/core/prefetch/suggested_articles_observer.cc index d0fb3ba..5e54194 100644 --- a/components/offline_pages/core/prefetch/suggested_articles_observer.cc +++ b/components/offline_pages/core/prefetch/suggested_articles_observer.cc
@@ -13,6 +13,7 @@ #include "components/offline_pages/core/offline_page_feature.h" #include "components/offline_pages/core/offline_page_item.h" #include "components/offline_pages/core/prefetch/prefetch_dispatcher.h" +#include "components/offline_pages/core/prefetch/prefetch_service.h" #include "components/offline_pages/core/prefetch/prefetch_types.h" using ntp_snippets::Category; @@ -30,17 +31,18 @@ } // namespace -SuggestedArticlesObserver::SuggestedArticlesObserver( - PrefetchDispatcher* dispatcher) - : prefetch_dispatcher_(dispatcher) { - DCHECK(prefetch_dispatcher_); -} - +SuggestedArticlesObserver::SuggestedArticlesObserver() = default; SuggestedArticlesObserver::~SuggestedArticlesObserver() { if (content_suggestions_service_) content_suggestions_service_->RemoveObserver(this); } +void SuggestedArticlesObserver::SetPrefetchService(PrefetchService* service) { + DCHECK(service); + + prefetch_service_ = service; +} + void SuggestedArticlesObserver::SetContentSuggestionsServiceAndObserve( ntp_snippets::ContentSuggestionsService* service) { DCHECK(service); @@ -70,8 +72,8 @@ {suggestion.id().id_within_category(), suggestion.url()}); } - prefetch_dispatcher_->AddCandidatePrefetchURLs(kSuggestedArticlesNamespace, - prefetch_urls); + prefetch_service_->GetPrefetchDispatcher()->AddCandidatePrefetchURLs( + kSuggestedArticlesNamespace, prefetch_urls); } void SuggestedArticlesObserver::OnCategoryStatusChanged( @@ -86,19 +88,20 @@ ntp_snippets::CategoryStatus::CATEGORY_EXPLICITLY_DISABLED || category_status_ == ntp_snippets::CategoryStatus::ALL_SUGGESTIONS_EXPLICITLY_DISABLED) { - prefetch_dispatcher_->RemoveAllUnprocessedPrefetchURLs( - kSuggestedArticlesNamespace); + prefetch_service_->GetPrefetchDispatcher() + ->RemoveAllUnprocessedPrefetchURLs(kSuggestedArticlesNamespace); } } void SuggestedArticlesObserver::OnSuggestionInvalidated( const ContentSuggestion::ID& suggestion_id) { - prefetch_dispatcher_->RemovePrefetchURLsByClientId(ClientId( - kSuggestedArticlesNamespace, suggestion_id.id_within_category())); + prefetch_service_->GetPrefetchDispatcher()->RemovePrefetchURLsByClientId( + ClientId(kSuggestedArticlesNamespace, + suggestion_id.id_within_category())); } void SuggestedArticlesObserver::OnFullRefreshRequired() { - prefetch_dispatcher_->RemoveAllUnprocessedPrefetchURLs( + prefetch_service_->GetPrefetchDispatcher()->RemoveAllUnprocessedPrefetchURLs( kSuggestedArticlesNamespace); OnNewSuggestions(ArticlesCategory()); }
diff --git a/components/offline_pages/core/prefetch/suggested_articles_observer.h b/components/offline_pages/core/prefetch/suggested_articles_observer.h index 0279088..ef7de43 100644 --- a/components/offline_pages/core/prefetch/suggested_articles_observer.h +++ b/components/offline_pages/core/prefetch/suggested_articles_observer.h
@@ -25,11 +25,10 @@ class SuggestedArticlesObserver : public ntp_snippets::ContentSuggestionsService::Observer { public: - // |dispatcher| is unowned, lifetime must be managed by the owner of - // SuggestedArticlesObserver. - SuggestedArticlesObserver(PrefetchDispatcher* dispatcher); + SuggestedArticlesObserver(); ~SuggestedArticlesObserver() override; + void SetPrefetchService(PrefetchService* service); void SetContentSuggestionsServiceAndObserve( ntp_snippets::ContentSuggestionsService* service); @@ -53,8 +52,8 @@ ntp_snippets::ContentSuggestionsService* content_suggestions_service_ = nullptr; - // Unowned. (see constructor comment). - PrefetchDispatcher* prefetch_dispatcher_; + // Unowned, owns |this|. + PrefetchService* prefetch_service_; // Normally null, but can be set in tests to override the default behavior. std::unique_ptr<std::vector<ntp_snippets::ContentSuggestion>> test_articles_;
diff --git a/components/offline_pages/core/prefetch/suggested_articles_observer_unittest.cc b/components/offline_pages/core/prefetch/suggested_articles_observer_unittest.cc index 0b2febb..a9e6a64 100644 --- a/components/offline_pages/core/prefetch/suggested_articles_observer_unittest.cc +++ b/components/offline_pages/core/prefetch/suggested_articles_observer_unittest.cc
@@ -39,7 +39,7 @@ prefetch_service_test_taco_.SetPrefetchDispatcher( base::WrapUnique(test_prefetch_dispatcher_)); prefetch_service_test_taco_.SetSuggestedArticlesObserver( - base::MakeUnique<SuggestedArticlesObserver>(test_prefetch_dispatcher_)); + base::MakeUnique<SuggestedArticlesObserver>()); prefetch_service_test_taco_.CreatePrefetchService(); }
diff --git a/components/omnibox/browser/omnibox_edit_unittest.cc b/components/omnibox/browser/omnibox_edit_unittest.cc index c44e69b..73323e5a 100644 --- a/components/omnibox/browser/omnibox_edit_unittest.cc +++ b/components/omnibox/browser/omnibox_edit_unittest.cc
@@ -185,7 +185,7 @@ std::unique_ptr<AutocompleteProviderClient> TestingOmniboxClient::CreateAutocompleteProviderClient() { std::unique_ptr<MockAutocompleteProviderClient> provider_client( - new MockAutocompleteProviderClient()); + new testing::NiceMock<MockAutocompleteProviderClient>()); EXPECT_CALL(*provider_client.get(), GetBuiltinURLs()) .WillRepeatedly(testing::Return(std::vector<base::string16>())); EXPECT_CALL(*provider_client.get(), GetSchemeClassifier())
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc index 2968c87..969efa5 100644 --- a/components/pairing/bluetooth_host_pairing_controller.cc +++ b/components/pairing/bluetooth_host_pairing_controller.cc
@@ -150,6 +150,29 @@ ptr_factory_.GetWeakPtr())); } +void BluetoothHostPairingController::SendErrorCodeAndMessage() { + if (error_code_ == + static_cast<int>(HostPairingController::ErrorCode::ERROR_NONE)) { + return; + } + + pairing_api::Error error_status; + error_status.set_api_version(kPairingAPIVersion); + error_status.mutable_parameters()->set_code(error_code_); + error_status.mutable_parameters()->set_description(error_message_); + + int size = 0; + scoped_refptr<net::IOBuffer> io_buffer( + ProtoDecoder::SendError(error_status, &size)); + + controller_socket_->Send( + io_buffer, size, + base::Bind(&BluetoothHostPairingController::OnSendComplete, + ptr_factory_.GetWeakPtr()), + base::Bind(&BluetoothHostPairingController::OnSendError, + ptr_factory_.GetWeakPtr())); +} + void BluetoothHostPairingController::Reset() { if (adapter_.get()) { device::BluetoothDevice* device = @@ -476,9 +499,12 @@ void BluetoothHostPairingController::OnNetworkConnectivityChanged( Connectivity connectivity_status) { connectivity_status_ = connectivity_status; - if (connectivity_status == CONNECTIVITY_NONE) + if (connectivity_status == CONNECTIVITY_NONE) { ChangeStage(STAGE_SETUP_NETWORK_ERROR); - SendHostStatus(); + SendErrorCodeAndMessage(); + } else { + SendHostStatus(); + } } void BluetoothHostPairingController::OnUpdateStatusChanged( @@ -497,10 +523,11 @@ enrollment_status_ = enrollment_status; if (enrollment_status == ENROLLMENT_STATUS_SUCCESS) { ChangeStage(STAGE_ENROLLMENT_SUCCESS); + SendHostStatus(); } else if (enrollment_status == ENROLLMENT_STATUS_FAILURE) { ChangeStage(STAGE_ENROLLMENT_ERROR); + SendErrorCodeAndMessage(); } - SendHostStatus(); } void BluetoothHostPairingController::SetPermanentId( @@ -508,6 +535,13 @@ permanent_id_ = permanent_id; } +void BluetoothHostPairingController::SetErrorCodeAndMessage( + int error_code, + const std::string& error_message) { + error_code_ = error_code; + error_message_ = error_message; +} + void BluetoothHostPairingController::RequestPinCode( device::BluetoothDevice* device) { // Disallow unknown device.
diff --git a/components/pairing/bluetooth_host_pairing_controller.h b/components/pairing/bluetooth_host_pairing_controller.h index a9a9d40..8eabce0 100644 --- a/components/pairing/bluetooth_host_pairing_controller.h +++ b/components/pairing/bluetooth_host_pairing_controller.h
@@ -74,6 +74,7 @@ void ChangeStage(Stage new_stage); void SendHostStatus(); + void SendErrorCodeAndMessage(); void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); void SetPowered(); @@ -109,6 +110,8 @@ void OnUpdateStatusChanged(UpdateStatus update_status) override; void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; void SetPermanentId(const std::string& permanent_id) override; + void SetErrorCodeAndMessage(int error_code, + const std::string& error_message) override; void Reset() override; // ProtoDecoder::Observer: @@ -148,6 +151,17 @@ std::string controller_device_address_; bool was_powered_ = false; + // The format of the |error_code_| is: + // [0, "no error"] + // [1*, "network error"] + // [2*, "authentication error"], e.g., [21, "Service unavailable"], ... + // [3*, "enrollment error"], e.g., [31, "DMserver registration error"], ... + // [4*, "other error"] + // The |error_code_| and |error_message_| will pass over to the master device + // to assist error diagnosis. + int error_code_ = 0; + std::string error_message_; + scoped_refptr<device::BluetoothAdapter> adapter_; scoped_refptr<device::BluetoothSocket> service_socket_; scoped_refptr<device::BluetoothSocket> controller_socket_;
diff --git a/components/pairing/fake_host_pairing_controller.cc b/components/pairing/fake_host_pairing_controller.cc index f0300f2..b6bfc5c 100644 --- a/components/pairing/fake_host_pairing_controller.cc +++ b/components/pairing/fake_host_pairing_controller.cc
@@ -141,6 +141,10 @@ const std::string& permanent_id) { } +void FakeHostPairingController::SetErrorCodeAndMessage( + int error_code, + const std::string& error_message) {} + void FakeHostPairingController::Reset() { }
diff --git a/components/pairing/fake_host_pairing_controller.h b/components/pairing/fake_host_pairing_controller.h index 01ae9226..437fbb7 100644 --- a/components/pairing/fake_host_pairing_controller.h +++ b/components/pairing/fake_host_pairing_controller.h
@@ -49,6 +49,8 @@ void OnUpdateStatusChanged(UpdateStatus update_status) override; void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; void SetPermanentId(const std::string& permanent_id) override; + void SetErrorCodeAndMessage(int error_code, + const std::string& error_message) override; void Reset() override; // HostPairingController::Observer:
diff --git a/components/pairing/host_pairing_controller.h b/components/pairing/host_pairing_controller.h index 76fdd66e..4e6b612 100644 --- a/components/pairing/host_pairing_controller.h +++ b/components/pairing/host_pairing_controller.h
@@ -51,6 +51,14 @@ ENROLLMENT_STATUS_SUCCESS, }; + enum class ErrorCode : int { + ERROR_NONE = 0, + NETWORK_ERROR, + AUTH_ERROR, + ENROLL_ERROR, + OTHER_ERROR, + }; + class Observer { public: Observer(); @@ -115,6 +123,9 @@ // Set the permanent id assigned during enrollment. virtual void SetPermanentId(const std::string& permanent_id) = 0; + virtual void SetErrorCodeAndMessage(int error_code, + const std::string& error_message) = 0; + // Reset the controller. virtual void Reset() = 0;
diff --git a/components/payments/content/payment_request_spec.cc b/components/payments/content/payment_request_spec.cc index 252fe150..fc3f5ca5 100644 --- a/components/payments/content/payment_request_spec.cc +++ b/components/payments/content/payment_request_spec.cc
@@ -42,6 +42,21 @@ return std::string(); } +// Returns the card type associated with the given BasicCardType. +autofill::CreditCard::CardType GetBasicCardType( + const mojom::BasicCardType& type) { + switch (type) { + case mojom::BasicCardType::CREDIT: + return autofill::CreditCard::CARD_TYPE_CREDIT; + case mojom::BasicCardType::DEBIT: + return autofill::CreditCard::CARD_TYPE_DEBIT; + case mojom::BasicCardType::PREPAID: + return autofill::CreditCard::CARD_TYPE_PREPAID; + } + NOTREACHED(); + return autofill::CreditCard::CARD_TYPE_UNKNOWN; +} + } // namespace const char kBasicCardMethodName[] = "basic-card"; @@ -159,24 +174,41 @@ PaymentMethodData method_data; method_data.supported_methods = method_data_entry->supported_methods; - // Transfer the supported basic card networks. - std::vector<std::string> supported_networks; + + // Transfer the supported basic card networks (visa, amex) and types + // (credit, debit). for (const mojom::BasicCardNetwork& network : method_data_entry->supported_networks) { - supported_networks.push_back(GetBasicCardNetworkName(network)); + method_data.supported_networks.push_back( + GetBasicCardNetworkName(network)); } - method_data.supported_networks = std::move(supported_networks); + for (const mojom::BasicCardType& type : + method_data_entry->supported_types) { + autofill::CreditCard::CardType card_type = GetBasicCardType(type); + method_data.supported_types.insert(card_type); + supported_card_types_set_.insert(card_type); + } - // TODO(crbug.com/708603): Add browser-side support for - // |method_data.supported_types|. method_data_vector.push_back(std::move(method_data)); } + // TODO(rouslan): Parse card types (credit, debit, prepaid) in data_util, so + // iOS can use it as well. http://crbug.com/602665 data_util::ParseBasicCardSupportedNetworks(method_data_vector, &supported_card_networks_, &basic_card_specified_networks_); supported_card_networks_set_.insert(supported_card_networks_.begin(), supported_card_networks_.end()); + + // Omitting the card types means all 3 card types are supported. + if (supported_card_types_set_.empty()) { + supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_CREDIT); + supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_DEBIT); + supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_PREPAID); + } + + // Let the user decide whether an unknown card type should be used. + supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_UNKNOWN); } void PaymentRequestSpec::UpdateSelectedShippingOption(bool after_update) {
diff --git a/components/payments/content/payment_request_spec.h b/components/payments/content/payment_request_spec.h index c8fd2a6..9170efaf 100644 --- a/components/payments/content/payment_request_spec.h +++ b/components/payments/content/payment_request_spec.h
@@ -13,6 +13,7 @@ #include "base/macros.h" #include "base/observer_list.h" #include "base/strings/string16.h" +#include "components/autofill/core/browser/credit_card.h" #include "components/payments/core/currency_formatter.h" #include "components/payments/core/payment_options_provider.h" #include "third_party/WebKit/public/platform/modules/payments/payment_request.mojom.h" @@ -82,6 +83,10 @@ const { return stringified_method_data_; } + const std::set<autofill::CreditCard::CardType>& supported_card_types_set() + const { + return supported_card_types_set_; + } // Returns whether the |method_name| was specified as supported through the // "basic-card" payment method. If false, it means either the |method_name| is // not supported at all, or specified directly in supportedMethods. @@ -157,6 +162,8 @@ std::vector<std::string> supported_card_networks_; std::set<std::string> supported_card_networks_set_; + std::set<autofill::CreditCard::CardType> supported_card_types_set_; + // Only the set of basic-card specified networks. NOTE: callers should use // |supported_card_networks_set_| to check merchant support. std::set<std::string> basic_card_specified_networks_;
diff --git a/components/payments/content/payment_request_state.cc b/components/payments/content/payment_request_state.cc index 47a068ec..740a4d6 100644 --- a/components/payments/content/payment_request_state.cc +++ b/components/payments/content/payment_request_state.cc
@@ -77,11 +77,10 @@ } bool PaymentRequestState::CanMakePayment() const { - for (const std::unique_ptr<PaymentInstrument>& instrument : - available_instruments_) { + for (const auto& instrument : available_instruments_) { if (instrument->IsValidForCanMakePayment()) { // AddAutofillPaymentInstrument() filters out available instruments based - // on supported card networks. + // on supported card networks (visa, amex) and types (credit, debit). DCHECK(spec_->supported_card_networks_set().find( instrument->method_name()) != spec_->supported_card_networks_set().end()); @@ -144,15 +143,26 @@ std::string basic_card_network = autofill::data_util::GetPaymentRequestData(card.network()) .basic_card_issuer_network; - if (!spec_->supported_card_networks_set().count(basic_card_network)) + if (!spec_->supported_card_networks_set().count(basic_card_network) || + !spec_->supported_card_types_set().count(card.card_type())) { return; + } + + // The total number of card types: credit, debit, prepaid, unknown. + constexpr size_t kTotalNumberOfCardTypes = 4U; + + // Whether the card type (credit, debit, prepaid) matches thetype that the + // merchant has requested exactly. This should be false for unknown card + // types, if the merchant cannot accept some card types. + bool matches_merchant_card_type_exactly = + card.card_type() != autofill::CreditCard::CARD_TYPE_UNKNOWN || + spec_->supported_card_types_set().size() == kTotalNumberOfCardTypes; // AutofillPaymentInstrument makes a copy of |card| so it is effectively // owned by this object. - std::unique_ptr<PaymentInstrument> instrument = - base::MakeUnique<AutofillPaymentInstrument>( - basic_card_network, card, shipping_profiles_, app_locale_, - payment_request_delegate_); + auto instrument = base::MakeUnique<AutofillPaymentInstrument>( + basic_card_network, card, matches_merchant_card_type_exactly, + shipping_profiles_, app_locale_, payment_request_delegate_); available_instruments_.push_back(std::move(instrument)); if (selected) @@ -293,7 +303,8 @@ auto first_complete_instrument = std::find_if(instruments.begin(), instruments.end(), [](const std::unique_ptr<PaymentInstrument>& instrument) { - return instrument->IsCompleteForPayment(); + return instrument->IsCompleteForPayment() && + instrument->IsExactlyMatchingMerchantRequest(); }); selected_instrument_ = first_complete_instrument == instruments.end() ? nullptr
diff --git a/components/payments/content/payment_response_helper_unittest.cc b/components/payments/content/payment_response_helper_unittest.cc index d21dac6..4d5d122 100644 --- a/components/payments/content/payment_response_helper_unittest.cc +++ b/components/payments/content/payment_response_helper_unittest.cc
@@ -37,8 +37,8 @@ visa_card.set_billing_address_id(address_.guid()); visa_card.set_use_count(5u); autofill_instrument_ = base::MakeUnique<AutofillPaymentInstrument>( - "visa", visa_card, billing_addresses_, "en-US", - &test_payment_request_delegate_); + "visa", visa_card, /*matches_merchant_card_type_exactly=*/true, + billing_addresses_, "en-US", &test_payment_request_delegate_); } ~PaymentResponseHelperTest() override {}
diff --git a/components/payments/core/BUILD.gn b/components/payments/core/BUILD.gn index eaa3d41..5ceb667 100644 --- a/components/payments/core/BUILD.gn +++ b/components/payments/core/BUILD.gn
@@ -86,6 +86,7 @@ "payment_method_data_unittest.cc", "payment_request_data_util_unittest.cc", "payments_profile_comparator_unittest.cc", + "strings_util_unittest.cc", "subkey_requester_unittest.cc", ]
diff --git a/components/payments/core/autofill_payment_instrument.cc b/components/payments/core/autofill_payment_instrument.cc index 82ff24d..2d935ea 100644 --- a/components/payments/core/autofill_payment_instrument.cc +++ b/components/payments/core/autofill_payment_instrument.cc
@@ -25,6 +25,7 @@ AutofillPaymentInstrument::AutofillPaymentInstrument( const std::string& method_name, const autofill::CreditCard& card, + bool matches_merchant_card_type_exactly, const std::vector<autofill::AutofillProfile*>& billing_profiles, const std::string& app_locale, PaymentRequestDelegate* payment_request_delegate) @@ -34,6 +35,7 @@ .icon_resource_id, PaymentInstrument::Type::AUTOFILL), credit_card_(card), + matches_merchant_card_type_exactly_(matches_merchant_card_type_exactly), billing_profiles_(billing_profiles), app_locale_(app_locale), delegate_(nullptr), @@ -85,6 +87,10 @@ autofill::CREDIT_CARD_EXPIRED; } +bool AutofillPaymentInstrument::IsExactlyMatchingMerchantRequest() { + return matches_merchant_card_type_exactly_; +} + base::string16 AutofillPaymentInstrument::GetMissingInfoLabel() { return autofill::GetCompletionMessageForCard( autofill::GetCompletionStatusForCard(credit_card_, app_locale_,
diff --git a/components/payments/core/autofill_payment_instrument.h b/components/payments/core/autofill_payment_instrument.h index 6df075f..fc4243e 100644 --- a/components/payments/core/autofill_payment_instrument.h +++ b/components/payments/core/autofill_payment_instrument.h
@@ -33,6 +33,7 @@ AutofillPaymentInstrument( const std::string& method_name, const autofill::CreditCard& card, + bool matches_merchant_card_type_exactly, const std::vector<autofill::AutofillProfile*>& billing_profiles, const std::string& app_locale, PaymentRequestDelegate* payment_request_delegate); @@ -41,6 +42,7 @@ // PaymentInstrument: void InvokePaymentApp(PaymentInstrument::Delegate* delegate) override; bool IsCompleteForPayment() override; + bool IsExactlyMatchingMerchantRequest() override; base::string16 GetMissingInfoLabel() override; bool IsValidForCanMakePayment() override; void RecordUse() override; @@ -65,6 +67,13 @@ // A copy of the card is owned by this object. autofill::CreditCard credit_card_; + + // Whether the card type (credit, debit, prepaid) matches the merchant's + // requested card type exactly. If the merchant accepts all card types, then + // this variable is always "true". If the merchant accepts only a subset of + // the card types, then this variable is "false" for unknown card types. + const bool matches_merchant_card_type_exactly_; + // Not owned by this object, should outlive this. const std::vector<autofill::AutofillProfile*>& billing_profiles_;
diff --git a/components/payments/core/autofill_payment_instrument_unittest.cc b/components/payments/core/autofill_payment_instrument_unittest.cc index 7f84726..117d587 100644 --- a/components/payments/core/autofill_payment_instrument_unittest.cc +++ b/components/payments/core/autofill_payment_instrument_unittest.cc
@@ -164,8 +164,10 @@ // A valid local credit card is a valid instrument for payment. TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment) { - AutofillPaymentInstrument instrument("visa", local_credit_card(), - billing_profiles(), "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", local_credit_card(), + /*matches_merchant_card_type_exactly=*/true, billing_profiles(), "en-US", + nullptr); EXPECT_TRUE(instrument.IsCompleteForPayment()); EXPECT_TRUE(instrument.GetMissingInfoLabel().empty()); } @@ -174,8 +176,9 @@ TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_Expired) { autofill::CreditCard& card = local_credit_card(); card.SetExpirationYear(2016); // Expired. - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_TRUE(instrument.IsCompleteForPayment()); EXPECT_EQ(base::string16(), instrument.GetMissingInfoLabel()); } @@ -186,8 +189,9 @@ card.SetInfo(autofill::AutofillType(autofill::CREDIT_CARD_NAME_FULL), base::ASCIIToUTF16(""), "en-US"); base::string16 missing_info; - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsCompleteForPayment()); EXPECT_EQ(l10n_util::GetStringUTF16(IDS_PAYMENTS_NAME_ON_CARD_REQUIRED), instrument.GetMissingInfoLabel()); @@ -198,8 +202,9 @@ autofill::CreditCard& card = local_credit_card(); card.SetNumber(base::ASCIIToUTF16("")); base::string16 missing_info; - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsCompleteForPayment()); EXPECT_EQ(l10n_util::GetStringUTF16( IDS_PAYMENTS_CARD_NUMBER_INVALID_VALIDATION_MESSAGE), @@ -212,8 +217,9 @@ autofill::CreditCard& card = local_credit_card(); card.set_billing_address_id(""); base::string16 missing_info; - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsCompleteForPayment()); EXPECT_EQ( l10n_util::GetStringUTF16(IDS_PAYMENTS_CARD_BILLING_ADDRESS_REQUIRED), @@ -227,8 +233,9 @@ autofill::CreditCard& card = local_credit_card(); card.set_billing_address_id("InvalidBillingAddressId"); base::string16 missing_info; - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsCompleteForPayment()); EXPECT_EQ( l10n_util::GetStringUTF16(IDS_PAYMENTS_CARD_BILLING_ADDRESS_REQUIRED), @@ -243,8 +250,9 @@ card.SetNumber(base::ASCIIToUTF16("")); card.SetInfo(autofill::AutofillType(autofill::CREDIT_CARD_NAME_FULL), base::ASCIIToUTF16(""), "en-US"); - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsCompleteForPayment()); EXPECT_EQ(l10n_util::GetStringUTF16(IDS_PAYMENTS_MORE_INFORMATION_REQUIRED), instrument.GetMissingInfoLabel()); @@ -255,8 +263,9 @@ autofill::CreditCard card = autofill::test::GetMaskedServerCard(); ASSERT_GT(billing_profiles().size(), 0UL); card.set_billing_address_id(billing_profiles()[0]->guid()); - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_TRUE(instrument.IsCompleteForPayment()); EXPECT_TRUE(instrument.GetMissingInfoLabel().empty()); } @@ -267,8 +276,9 @@ ASSERT_GT(billing_profiles().size(), 0UL); card.set_billing_address_id(billing_profiles()[0]->guid()); card.SetExpirationYear(2016); // Expired. - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_TRUE(instrument.IsCompleteForPayment()); EXPECT_EQ(base::string16(), instrument.GetMissingInfoLabel()); } @@ -277,8 +287,9 @@ TEST_F(AutofillPaymentInstrumentTest, IsValidForCanMakePayment_Minimal) { autofill::CreditCard& card = local_credit_card(); card.SetExpirationYear(2016); // Expired. - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_TRUE(instrument.IsValidForCanMakePayment()); } @@ -286,8 +297,9 @@ TEST_F(AutofillPaymentInstrumentTest, IsValidForCanMakePayment_MaskedCard) { autofill::CreditCard card = autofill::test::GetMaskedServerCard(); card.SetExpirationYear(2016); // Expired. - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_TRUE(instrument.IsValidForCanMakePayment()); } @@ -296,8 +308,9 @@ autofill::CreditCard& card = local_credit_card(); card.SetInfo(autofill::AutofillType(autofill::CREDIT_CARD_NAME_FULL), base::ASCIIToUTF16(""), "en-US"); - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsValidForCanMakePayment()); } @@ -305,8 +318,9 @@ TEST_F(AutofillPaymentInstrumentTest, IsValidForCanMakePayment_NoNumber) { autofill::CreditCard& card = local_credit_card(); card.SetNumber(base::ASCIIToUTF16("")); - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", nullptr); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", nullptr); EXPECT_FALSE(instrument.IsValidForCanMakePayment()); } @@ -320,8 +334,9 @@ autofill::CreditCard& card = local_credit_card(); card.SetNumber(base::ASCIIToUTF16("")); - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", &delegate); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", &delegate); FakePaymentInstrumentDelegate instrument_delegate; @@ -348,8 +363,9 @@ autofill::CreditCard& card = local_credit_card(); card.SetNumber(base::ASCIIToUTF16("")); - AutofillPaymentInstrument instrument("visa", card, billing_profiles(), - "en-US", &delegate); + AutofillPaymentInstrument instrument( + "visa", card, /*matches_merchant_card_type_exactly=*/true, + billing_profiles(), "en-US", &delegate); FakePaymentInstrumentDelegate instrument_delegate;
diff --git a/components/payments/core/payment_instrument.h b/components/payments/core/payment_instrument.h index 6da0769..f189c02 100644 --- a/components/payments/core/payment_instrument.h +++ b/components/payments/core/payment_instrument.h
@@ -39,6 +39,10 @@ // Returns whether the instrument is complete to be used as a payment method // without further editing. virtual bool IsCompleteForPayment() = 0; + // Returns whether the instrument is exactly matching all filters provided by + // the merchant. For example, this can return "false" for unknown card types, + // if the merchant requested only debit cards. + virtual bool IsExactlyMatchingMerchantRequest() = 0; // Returns a message to indicate to the user what's missing for the instrument // to be complete for payment. virtual base::string16 GetMissingInfoLabel() = 0;
diff --git a/components/payments/core/payment_method_data.cc b/components/payments/core/payment_method_data.cc index 2ea818e..b0bb839 100644 --- a/components/payments/core/payment_method_data.cc +++ b/components/payments/core/payment_method_data.cc
@@ -20,6 +20,27 @@ static const char kSupportedNetworks[] = "supportedNetworks"; static const char kSupportedTypes[] = "supportedTypes"; +// Converts |supported_type| to |card_type| and returns true on success. +bool ConvertCardTypeStringToEnum(const std::string& supported_type, + autofill::CreditCard::CardType* card_type) { + if (supported_type == "credit") { + *card_type = autofill::CreditCard::CARD_TYPE_CREDIT; + return true; + } + + if (supported_type == "debit") { + *card_type = autofill::CreditCard::CARD_TYPE_DEBIT; + return true; + } + + if (supported_type == "prepaid") { + *card_type = autofill::CreditCard::CARD_TYPE_PREPAID; + return true; + } + + return false; +} + } // namespace PaymentMethodData::PaymentMethodData() {} @@ -84,7 +105,10 @@ !base::IsStringASCII(supported_type)) { return false; } - this->supported_types.push_back(supported_type); + autofill::CreditCard::CardType card_type = + autofill::CreditCard::CARD_TYPE_UNKNOWN; + if (ConvertCardTypeStringToEnum(supported_type, &card_type)) + this->supported_types.insert(card_type); } } }
diff --git a/components/payments/core/payment_method_data.h b/components/payments/core/payment_method_data.h index 5bc7241..f0ce9237 100644 --- a/components/payments/core/payment_method_data.h +++ b/components/payments/core/payment_method_data.h
@@ -6,9 +6,12 @@ #define COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_ #include <memory> +#include <set> #include <string> #include <vector> +#include "components/autofill/core/browser/credit_card.h" + namespace base { class DictionaryValue; } @@ -41,7 +44,7 @@ // When the methods include "basic-card", a list of networks and types that // are supported. std::vector<std::string> supported_networks; - std::vector<std::string> supported_types; + std::set<autofill::CreditCard::CardType> supported_types; }; } // namespace payments
diff --git a/components/payments/core/payment_method_data_unittest.cc b/components/payments/core/payment_method_data_unittest.cc index a20e283..b44a231 100644 --- a/components/payments/core/payment_method_data_unittest.cc +++ b/components/payments/core/payment_method_data_unittest.cc
@@ -12,20 +12,14 @@ // Tests the success case when populating a PaymentMethodData from a dictionary. TEST(PaymentMethodData, FromDictionaryValueSuccess) { PaymentMethodData expected; - std::vector<std::string> supported_methods; - supported_methods.push_back("visa"); - supported_methods.push_back("basic-card"); - expected.supported_methods = supported_methods; + expected.supported_methods.push_back("visa"); + expected.supported_methods.push_back("basic-card"); expected.data = "{\"supportedNetworks\":[\"mastercard\"]," "\"supportedTypes\":[\"debit\",\"credit\"]}"; - std::vector<std::string> supported_networks; - supported_networks.push_back("mastercard"); - expected.supported_networks = supported_networks; - std::vector<std::string> supported_types; - supported_types.push_back("debit"); - supported_types.push_back("credit"); - expected.supported_types = supported_types; + expected.supported_networks.push_back("mastercard"); + expected.supported_types.insert(autofill::CreditCard::CARD_TYPE_DEBIT); + expected.supported_types.insert(autofill::CreditCard::CARD_TYPE_CREDIT); base::DictionaryValue method_data_dict; std::unique_ptr<base::ListValue> supported_methods_list(new base::ListValue); @@ -97,13 +91,11 @@ method_data2.supported_networks = supported_networks1; EXPECT_EQ(method_data1, method_data2); - std::vector<std::string> supported_types1{"credit"}; - method_data1.supported_types = supported_types1; + method_data1.supported_types = {autofill::CreditCard::CARD_TYPE_UNKNOWN}; EXPECT_NE(method_data1, method_data2); - std::vector<std::string> supported_types2{"debit"}; - method_data2.supported_types = supported_types2; + method_data2.supported_types = {autofill::CreditCard::CARD_TYPE_DEBIT}; EXPECT_NE(method_data1, method_data2); - method_data2.supported_types = supported_types1; + method_data2.supported_types = method_data1.supported_types; EXPECT_EQ(method_data1, method_data2); }
diff --git a/components/payments/core/strings_util.cc b/components/payments/core/strings_util.cc index 165d2b22..bc5fad06 100644 --- a/components/payments/core/strings_util.cc +++ b/components/payments/core/strings_util.cc
@@ -13,6 +13,27 @@ #include "ui/base/l10n/l10n_util.h" namespace payments { +namespace { + +constexpr size_t kNone = 0; +constexpr size_t kCredit = 1; +constexpr size_t kDebit = 2; +constexpr size_t kPrepaid = 4; + +size_t getCardTypeBitmask( + const std::set<autofill::CreditCard::CardType>& types) { + return (types.find(autofill::CreditCard::CARD_TYPE_CREDIT) != types.end() + ? kCredit + : kNone) | + (types.find(autofill::CreditCard::CARD_TYPE_DEBIT) != types.end() + ? kDebit + : kNone) | + (types.find(autofill::CreditCard::CARD_TYPE_PREPAID) != types.end() + ? kPrepaid + : kNone); +} + +} // namespace base::string16 GetShippingAddressLabelFormAutofillProfile( const autofill::AutofillProfile& profile, @@ -99,4 +120,47 @@ } } +base::string16 GetAcceptedCardTypesText( + const std::set<autofill::CreditCard::CardType>& types) { + int string_ids[8]; + + string_ids[kNone] = IDS_PAYMENTS_ACCEPTED_CARDS_LABEL; + string_ids[kCredit | kDebit | kPrepaid] = IDS_PAYMENTS_ACCEPTED_CARDS_LABEL; + + string_ids[kCredit] = IDS_PAYMENTS_ACCEPTED_CREDIT_CARDS_LABEL; + string_ids[kDebit] = IDS_PAYMENTS_ACCEPTED_DEBIT_CARDS_LABEL; + string_ids[kPrepaid] = IDS_PAYMENTS_ACCEPTED_PREPAID_CARDS_LABEL; + + string_ids[kCredit | kDebit] = IDS_PAYMENTS_ACCEPTED_CREDIT_DEBIT_CARDS_LABEL; + string_ids[kCredit | kPrepaid] = + IDS_PAYMENTS_ACCEPTED_CREDIT_PREPAID_CARDS_LABEL; + string_ids[kDebit | kPrepaid] = + IDS_PAYMENTS_ACCEPTED_DEBIT_PREPAID_CARDS_LABEL; + + return l10n_util::GetStringUTF16(string_ids[getCardTypeBitmask(types)]); +} + +base::string16 GetCardTypesAreAcceptedText( + const std::set<autofill::CreditCard::CardType>& types) { + int string_ids[8]; + + string_ids[kNone] = 0; + string_ids[kCredit | kDebit | kPrepaid] = 0; + + string_ids[kCredit] = IDS_PAYMENTS_CREDIT_CARDS_ARE_ACCEPTED_LABEL; + string_ids[kDebit] = IDS_PAYMENTS_DEBIT_CARDS_ARE_ACCEPTED_LABEL; + string_ids[kPrepaid] = IDS_PAYMENTS_PREPAID_CARDS_ARE_ACCEPTED_LABEL; + + string_ids[kCredit | kDebit] = + IDS_PAYMENTS_CREDIT_DEBIT_CARDS_ARE_ACCEPTED_LABEL; + string_ids[kCredit | kPrepaid] = + IDS_PAYMENTS_CREDIT_PREPAID_CARDS_ARE_ACCEPTED_LABEL; + string_ids[kDebit | kPrepaid] = + IDS_PAYMENTS_DEBIT_PREPAID_CARDS_ARE_ACCEPTED_LABEL; + + int string_id = string_ids[getCardTypeBitmask(types)]; + return string_id == 0 ? base::string16() + : l10n_util::GetStringUTF16(string_id); +} + } // namespace payments
diff --git a/components/payments/core/strings_util.h b/components/payments/core/strings_util.h index c693d29..db084f40 100644 --- a/components/payments/core/strings_util.h +++ b/components/payments/core/strings_util.h
@@ -5,9 +5,11 @@ #ifndef COMPONENTS_PAYMENTS_CORE_STRINGS_UTIL_H_ #define COMPONENTS_PAYMENTS_CORE_STRINGS_UTIL_H_ +#include <set> #include <string> #include "base/strings/string16.h" +#include "components/autofill/core/browser/credit_card.h" #include "components/payments/core/payment_options_provider.h" namespace autofill { @@ -41,6 +43,19 @@ base::string16 GetShippingOptionSectionString( PaymentShippingType shipping_type); +// Returns the label "Accepted cards" that is customized based on the +// accepted card |types|. For example, "Accepted debit cards". If |types| is +// empty or contains all possible values, then returns the generic "Accepted +// cards" string. +base::string16 GetAcceptedCardTypesText( + const std::set<autofill::CreditCard::CardType>& types); + +// Returns the label "Cards are accepted" that is customized based on the +// accepted card |types|. For example, "Debit cards are accepted". If |types| is +// empty or contains all possible values, then returns an empty string. +base::string16 GetCardTypesAreAcceptedText( + const std::set<autofill::CreditCard::CardType>& types); + } // namespace payments #endif // COMPONENTS_PAYMENTS_CORE_STRINGS_UTIL_H_
diff --git a/components/payments/core/strings_util_unittest.cc b/components/payments/core/strings_util_unittest.cc new file mode 100644 index 0000000..7aebf44 --- /dev/null +++ b/components/payments/core/strings_util_unittest.cc
@@ -0,0 +1,71 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/payments/core/strings_util.h" + +#include <string> +#include <vector> + +#include "base/strings/utf_string_conversions.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace payments { +namespace { + +using CardType = ::autofill::CreditCard::CardType; + +constexpr CardType CREDIT = ::autofill::CreditCard::CARD_TYPE_CREDIT; +constexpr CardType DEBIT = ::autofill::CreditCard::CARD_TYPE_DEBIT; +constexpr CardType PREPAID = ::autofill::CreditCard::CARD_TYPE_PREPAID; +constexpr CardType UNKNOWN = ::autofill::CreditCard::CARD_TYPE_UNKNOWN; + +} // namespace + +TEST(StringsUtilTest, GetAcceptedCardTypesText) { + static const struct { + std::vector<CardType> card_types; + const char* const expected_text; + } kTestCases[] = { + {std::vector<CardType>(), "Accepted cards"}, + {{UNKNOWN}, "Accepted cards"}, + {{CREDIT}, "Accepted credit cards"}, + {{DEBIT}, "Accepted debit cards"}, + {{PREPAID}, "Accepted prepaid cards"}, + {{CREDIT, DEBIT}, "Accepted credit and debit cards"}, + {{CREDIT, PREPAID}, "Accepted credit and prepaid cards"}, + {{DEBIT, PREPAID}, "Accepted debit and prepaid cards"}, + {{CREDIT, DEBIT, PREPAID}, "Accepted cards"}, + }; + for (size_t i = 0; i < arraysize(kTestCases); ++i) { + EXPECT_EQ( + base::UTF8ToUTF16(kTestCases[i].expected_text), + GetAcceptedCardTypesText(std::set<CardType>( + kTestCases[i].card_types.begin(), kTestCases[i].card_types.end()))); + } +} + +TEST(StringsUtilTest, GetCardTypesAreAcceptedText) { + static const struct { + std::vector<CardType> card_types; + const char* const expected_text; + } kTestCases[] = { + {std::vector<CardType>(), ""}, + {{UNKNOWN}, ""}, + {{CREDIT}, "Credit cards are accepted."}, + {{DEBIT}, "Debit cards are accepted."}, + {{PREPAID}, "Prepaid cards are accepted."}, + {{CREDIT, DEBIT}, "Credit and debit cards are accepted."}, + {{CREDIT, PREPAID}, "Credit and prepaid cards are accepted."}, + {{DEBIT, PREPAID}, "Debit and prepaid cards are accepted."}, + {{CREDIT, DEBIT, PREPAID}, ""}, + }; + for (size_t i = 0; i < arraysize(kTestCases); ++i) { + EXPECT_EQ( + base::UTF8ToUTF16(kTestCases[i].expected_text), + GetCardTypesAreAcceptedText(std::set<CardType>( + kTestCases[i].card_types.begin(), kTestCases[i].card_types.end()))); + } +} + +} // namespace payments
diff --git a/components/payments_strings.grdp b/components/payments_strings.grdp index 40cf5f4a..6a796b6 100644 --- a/components/payments_strings.grdp +++ b/components/payments_strings.grdp
@@ -16,9 +16,45 @@ <message name="IDS_PAYMENTS_SAVE_CARD_TO_DEVICE_CHECKBOX" desc="The label for the checkbox that enables the user to save a credit card to their device, for example, on their phone." formatter_data="android_java"> Save this card to this device </message> - <message name="IDS_PAYMENTS_ACCEPTED_CARDS_LABEL" desc="The title for the section that displays the credit card types that the merchant accepts. Below the title, we show a row of icons indicating the accepted cards (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + <message name="IDS_PAYMENTS_ACCEPTED_CARDS_LABEL" desc="The title for the section that displays the card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> Accepted cards </message> + <message name="IDS_PAYMENTS_ACCEPTED_CREDIT_CARDS_LABEL" desc="The title for the section that displays the credit card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted credit card networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + Accepted credit cards + </message> + <message name="IDS_PAYMENTS_ACCEPTED_DEBIT_CARDS_LABEL" desc="The title for the section that displays the debit card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted debit card networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + Accepted debit cards + </message> + <message name="IDS_PAYMENTS_ACCEPTED_PREPAID_CARDS_LABEL" desc="The title for the section that displays the prepaid card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted prepaid card networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + Accepted prepaid cards + </message> + <message name="IDS_PAYMENTS_ACCEPTED_CREDIT_DEBIT_CARDS_LABEL" desc="The title for the section that displays the credit and debit card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + Accepted credit and debit cards + </message> + <message name="IDS_PAYMENTS_ACCEPTED_CREDIT_PREPAID_CARDS_LABEL" desc="The title for the section that displays the credit and prepaid card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + Accepted credit and prepaid cards + </message> + <message name="IDS_PAYMENTS_ACCEPTED_DEBIT_PREPAID_CARDS_LABEL" desc="The title for the section that displays the debit and prepaid card networks that the merchant accepts. Below the title, we show a row of icons indicating the accepted networks (Visa icon, Mastercard icon, etc.)." formatter_data="android_java"> + Accepted debit and prepaid cards + </message> + <message name="IDS_PAYMENTS_CREDIT_CARDS_ARE_ACCEPTED_LABEL" desc="A message for the section that displays user's credit cards that the merchant accepts." formatter_data="android_java"> + Credit cards are accepted. + </message> + <message name="IDS_PAYMENTS_DEBIT_CARDS_ARE_ACCEPTED_LABEL" desc="A message for the section that displays user's debit cards that the merchant accepts." formatter_data="android_java"> + Debit cards are accepted. + </message> + <message name="IDS_PAYMENTS_PREPAID_CARDS_ARE_ACCEPTED_LABEL" desc="A message for the section that displays user's prepaid cards that the merchant accepts." formatter_data="android_java"> + Prepaid cards are accepted. + </message> + <message name="IDS_PAYMENTS_CREDIT_DEBIT_CARDS_ARE_ACCEPTED_LABEL" desc="A message for the section that displays user's credit and debit cards that the merchant accepts." formatter_data="android_java"> + Credit and debit cards are accepted. + </message> + <message name="IDS_PAYMENTS_CREDIT_PREPAID_CARDS_ARE_ACCEPTED_LABEL" desc="A message for the section that displays user's credit and prepaid cards that the merchant accepts." formatter_data="android_java"> + Credit and prepaid cards are accepted. + </message> + <message name="IDS_PAYMENTS_DEBIT_PREPAID_CARDS_ARE_ACCEPTED_LABEL" desc="A message for the section that displays user's debit and prepaid cards that the merchant accepts." formatter_data="android_java"> + Debit and prepaid cards are accepted. + </message> <message name="IDS_PAYMENTS_METHOD_OF_PAYMENT_LABEL" desc="The title for the section that lets the user select the method of payment." formatter_data="android_java"> Payment method </message>
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 723e96c1..6497c53 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -1280,7 +1280,7 @@ If this policy is left not set, this will be enabled but the user will be able to change it. - See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', + See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', }, { 'name': 'MetricsReportingEnabled', @@ -1768,7 +1768,7 @@ These restrictions do not apply to the save / download of the currently displayed page, nor does it apply to saving as PDF from the printing options. - See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', + See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', 'label': '''Download restrictions''', }, { @@ -5913,7 +5913,7 @@ If this setting is disabled or not configured then users can choose to proceed to the flagged site after being shown the warning. - See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', + See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', }, { 'name': 'SafeBrowsingExtendedReportingOptInAllowed', @@ -5930,7 +5930,7 @@ 'tags': [], 'desc': '''Setting this policy to false stops users from choosing to send some system information and page content to Google servers. If this setting is true or not configured, then users will be allowed to send some system information and page content to Safe Browsing to help detect dangerous apps and sites. - See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', + See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', }, { 'name': 'SpellCheckServiceEnabled', @@ -9321,7 +9321,7 @@ If set to False, updates to components are disabled. However, some components are exempt from this policy: updates to any component that does not contain executable code, or does not significantly alter the behavior of the browser, or is critical for its security will not be disabled. Examples of such components include the certificate revocation lists and safe browsing data. - See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', + See https://developers.google.com/safe-browsing for more info on SafeBrowsing.''', }, { 'name': 'NativePrinters',
diff --git a/components/security_interstitials/core/browser/resources/interstitial_large.html b/components/security_interstitials/core/browser/resources/interstitial_large.html index bcb762a..795491e 100644 --- a/components/security_interstitials/core/browser/resources/interstitial_large.html +++ b/components/security_interstitials/core/browser/resources/interstitial_large.html
@@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width"> - <title i18n-content="tabTitle"></title> + <title>$i18n{tabTitle}</title> <link rel="stylesheet" href="interstitial_common.css"> <link rel="stylesheet" href="interstitial_large.css"> <script src="../../../../../ui/webui/resources/js/util.js"></script> @@ -21,7 +21,7 @@ <div class="icon" id="icon"></div> <div id="main-message"> <h1>$i18n{heading}</h1> - <p i18n-values=".innerHTML:primaryParagraph"></p> + <p>$i18nRaw{primaryParagraph}</p> <div id="debugging"> <div id="error-code" class="error-code"></div> <div id="error-debugging-info" class="hidden"></div> @@ -39,11 +39,13 @@ </div> <div class="nav-wrapper"> <button id="primary-button">$i18n{primaryButtonText}</button> - <button id="details-button" class="small-link">$i18n{openDetails}</button> + <button id="details-button" class="small-link"> + $i18n{openDetails} + </button> </div> <div id="details" class="hidden"> - <p i18n-values=".innerHTML:explanationParagraph"></p> - <p i18n-values=".innerHTML:finalParagraph" id="final-paragraph"></p> + <p>$i18nRaw{explanationParagraph}</p> + <p id="final-paragraph">$i18nRaw{finalParagraph}</p> </div> </div> </body>
diff --git a/components/subresource_filter/core/browser/subresource_filter_constants.cc b/components/subresource_filter/core/browser/subresource_filter_constants.cc index fc3aaba..dbc9e09 100644 --- a/components/subresource_filter/core/browser/subresource_filter_constants.cc +++ b/components/subresource_filter/core/browser/subresource_filter_constants.cc
@@ -30,11 +30,4 @@ const base::FilePath::CharType kUnindexedRulesetDataFileName[] = FILE_PATH_LITERAL("Filtering Rules"); -// TODO(shivanisha): Update the strings when finalized. - -const std::string kActivationConsoleMessage = - "Subresource filter is activated on this site"; - -const std::string kDisallowSubframeConsoleMessage = - "Subresource filtering disallowed loading this resource, "; } // namespace subresource_filter
diff --git a/components/subresource_filter/core/browser/subresource_filter_constants.h b/components/subresource_filter/core/browser/subresource_filter_constants.h index 9e34958..cd36c796 100644 --- a/components/subresource_filter/core/browser/subresource_filter_constants.h +++ b/components/subresource_filter/core/browser/subresource_filter_constants.h
@@ -47,11 +47,14 @@ // The name of the file that stores the unindexed filtering rules. extern const base::FilePath::CharType kUnindexedRulesetDataFileName[]; +// TODO(shivanisha): Update the strings when finalized. // Console message to be displayed on activation. -extern const std::string kActivationConsoleMessage; +constexpr char kActivationConsoleMessage[] = + "Subresource filter is activated on this site"; // Console message to be displayed on disallowing subframe. -extern const std::string kDisallowSubframeConsoleMessage; +constexpr char kDisallowSubframeConsoleMessage[] = + "Subresource filtering disallowed loading this resource, "; } // namespace subresource_filter
diff --git a/components/sync/base/cryptographer.cc b/components/sync/base/cryptographer.cc index c585965..30790ea 100644 --- a/components/sync/base/cryptographer.cc +++ b/components/sync/base/cryptographer.cc
@@ -348,10 +348,8 @@ if (iter == nigoris_.end()) return std::string(); sync_pb::NigoriKey key; - if (!iter->second->ExportKeys(key.mutable_user_key(), - key.mutable_encryption_key(), - key.mutable_mac_key())) - return std::string(); + iter->second->ExportKeys(key.mutable_user_key(), key.mutable_encryption_key(), + key.mutable_mac_key()); return key.SerializeAsString(); }
diff --git a/components/sync/base/nigori.cc b/components/sync/base/nigori.cc index e3067cc6..5204521 100644 --- a/components/sync/base/nigori.cc +++ b/components/sync/base/nigori.cc
@@ -75,25 +75,21 @@ kSaltKeySizeInBits)); DCHECK(user_salt); - std::string raw_user_salt; - if (!user_salt->GetRawKey(&raw_user_salt)) - return false; - // Kuser = PBKDF2(P, Suser, Nuser, 16) user_key_ = SymmetricKey::DeriveKeyFromPassword( - SymmetricKey::AES, password, raw_user_salt, kUserIterations, + SymmetricKey::AES, password, user_salt->key(), kUserIterations, kDerivedKeySizeInBits); DCHECK(user_key_); // Kenc = PBKDF2(P, Suser, Nenc, 16) encryption_key_ = SymmetricKey::DeriveKeyFromPassword( - SymmetricKey::AES, password, raw_user_salt, kEncryptionIterations, + SymmetricKey::AES, password, user_salt->key(), kEncryptionIterations, kDerivedKeySizeInBits); DCHECK(encryption_key_); // Kmac = PBKDF2(P, Suser, Nmac, 16) mac_key_ = SymmetricKey::DeriveKeyFromPassword( - SymmetricKey::HMAC_SHA1, password, raw_user_salt, kSigningIterations, + SymmetricKey::HMAC_SHA1, password, user_salt->key(), kSigningIterations, kDerivedKeySizeInBits); DCHECK(mac_key_); @@ -132,12 +128,8 @@ if (!encryptor.Encrypt(plaintext.str(), &ciphertext)) return false; - std::string raw_mac_key; - if (!mac_key_->GetRawKey(&raw_mac_key)) - return false; - HMAC hmac(HMAC::SHA256); - if (!hmac.Init(raw_mac_key)) + if (!hmac.Init(mac_key_->key())) return false; std::vector<unsigned char> hash(kHashSize); @@ -168,12 +160,8 @@ if (!encryptor.Encrypt(value, &ciphertext)) return false; - std::string raw_mac_key; - if (!mac_key_->GetRawKey(&raw_mac_key)) - return false; - HMAC hmac(HMAC::SHA256); - if (!hmac.Init(raw_mac_key)) + if (!hmac.Init(mac_key_->key())) return false; std::vector<unsigned char> hash(kHashSize); @@ -206,12 +194,8 @@ input.substr(kIvSize, input.size() - (kIvSize + kHashSize))); std::string hash(input.substr(input.size() - kHashSize, kHashSize)); - std::string raw_mac_key; - if (!mac_key_->GetRawKey(&raw_mac_key)) - return false; - HMAC hmac(HMAC::SHA256); - if (!hmac.Init(raw_mac_key)) + if (!hmac.Init(mac_key_->key())) return false; std::vector<unsigned char> expected(kHashSize); @@ -232,7 +216,7 @@ return true; } -bool Nigori::ExportKeys(std::string* user_key, +void Nigori::ExportKeys(std::string* user_key, std::string* encryption_key, std::string* mac_key) const { DCHECK(encryption_key); @@ -240,12 +224,12 @@ DCHECK(user_key); if (user_key_) - user_key_->GetRawKey(user_key); + *user_key = user_key_->key(); else user_key->clear(); - return encryption_key_->GetRawKey(encryption_key) && - mac_key_->GetRawKey(mac_key); + *encryption_key = encryption_key_->key(); + *mac_key = mac_key_->key(); } } // namespace syncer
diff --git a/components/sync/base/nigori.h b/components/sync/base/nigori.h index 92c77b40..72b351e 100644 --- a/components/sync/base/nigori.h +++ b/components/sync/base/nigori.h
@@ -60,7 +60,7 @@ bool Decrypt(const std::string& value, std::string* decrypted) const; // Exports the raw derived keys. - bool ExportKeys(std::string* user_key, + void ExportKeys(std::string* user_key, std::string* encryption_key, std::string* mac_key) const;
diff --git a/components/sync/base/nigori_unittest.cc b/components/sync/base/nigori_unittest.cc index 3dfdb640..567237e 100644 --- a/components/sync/base/nigori_unittest.cc +++ b/components/sync/base/nigori_unittest.cc
@@ -129,7 +129,7 @@ std::string user_key; std::string encryption_key; std::string mac_key; - EXPECT_TRUE(nigori1.ExportKeys(&user_key, &encryption_key, &mac_key)); + nigori1.ExportKeys(&user_key, &encryption_key, &mac_key); Nigori nigori2; EXPECT_TRUE(nigori2.InitByImport(user_key, encryption_key, mac_key)); @@ -159,7 +159,7 @@ std::string user_key = ""; std::string encryption_key; std::string mac_key; - EXPECT_TRUE(nigori.ExportKeys(&user_key, &encryption_key, &mac_key)); + nigori.ExportKeys(&user_key, &encryption_key, &mac_key); EXPECT_NE(user_key, ""); } @@ -171,7 +171,7 @@ std::string user_key; std::string encryption_key; std::string mac_key; - EXPECT_TRUE(nigori1.ExportKeys(&user_key, &encryption_key, &mac_key)); + nigori1.ExportKeys(&user_key, &encryption_key, &mac_key); EXPECT_FALSE(user_key.empty()); EXPECT_FALSE(encryption_key.empty()); EXPECT_FALSE(mac_key.empty()); @@ -180,7 +180,7 @@ EXPECT_TRUE(nigori2.InitByImport("", encryption_key, mac_key)); user_key = "non-empty-value"; - EXPECT_TRUE(nigori2.ExportKeys(&user_key, &encryption_key, &mac_key)); + nigori2.ExportKeys(&user_key, &encryption_key, &mac_key); EXPECT_TRUE(user_key.empty()); EXPECT_FALSE(encryption_key.empty()); EXPECT_FALSE(mac_key.empty());
diff --git a/components/test/data/web_database/version_72.sql b/components/test/data/web_database/version_72.sql new file mode 100644 index 0000000..9b3935a --- /dev/null +++ b/components/test/data/web_database/version_72.sql
@@ -0,0 +1,25 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); +INSERT INTO "meta" VALUES('mmap_status','-1'); +INSERT INTO "meta" VALUES('version','72'); +INSERT INTO "meta" VALUES('last_compatible_version','72'); +CREATE TABLE token_service (service VARCHAR PRIMARY KEY NOT NULL,encrypted_token BLOB); +CREATE TABLE keywords (id INTEGER PRIMARY KEY,short_name VARCHAR NOT NULL,keyword VARCHAR NOT NULL,favicon_url VARCHAR NOT NULL,url VARCHAR NOT NULL,safe_for_autoreplace INTEGER,originating_url VARCHAR,date_created INTEGER DEFAULT 0,usage_count INTEGER DEFAULT 0,input_encodings VARCHAR,suggest_url VARCHAR,prepopulate_id INTEGER DEFAULT 0,created_by_policy INTEGER DEFAULT 0,instant_url VARCHAR,last_modified INTEGER DEFAULT 0,sync_guid VARCHAR,alternate_urls VARCHAR,search_terms_replacement_key VARCHAR,image_url VARCHAR,search_url_post_params VARCHAR,suggest_url_post_params VARCHAR,instant_url_post_params VARCHAR,image_url_post_params VARCHAR,new_tab_url VARCHAR, last_visited INTEGER DEFAULT 0); +CREATE TABLE autofill (name VARCHAR, value VARCHAR, value_lower VARCHAR, date_created INTEGER DEFAULT 0, date_last_used INTEGER DEFAULT 0, count INTEGER DEFAULT 1, PRIMARY KEY (name, value)); +CREATE TABLE credit_cards ( guid VARCHAR PRIMARY KEY, name_on_card VARCHAR, expiration_month INTEGER, expiration_year INTEGER, card_number_encrypted BLOB, date_modified INTEGER NOT NULL DEFAULT 0, origin VARCHAR DEFAULT '', use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, billing_address_id VARCHAR); +CREATE TABLE autofill_profiles ( guid VARCHAR PRIMARY KEY, company_name VARCHAR, street_address VARCHAR, dependent_locality VARCHAR, city VARCHAR, state VARCHAR, zipcode VARCHAR, sorting_code VARCHAR, country_code VARCHAR, date_modified INTEGER NOT NULL DEFAULT 0, origin VARCHAR DEFAULT '', language_code VARCHAR, use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0); +CREATE TABLE autofill_profile_names ( guid VARCHAR, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, full_name VARCHAR); +CREATE TABLE autofill_profile_emails ( guid VARCHAR, email VARCHAR); +CREATE TABLE autofill_profile_phones ( guid VARCHAR, number VARCHAR); +CREATE TABLE autofill_profiles_trash ( guid VARCHAR); +CREATE TABLE masked_credit_cards (id VARCHAR,status VARCHAR,name_on_card VARCHAR,network VARCHAR,last_four VARCHAR,exp_month INTEGER DEFAULT 0,exp_year INTEGER DEFAULT 0); +CREATE TABLE unmasked_credit_cards (id VARCHAR,card_number_encrypted VARCHAR, use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, unmask_date INTEGER NOT NULL DEFAULT 0); +CREATE TABLE server_card_metadata (id VARCHAR NOT NULL,use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, billing_address_id VARCHAR); +CREATE TABLE server_addresses (id VARCHAR,company_name VARCHAR,street_address VARCHAR,address_1 VARCHAR,address_2 VARCHAR,address_3 VARCHAR,address_4 VARCHAR,postal_code VARCHAR,sorting_code VARCHAR,country_code VARCHAR,language_code VARCHAR, recipient_name VARCHAR, phone_number VARCHAR); +CREATE TABLE server_address_metadata (id VARCHAR NOT NULL,use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, has_converted BOOL NOT NULL DEFAULT FALSE); +CREATE TABLE autofill_sync_metadata (storage_key VARCHAR PRIMARY KEY NOT NULL,value BLOB); +CREATE TABLE autofill_model_type_state (id INTEGER PRIMARY KEY, value BLOB); +CREATE INDEX autofill_name ON autofill (name); +CREATE INDEX autofill_name_value_lower ON autofill (name, value_lower); +COMMIT;
diff --git a/components/webdata/common/BUILD.gn b/components/webdata/common/BUILD.gn index 1fe0781..c107b5a 100644 --- a/components/webdata/common/BUILD.gn +++ b/components/webdata/common/BUILD.gn
@@ -58,6 +58,7 @@ "//components/test/data/web_database/version_69.sql", "//components/test/data/web_database/version_70.sql", "//components/test/data/web_database/version_71.sql", + "//components/test/data/web_database/version_72.sql", ] outputs = [ "{{bundle_resources_dir}}/" +
diff --git a/components/webdata/common/web_database.cc b/components/webdata/common/web_database.cc index 072f025..496babf 100644 --- a/components/webdata/common/web_database.cc +++ b/components/webdata/common/web_database.cc
@@ -13,7 +13,7 @@ // corresponding changes must happen in the unit tests, and new migration test // added. See |WebDatabaseMigrationTest::kCurrentTestedVersionNumber|. // static -const int WebDatabase::kCurrentVersionNumber = 72; +const int WebDatabase::kCurrentVersionNumber = 73; const int WebDatabase::kDeprecatedVersionNumber = 51; @@ -29,15 +29,15 @@ meta_table->SetVersionNumber(version_num); if (update_compatible_version_num) { meta_table->SetCompatibleVersionNumber( - std::min(version_num, kCompatibleVersionNumber)); + std::min(version_num, kCompatibleVersionNumber)); } } // Outputs the failed version number as a warning and always returns // |sql::INIT_FAILURE|. sql::InitStatus FailedMigrationTo(int version_num) { - LOG(WARNING) << "Unable to update web database to version " - << version_num << "."; + LOG(WARNING) << "Unable to update web database to version " << version_num + << "."; NOTREACHED(); return sql::INIT_FAILURE; } @@ -46,8 +46,7 @@ WebDatabase::WebDatabase() {} -WebDatabase::~WebDatabase() { -} +WebDatabase::~WebDatabase() {} void WebDatabase::AddTable(WebDatabaseTable* table) { tables_[table->GetTypeKey()] = table; @@ -150,8 +149,7 @@ DCHECK_GT(current_version, kDeprecatedVersionNumber); for (int next_version = current_version + 1; - next_version <= kCurrentVersionNumber; - ++next_version) { + next_version <= kCurrentVersionNumber; ++next_version) { // Do any database-wide migrations. bool update_compatible_version = false; if (!MigrateToVersion(next_version, &update_compatible_version)) @@ -175,7 +173,7 @@ } bool WebDatabase::MigrateToVersion(int version, - bool* update_compatible_version) { + bool* update_compatible_version) { // Migrate if necessary. switch (version) { case 58: @@ -188,10 +186,9 @@ bool WebDatabase::MigrateToVersion58DropWebAppsAndIntents() { sql::Transaction transaction(&db_); - return transaction.Begin() && - db_.Execute("DROP TABLE IF EXISTS web_apps") && - db_.Execute("DROP TABLE IF EXISTS web_app_icons") && - db_.Execute("DROP TABLE IF EXISTS web_intents") && - db_.Execute("DROP TABLE IF EXISTS web_intents_defaults") && - transaction.Commit(); + return transaction.Begin() && db_.Execute("DROP TABLE IF EXISTS web_apps") && + db_.Execute("DROP TABLE IF EXISTS web_app_icons") && + db_.Execute("DROP TABLE IF EXISTS web_intents") && + db_.Execute("DROP TABLE IF EXISTS web_intents_defaults") && + transaction.Commit(); }
diff --git a/components/webdata/common/web_database_migration_unittest.cc b/components/webdata/common/web_database_migration_unittest.cc index 4417725..1f494485 100644 --- a/components/webdata/common/web_database_migration_unittest.cc +++ b/components/webdata/common/web_database_migration_unittest.cc
@@ -103,7 +103,7 @@ source_path = source_path.AppendASCII("web_database"); source_path = source_path.Append(file); return base::PathExists(source_path) && - base::ReadFileToString(source_path, contents); + base::ReadFileToString(source_path, contents); } static int VersionFromConnection(sql::Connection* connection) { @@ -130,7 +130,7 @@ DISALLOW_COPY_AND_ASSIGN(WebDatabaseMigrationTest); }; -const int WebDatabaseMigrationTest::kCurrentTestedVersionNumber = 72; +const int WebDatabaseMigrationTest::kCurrentTestedVersionNumber = 73; void WebDatabaseMigrationTest::LoadDatabase( const base::FilePath::StringType& file) { @@ -207,8 +207,7 @@ // Versions below 52 are deprecated. This verifies that old databases are razed. TEST_F(WebDatabaseMigrationTest, RazeDeprecatedVersionAndReinit) { - ASSERT_NO_FATAL_FAILURE( - LoadDatabase(FILE_PATH_LITERAL("version_50.sql"))); + ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_50.sql"))); // Verify pre-conditions. These are expectations for version 50 of the // database. @@ -221,14 +220,14 @@ ASSERT_TRUE(meta_table.Init(&connection, 50, 50)); ASSERT_FALSE(connection.DoesColumnExist("keywords", "image_url")); - ASSERT_FALSE(connection.DoesColumnExist("keywords", - "search_url_post_params")); - ASSERT_FALSE(connection.DoesColumnExist("keywords", - "suggest_url_post_params")); - ASSERT_FALSE(connection.DoesColumnExist("keywords", - "instant_url_post_params")); - ASSERT_FALSE(connection.DoesColumnExist("keywords", - "image_url_post_params")); + ASSERT_FALSE( + connection.DoesColumnExist("keywords", "search_url_post_params")); + ASSERT_FALSE( + connection.DoesColumnExist("keywords", "suggest_url_post_params")); + ASSERT_FALSE( + connection.DoesColumnExist("keywords", "instant_url_post_params")); + ASSERT_FALSE( + connection.DoesColumnExist("keywords", "image_url_post_params")); } DoMigration(); @@ -245,22 +244,21 @@ // New columns should have been created. EXPECT_TRUE(connection.DoesColumnExist("keywords", "image_url")); - EXPECT_TRUE(connection.DoesColumnExist("keywords", - "search_url_post_params")); - EXPECT_TRUE(connection.DoesColumnExist("keywords", - "suggest_url_post_params")); - EXPECT_TRUE(connection.DoesColumnExist("keywords", - "instant_url_post_params")); - EXPECT_TRUE(connection.DoesColumnExist("keywords", - "image_url_post_params")); + EXPECT_TRUE( + connection.DoesColumnExist("keywords", "search_url_post_params")); + EXPECT_TRUE( + connection.DoesColumnExist("keywords", "suggest_url_post_params")); + EXPECT_TRUE( + connection.DoesColumnExist("keywords", "instant_url_post_params")); + EXPECT_TRUE( + connection.DoesColumnExist("keywords", "image_url_post_params")); } } // Tests that the column |new_tab_url| is added to the keyword table schema for // a version 52 database. TEST_F(WebDatabaseMigrationTest, MigrateVersion52ToCurrent) { - ASSERT_NO_FATAL_FAILURE( - LoadDatabase(FILE_PATH_LITERAL("version_52.sql"))); + ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_52.sql"))); // Verify pre-conditions. These are expectations for version 52 of the // database. @@ -348,12 +346,11 @@ EXPECT_FALSE(connection.DoesColumnExist("autofill_profile_phones", "type")); // Data should have been preserved. - sql::Statement s_profiles( - connection.GetUniqueStatement( - "SELECT guid, company_name, street_address, dependent_locality," - " city, state, zipcode, sorting_code, country_code, date_modified," - " origin " - "FROM autofill_profiles")); + sql::Statement s_profiles(connection.GetUniqueStatement( + "SELECT guid, company_name, street_address, dependent_locality," + " city, state, zipcode, sorting_code, country_code, date_modified," + " origin " + "FROM autofill_profiles")); // Address lines 1 and 2. ASSERT_TRUE(s_profiles.Step()); @@ -426,9 +423,8 @@ EXPECT_FALSE(s_profiles.Step()); // Verify the phone number data as well. - sql::Statement s_phones( - connection.GetUniqueStatement( - "SELECT guid, number FROM autofill_profile_phones")); + sql::Statement s_phones(connection.GetUniqueStatement( + "SELECT guid, number FROM autofill_profile_phones")); ASSERT_TRUE(s_phones.Step()); EXPECT_EQ("00000000-0000-0000-0000-000000000001", s_phones.ColumnString(0)); @@ -559,12 +555,11 @@ // Data should have been preserved. Note that it appears out of order // relative to the previous table, as it's been alphabetized. That's ok. - sql::Statement s( - connection.GetUniqueStatement( - "SELECT name, value, value_lower, date_created, date_last_used," - " count " - "FROM autofill " - "ORDER BY name, value ASC")); + sql::Statement s(connection.GetUniqueStatement( + "SELECT name, value, value_lower, date_created, date_last_used," + " count " + "FROM autofill " + "ORDER BY name, value ASC")); // "jane.doe@example.org": Timestamps should be parsed correctly, and only // the first and last should be kept. @@ -644,19 +639,17 @@ // Data should have been preserved. Language code should have been set to // empty string. - sql::Statement s_profiles( - connection.GetUniqueStatement( - "SELECT guid, company_name, street_address, dependent_locality," - " city, state, zipcode, sorting_code, country_code, date_modified," - " origin, language_code " - "FROM autofill_profiles")); + sql::Statement s_profiles(connection.GetUniqueStatement( + "SELECT guid, company_name, street_address, dependent_locality," + " city, state, zipcode, sorting_code, country_code, date_modified," + " origin, language_code " + "FROM autofill_profiles")); ASSERT_TRUE(s_profiles.Step()); EXPECT_EQ("00000000-0000-0000-0000-000000000001", s_profiles.ColumnString(0)); EXPECT_EQ(ASCIIToUTF16("Google Inc"), s_profiles.ColumnString16(1)); - EXPECT_EQ(ASCIIToUTF16("340 Main St"), - s_profiles.ColumnString16(2)); + EXPECT_EQ(ASCIIToUTF16("340 Main St"), s_profiles.ColumnString16(2)); EXPECT_EQ(base::string16(), s_profiles.ColumnString16(3)); EXPECT_EQ(ASCIIToUTF16("Los Angeles"), s_profiles.ColumnString16(4)); EXPECT_EQ(ASCIIToUTF16("CA"), s_profiles.ColumnString16(5)); @@ -689,10 +682,9 @@ connection.DoesColumnExist("autofill_profile_names", "full_name")); // Verify the starting data. - sql::Statement s_names( - connection.GetUniqueStatement( - "SELECT guid, first_name, middle_name, last_name " - "FROM autofill_profile_names")); + sql::Statement s_names(connection.GetUniqueStatement( + "SELECT guid, first_name, middle_name, last_name " + "FROM autofill_profile_names")); ASSERT_TRUE(s_names.Step()); EXPECT_EQ("B41FE6E0-B13E-2A2A-BF0B-29FCE2C3ADBD", s_names.ColumnString(0)); EXPECT_EQ(ASCIIToUTF16("Jon"), s_names.ColumnString16(1)); @@ -719,10 +711,9 @@ // Data should have been preserved. Full name should have been set to the // empty string. - sql::Statement s_names( - connection.GetUniqueStatement( - "SELECT guid, first_name, middle_name, last_name, full_name " - "FROM autofill_profile_names")); + sql::Statement s_names(connection.GetUniqueStatement( + "SELECT guid, first_name, middle_name, last_name, full_name " + "FROM autofill_profile_names")); ASSERT_TRUE(s_names.Step()); EXPECT_EQ("B41FE6E0-B13E-2A2A-BF0B-29FCE2C3ADBD", s_names.ColumnString(0)); @@ -778,7 +769,8 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion58ToCurrent) { ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_58.sql"))); - const char query_extensions[] = "SELECT * FROM keywords " + const char query_extensions[] = + "SELECT * FROM keywords " "WHERE url='chrome-extension://iphchnegaodmijmkdlbhbanjhfphhikp/" "?q={searchTerms}'"; // Verify pre-conditions. @@ -818,8 +810,9 @@ } EXPECT_EQ(0, count); - s.Assign(connection.GetUniqueStatement("SELECT * FROM keywords " - "WHERE short_name='Google'")); + s.Assign( + connection.GetUniqueStatement("SELECT * FROM keywords " + "WHERE short_name='Google'")); ASSERT_TRUE(s.is_valid()); count = 0; while (s.Step()) { @@ -915,10 +908,10 @@ sql::MetaTable meta_table; ASSERT_TRUE(meta_table.Init(&connection, 61, 61)); - EXPECT_FALSE(connection.DoesColumnExist("unmasked_credit_cards", - "use_count")); - EXPECT_FALSE(connection.DoesColumnExist("unmasked_credit_cards", - "use_date")); + EXPECT_FALSE( + connection.DoesColumnExist("unmasked_credit_cards", "use_count")); + EXPECT_FALSE( + connection.DoesColumnExist("unmasked_credit_cards", "use_date")); } DoMigration(); @@ -932,10 +925,10 @@ // Check version. EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); - EXPECT_TRUE(connection.DoesColumnExist("unmasked_credit_cards", - "use_count")); - EXPECT_TRUE(connection.DoesColumnExist("unmasked_credit_cards", - "use_date")); + EXPECT_TRUE( + connection.DoesColumnExist("unmasked_credit_cards", "use_count")); + EXPECT_TRUE( + connection.DoesColumnExist("unmasked_credit_cards", "use_date")); } } @@ -956,10 +949,9 @@ EXPECT_FALSE(connection.DoesTableExist("server_address_metadata")); // Add a server address --- make sure it gets an ID. - sql::Statement insert_profiles( - connection.GetUniqueStatement( - "INSERT INTO server_addresses(id, postal_code) " - "VALUES ('', 90210)")); + sql::Statement insert_profiles(connection.GetUniqueStatement( + "INSERT INTO server_addresses(id, postal_code) " + "VALUES ('', 90210)")); insert_profiles.Run(); } @@ -977,9 +969,8 @@ EXPECT_TRUE(connection.DoesTableExist("server_card_metadata")); EXPECT_TRUE(connection.DoesTableExist("server_address_metadata")); - sql::Statement read_profiles( - connection.GetUniqueStatement( - "SELECT id, postal_code FROM server_addresses")); + sql::Statement read_profiles(connection.GetUniqueStatement( + "SELECT id, postal_code FROM server_addresses")); ASSERT_TRUE(read_profiles.Step()); EXPECT_FALSE(read_profiles.ColumnString(0).empty()); EXPECT_EQ("90210", read_profiles.ColumnString(1)); @@ -999,8 +990,8 @@ sql::MetaTable meta_table; ASSERT_TRUE(meta_table.Init(&connection, 65, 65)); - EXPECT_FALSE(connection.DoesColumnExist("credit_cards", - "billing_address_id")); + EXPECT_FALSE( + connection.DoesColumnExist("credit_cards", "billing_address_id")); EXPECT_TRUE(connection.Execute( "INSERT INTO credit_cards(guid, name_on_card) VALUES ('', 'Alice')")); @@ -1017,8 +1008,8 @@ // Check version. EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); - EXPECT_TRUE(connection.DoesColumnExist("credit_cards", - "billing_address_id")); + EXPECT_TRUE( + connection.DoesColumnExist("credit_cards", "billing_address_id")); sql::Statement read_credit_cards(connection.GetUniqueStatement( "SELECT name_on_card, billing_address_id FROM credit_cards")); @@ -1045,9 +1036,9 @@ EXPECT_FALSE(connection.DoesColumnExist("masked_credit_cards", "billing_address_id")); - EXPECT_TRUE(connection.Execute( - "INSERT INTO masked_credit_cards(id, name_on_card) " - "VALUES ('id', 'Alice')")); + EXPECT_TRUE( + connection.Execute("INSERT INTO masked_credit_cards(id, name_on_card) " + "VALUES ('id', 'Alice')")); } DoMigration(); @@ -1128,8 +1119,7 @@ // Check version. EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); - EXPECT_TRUE( - connection.DoesColumnExist("keywords", "last_visited")); + EXPECT_TRUE(connection.DoesColumnExist("keywords", "last_visited")); } } @@ -1277,7 +1267,8 @@ // Check version. EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); - EXPECT_FALSE(connection.DoesColumnExist("masked_credit_cards", "type")); + // Don't check for absence of "type", because that's added in version 73 + // with a different meaning. EXPECT_TRUE(connection.DoesColumnExist("masked_credit_cards", "network")); sql::Statement s_cards_metadata(connection.GetUniqueStatement( @@ -1287,3 +1278,45 @@ EXPECT_EQ("VISA", s_cards_metadata.ColumnString(1)); } } + +// Tests adding "type" column for the "masked_credit_cards" table. +TEST_F(WebDatabaseMigrationTest, MigrateVersion72ToCurrent) { + ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_72.sql"))); + + // Verify pre-conditions. + { + sql::Connection connection; + ASSERT_TRUE(connection.Open(GetDatabasePath())); + ASSERT_TRUE(sql::MetaTable::DoesTableExist(&connection)); + + sql::MetaTable meta_table; + ASSERT_TRUE(meta_table.Init(&connection, 72, 72)); + + EXPECT_FALSE(connection.DoesColumnExist("masked_credit_cards", "type")); + + EXPECT_TRUE( + connection.Execute("INSERT INTO masked_credit_cards(id, network) " + "VALUES ('id', 'VISA')")); + } + + DoMigration(); + + // Verify post-conditions. + { + sql::Connection connection; + ASSERT_TRUE(connection.Open(GetDatabasePath())); + ASSERT_TRUE(sql::MetaTable::DoesTableExist(&connection)); + + // Check version. + EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); + + EXPECT_TRUE(connection.DoesColumnExist("masked_credit_cards", "type")); + + sql::Statement cards(connection.GetUniqueStatement( + "SELECT id, network, type FROM masked_credit_cards")); + ASSERT_TRUE(cards.Step()); + EXPECT_EQ("id", cards.ColumnString(0)); + EXPECT_EQ("VISA", cards.ColumnString(1)); + EXPECT_EQ(CreditCard::CARD_TYPE_UNKNOWN, cards.ColumnInt(2)); + } +}
diff --git a/content/browser/accessibility/accessibility_tree_formatter_blink.cc b/content/browser/accessibility/accessibility_tree_formatter_blink.cc index 5c845ffe..0885ca5 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_blink.cc
@@ -253,6 +253,18 @@ &line); } + for (int attr_index = ui::AX_FLOAT_ATTRIBUTE_NONE; + attr_index <= ui::AX_FLOAT_ATTRIBUTE_LAST; ++attr_index) { + auto attr = static_cast<ui::AXFloatAttribute>(attr_index); + double float_value; + if (!dict.GetDouble(ui::ToString(attr), &float_value)) + continue; + WriteAttribute( + false, + base::StringPrintf("%s=%.2f", ui::ToString(attr).c_str(), float_value), + &line); + } + for (int attr_index = ui::AX_INT_LIST_ATTRIBUTE_NONE; attr_index <= ui::AX_INT_LIST_ATTRIBUTE_LAST; ++attr_index) {
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc index 4695d7bf..8ec9e98 100644 --- a/content/browser/accessibility/browser_accessibility_com_win.cc +++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -3801,8 +3801,14 @@ ui::AX_ATTR_FLOWTO_IDS); AddBidirectionalRelations(IA2_RELATION_LABELLED_BY, IA2_RELATION_LABEL_FOR, ui::AX_ATTR_LABELLEDBY_IDS); - AddBidirectionalRelations(IA2_RELATION_DETAILS, IA2_RELATION_DETAILS_FOR, - ui::AX_ATTR_DETAILS_IDS); + + int32_t details_id; + if (GetIntAttribute(ui::AX_ATTR_DETAILS_ID, &details_id)) { + std::vector<int32_t> details_ids; + details_ids.push_back(details_id); + AddBidirectionalRelations(IA2_RELATION_DETAILS, IA2_RELATION_DETAILS_FOR, + details_ids); + } int member_of_id; if (owner()->GetIntAttribute(ui::AX_ATTR_MEMBER_OF_ID, &member_of_id)) @@ -4813,6 +4819,13 @@ const std::vector<int32_t>& target_ids = owner()->GetIntListAttribute(attribute); + AddBidirectionalRelations(relation_type, reverse_relation_type, target_ids); +} + +void BrowserAccessibilityComWin::AddBidirectionalRelations( + const base::string16& relation_type, + const base::string16& reverse_relation_type, + const std::vector<int32_t>& target_ids) { // Reflexive relations don't need to be exposed through IA2. std::vector<int32_t> filtered_target_ids; int32_t current_id = owner()->GetId();
diff --git a/content/browser/accessibility/browser_accessibility_com_win.h b/content/browser/accessibility/browser_accessibility_com_win.h index f08a808a..18ae25f6 100644 --- a/content/browser/accessibility/browser_accessibility_com_win.h +++ b/content/browser/accessibility/browser_accessibility_com_win.h
@@ -909,6 +909,9 @@ void AddBidirectionalRelations(const base::string16& relation_type, const base::string16& reverse_relation_type, ui::AXIntListAttribute attribute); + void AddBidirectionalRelations(const base::string16& relation_type, + const base::string16& reverse_relation_type, + const std::vector<int32_t>& target_ids); // Clears all the forward relations from this object to any other object and // the associated reverse relations on the other objects, but leaves any // reverse relations on this object alone.
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 30c66202..298b011 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -189,9 +189,9 @@ // Noisy, perhaps add later: // editable, focus*, horizontal, linked, richlyEditable, vertical // Too flaky: hovered, offscreen + // States AddFilter(filters, "check*"); AddFilter(filters, "descript*"); - AddFilter(filters, "invalid"); AddFilter(filters, "busy"); AddFilter(filters, "collapsed"); AddFilter(filters, "default"); @@ -205,6 +205,20 @@ AddFilter(filters, "required"); AddFilter(filters, "select*"); AddFilter(filters, "visited"); + // Other attributes + AddFilter(filters, "valueForRange*"); + AddFilter(filters, "minValueForRange*"); + AddFilter(filters, "maxValueForRange*"); + AddFilter(filters, "hierarchicalLevel*"); + AddFilter(filters, "aria*"); // ariaCurrentState, ariaInvalidValue, etc. + AddFilter(filters, "autoComplete*"); + AddFilter(filters, "keyShortcuts*"); + AddFilter(filters, "activedescendantId*"); + AddFilter(filters, "controlsIds*"); + AddFilter(filters, "flowtoIds*"); + AddFilter(filters, "detailsIds*"); + AddFilter(filters, "invalidState=*"); + AddFilter(filters, "invalidState=1", Filter::DENY); // Don't show false value // // OS X
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 272e0cd..1f4346d 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -967,8 +967,6 @@ base::Thread::Options io_message_loop_options; io_message_loop_options.message_loop_type = base::MessageLoop::TYPE_IO; - base::Thread::Options ui_message_loop_options; - ui_message_loop_options.message_loop_type = base::MessageLoop::TYPE_UI; // Start threads in the order they occur in the BrowserThread::ID enumeration, // except for BrowserThread::UI which is the main thread.
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc index af783af8..0ca2425 100644 --- a/content/browser/frame_host/navigation_handle_impl.cc +++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -715,7 +715,7 @@ ready_to_commit_time_ = base::TimeTicks::Now(); // For back-forward navigations, record metrics. - if (transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) { + if ((transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) && !IsSameDocument()) { bool is_same_process = render_frame_host_->GetProcess()->GetID() == frame_tree_node_->current_frame_host()->GetProcess()->GetID(); @@ -756,7 +756,7 @@ // For back-forward navigations, record metrics. if ((transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) && - !ready_to_commit_time_.is_null()) { + !ready_to_commit_time_.is_null() && !IsSameDocument()) { UMA_HISTOGRAM_TIMES("Navigation.BackForward.ReadyToCommitUntilCommit", base::TimeTicks::Now() - ready_to_commit_time_); }
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc index 3910887..548a9af 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -2240,7 +2240,8 @@ // TODO(clamy): Remove this once we understand the reason behind the // back-forward PLT regression with PlzNavigate if ((info->GetPageTransition() & ui::PAGE_TRANSITION_FORWARD_BACK) && - IsResourceTypeFrame(info->GetResourceType())) { + IsResourceTypeFrame(info->GetResourceType()) && + request->url().SchemeIsHTTPOrHTTPS()) { LogBackForwardNavigationFlagsHistogram(request->load_flags()); }
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc index 270dbad..3a18593 100644 --- a/content/browser/loader/resource_loader.cc +++ b/content/browser/loader/resource_loader.cc
@@ -645,7 +645,7 @@ // of PLT for b/f navigations in PlzNavigate. if ((info->GetPageTransition() & ui::PAGE_TRANSITION_FORWARD_BACK) && IsResourceTypeFrame(info->GetResourceType()) && - !request_->url().SchemeIsBlob()) { + request_->url().SchemeIsHTTPOrHTTPS()) { UMA_HISTOGRAM_BOOLEAN("Navigation.BackForward.WasCached", request_->was_cached()); }
diff --git a/content/browser/media/media_internals.h b/content/browser/media/media_internals.h index a0b3dbf..3cc1790 100644 --- a/content/browser/media/media_internals.h +++ b/content/browser/media/media_internals.h
@@ -87,7 +87,9 @@ // If possible, i.e. a WebContents exists for the given RenderFrameHostID, // tells an existing AudioLogEntry the WebContents title for easier - // differentiation on the UI. + // differentiation on the UI. Note that the log entry must be created (by + // calling OnCreated with |component_id| on |audio_log|) before calling this + // method. void SetWebContentsTitleForAudioLogEntry(int component_id, int render_process_id, int render_frame_id,
diff --git a/content/browser/renderer_host/input/wheel_scroll_latching_browsertest.cc b/content/browser/renderer_host/input/wheel_scroll_latching_browsertest.cc new file mode 100644 index 0000000..b19d544 --- /dev/null +++ b/content/browser/renderer_host/input/wheel_scroll_latching_browsertest.cc
@@ -0,0 +1,234 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/test/scoped_feature_list.h" +#include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_input_event_router.h" +#include "content/browser/web_contents/web_contents_impl.h" +#include "content/common/input/synthetic_web_input_event_builders.h" +#include "content/public/common/content_features.h" +#include "content/public/test/browser_test_utils.h" +#include "content/public/test/content_browser_test.h" +#include "content/public/test/content_browser_test_utils.h" +#include "content/shell/browser/shell.h" +#include "ui/events/gesture_detection/gesture_configuration.h" + +#if defined(OS_ANDROID) +#include "content/browser/renderer_host/render_widget_host_view_android.h" +#endif + +using blink::WebMouseWheelEvent; + +namespace { +void GiveItSomeTime() { + base::RunLoop run_loop; + base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( + FROM_HERE, run_loop.QuitClosure(), base::TimeDelta::FromMilliseconds(10)); + run_loop.Run(); +} + +const char kWheelEventLatchingDataURL[] = + "data:text/html;charset=utf-8," + "<!DOCTYPE html>" + "<meta name='viewport' content='width=device-width, minimum-scale=1'>" + "<style>" + "body {" + " height: 10000px;" + "}" + "#scrollableDiv {" + " position: absolute;" + " left: 50px;" + " top: 100px;" + " width: 200px;" + " height: 200px;" + " overflow: scroll;" + " background: red;" + "}" + "#nestedDiv {" + " width: 200px;" + " height: 8000px;" + " opacity: 0;" + "}" + "</style>" + "<div id='scrollableDiv'>" + " <div id='nestedDiv'></div>" + "</div>" + "<script>" + " var scrollableDiv = document.getElementById('scrollableDiv');" + " var scrollableDivWheelEventCounter = 0;" + " var documentWheelEventCounter = 0;" + " scrollableDiv.addEventListener('wheel'," + " function(e) { scrollableDivWheelEventCounter++;" + " e.stopPropagation(); });" + " document.scrollingElement.addEventListener('wheel'," + " function(e) { documentWheelEventCounter++; });" + "</script>"; +} // namespace + +namespace content { +class WheelScrollLatchingBrowserTest : public ContentBrowserTest { + public: + WheelScrollLatchingBrowserTest(bool wheel_scroll_latching_enabled = true) + : wheel_scroll_latching_enabled_(wheel_scroll_latching_enabled) { + ui::GestureConfiguration::GetInstance()->set_scroll_debounce_interval_in_ms( + 0); + + if (wheel_scroll_latching_enabled_) + EnableWheelScrollLatching(); + else + DisableWheelScrollLatching(); + } + ~WheelScrollLatchingBrowserTest() override {} + + protected: + RenderWidgetHostImpl* GetWidgetHost() { + return RenderWidgetHostImpl::From( + web_contents()->GetRenderViewHost()->GetWidget()); + } + + WebContentsImpl* web_contents() const { + return static_cast<WebContentsImpl*>(shell()->web_contents()); + } + + RenderWidgetHostInputEventRouter* GetRouter() { + return web_contents()->GetInputEventRouter(); + } + + RenderWidgetHostViewBase* GetRootView() { + return static_cast<RenderWidgetHostViewBase*>(web_contents() + ->GetFrameTree() + ->root() + ->current_frame_host() + ->GetView()); + } + + void LoadURL() { + const GURL data_url(kWheelEventLatchingDataURL); + NavigateToURL(shell(), data_url); + + RenderWidgetHostImpl* host = GetWidgetHost(); + host->GetView()->SetSize(gfx::Size(600, 600)); + + // The page is loaded in the renderer, wait for a new frame to arrive. + while (!host->ScheduleComposite()) + GiveItSomeTime(); + } + int ExecuteScriptAndExtractInt(const std::string& script) { + int value = 0; + EXPECT_TRUE(content::ExecuteScriptAndExtractInt( + shell(), "domAutomationController.send(" + script + ")", &value)); + return value; + } + void EnableWheelScrollLatching() { + feature_list_.InitFromCommandLine( + features::kTouchpadAndWheelScrollLatching.name, ""); + } + void DisableWheelScrollLatching() { + feature_list_.InitFromCommandLine( + "", features::kTouchpadAndWheelScrollLatching.name); + } + + void WheelEventTargetTest() { + LoadURL(); + EXPECT_EQ(0, ExecuteScriptAndExtractInt("documentWheelEventCounter")); + EXPECT_EQ(0, ExecuteScriptAndExtractInt("scrollableDivWheelEventCounter")); + + FrameWatcher frame_watcher(shell()->web_contents()); + scoped_refptr<InputMsgWatcher> input_msg_watcher(new InputMsgWatcher( + GetWidgetHost(), blink::WebInputEvent::kMouseWheel)); + + float scrollable_div_top = + ExecuteScriptAndExtractInt("scrollableDiv.getBoundingClientRect().top"); + float x = (ExecuteScriptAndExtractInt( + "scrollableDiv.getBoundingClientRect().left") + + ExecuteScriptAndExtractInt( + "scrollableDiv.getBoundingClientRect().right")) / + 2; + float y = 0.5 * scrollable_div_top; + float delta_x = 0; + float delta_y = -0.6 * scrollable_div_top; + blink::WebMouseWheelEvent wheel_event = + SyntheticWebMouseWheelEventBuilder::Build(x, y, x, y, delta_x, delta_y, + 0, true); + + wheel_event.phase = blink::WebMouseWheelEvent::kPhaseBegan; + GetRouter()->RouteMouseWheelEvent(GetRootView(), &wheel_event, + ui::LatencyInfo()); + + // Runs until we get the InputMsgAck callback. + EXPECT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, + input_msg_watcher->WaitForAck()); + + while (ExecuteScriptAndExtractInt("document.scrollingElement.scrollTop") < + -delta_y) { + frame_watcher.WaitFrames(1); + } + + EXPECT_EQ(0, ExecuteScriptAndExtractInt("scrollableDiv.scrollTop")); + EXPECT_EQ(1, ExecuteScriptAndExtractInt("documentWheelEventCounter")); + EXPECT_EQ(0, ExecuteScriptAndExtractInt("scrollableDivWheelEventCounter")); + + wheel_event.phase = blink::WebMouseWheelEvent::kPhaseChanged; + GetRouter()->RouteMouseWheelEvent(GetRootView(), &wheel_event, + ui::LatencyInfo()); + + // Runs until we get the InputMsgAck callback. + EXPECT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, + input_msg_watcher->WaitForAck()); + + if (wheel_scroll_latching_enabled_) { + while (ExecuteScriptAndExtractInt("document.scrollingElement.scrollTop") < + -2 * delta_y) { + frame_watcher.WaitFrames(1); + } + + EXPECT_EQ(0, ExecuteScriptAndExtractInt("scrollableDiv.scrollTop")); + EXPECT_EQ(2, ExecuteScriptAndExtractInt("documentWheelEventCounter")); + EXPECT_EQ(0, + ExecuteScriptAndExtractInt("scrollableDivWheelEventCounter")); + } else { // !wheel_scroll_latching_enabled_ + while (ExecuteScriptAndExtractInt("scrollableDiv.scrollTop") < -delta_y) + frame_watcher.WaitFrames(1); + + EXPECT_EQ(1, ExecuteScriptAndExtractInt("documentWheelEventCounter")); + EXPECT_EQ(1, + ExecuteScriptAndExtractInt("scrollableDivWheelEventCounter")); + } + } + + private: + base::test::ScopedFeatureList feature_list_; + bool wheel_scroll_latching_enabled_; +}; + +class WheelScrollLatchingDisabledBrowserTest + : public WheelScrollLatchingBrowserTest { + public: + WheelScrollLatchingDisabledBrowserTest() + : WheelScrollLatchingBrowserTest(false) {} + ~WheelScrollLatchingDisabledBrowserTest() override {} +}; + +// Start scrolling by mouse wheel on the document: the wheel event will be sent +// to the document's scrolling element, the scrollable div will be under the +// cursor after applying the scrolling. Continue scrolling by mouse wheel, since +// wheel scroll latching is enabled the wheel event will be still sent to the +// document's scrolling element and the document's scrolling element will +// continue scrolling. +IN_PROC_BROWSER_TEST_F(WheelScrollLatchingBrowserTest, WheelEventTarget) { + WheelEventTargetTest(); +} + +// Start scrolling by mouse wheel on the document: the wheel event will be sent +// to the document's scrolling element, the scrollable div will be under the +// cursor after applying the scrolloffsets. Continue scrolling by mouse wheel, +// since wheel scroll latching is disabled the wheel event will be still sent to +// the scrollable div which is currently under the cursor. The div will start +// scrolling. +IN_PROC_BROWSER_TEST_F(WheelScrollLatchingDisabledBrowserTest, + WheelEventTarget) { + WheelEventTargetTest(); +} + +} // namespace content \ No newline at end of file
diff --git a/content/browser/renderer_host/media/audio_output_delegate_impl.cc b/content/browser/renderer_host/media/audio_output_delegate_impl.cc index 381218c..8ce981d 100644 --- a/content/browser/renderer_host/media/audio_output_delegate_impl.cc +++ b/content/browser/renderer_host/media/audio_output_delegate_impl.cc
@@ -136,7 +136,6 @@ // safe. controller_event_handler_ = base::MakeUnique<ControllerEventHandler>( weak_factory_.GetWeakPtr(), stream_id_); - audio_log_->OnCreated(stream_id, params, output_device_id); controller_ = media::AudioOutputController::Create( audio_manager, controller_event_handler_.get(), params, output_device_id, reader_.get());
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc index 7a2df5f..08f407e3 100644 --- a/content/browser/renderer_host/media/audio_renderer_host.cc +++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -290,6 +290,7 @@ MediaInternals* const media_internals = MediaInternals::GetInstance(); std::unique_ptr<media::AudioLog> audio_log = media_internals->CreateAudioLog( media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER); + audio_log->OnCreated(stream_id, params, device_unique_id); media_internals->SetWebContentsTitleForAudioLogEntry( stream_id, render_process_id_, render_frame_id, audio_log.get()); auto delegate = AudioOutputDelegateImpl::Create(
diff --git a/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc b/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc index 31e5ac11..c1f6515 100644 --- a/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc +++ b/content/browser/renderer_host/media/renderer_audio_output_stream_factory_context_impl.cc
@@ -79,6 +79,7 @@ MediaInternals* const media_internals = MediaInternals::GetInstance(); std::unique_ptr<media::AudioLog> audio_log = media_internals->CreateAudioLog( media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER); + audio_log->OnCreated(stream_id, params, unique_device_id); media_internals->SetWebContentsTitleForAudioLogEntry( stream_id, render_process_id_, render_frame_id, audio_log.get());
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc index fe73293b..c88f7d6 100644 --- a/content/browser/renderer_host/render_widget_host_input_event_router.cc +++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -284,7 +284,27 @@ event->PositionInWidget().y), target, &transformed_point)) return; - } else { + } else if (root_view->wheel_scroll_latching_enabled()) { + if (event->phase == blink::WebMouseWheelEvent::kPhaseBegan) { + wheel_target_.target = FindEventTarget( + root_view, + gfx::Point(event->PositionInWidget().x, event->PositionInWidget().y), + &transformed_point); + wheel_target_.delta = + transformed_point - + gfx::Point(event->PositionInWidget().x, event->PositionInWidget().y); + target = wheel_target_.target; + } else { + if (wheel_target_.target) { + target = wheel_target_.target; + transformed_point = gfx::Point(event->PositionInWidget().x, + event->PositionInWidget().y) + + wheel_target_.delta; + } + } + + } else { // !root_view->IsMouseLocked() && + // !root_view->wheel_scroll_latching_enabled() target = FindEventTarget( root_view, gfx::Point(event->PositionInWidget().x, event->PositionInWidget().y), @@ -296,6 +316,12 @@ event->SetPositionInWidget(transformed_point.x(), transformed_point.y()); target->ProcessMouseWheelEvent(*event, latency); + + DCHECK(root_view->wheel_scroll_latching_enabled() || !wheel_target_.target); + if (event->phase == blink::WebMouseWheelEvent::kPhaseEnded || + event->momentum_phase == blink::WebMouseWheelEvent::kPhaseEnded) { + wheel_target_.target = nullptr; + } } void RenderWidgetHostInputEventRouter::RouteGestureEvent(
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.h b/content/browser/renderer_host/render_widget_host_input_event_router.h index f12ba5ddc..08bb689 100644 --- a/content/browser/renderer_host/render_widget_host_input_event_router.h +++ b/content/browser/renderer_host/render_widget_host_input_event_router.h
@@ -164,6 +164,9 @@ TargetData touchpad_gesture_target_; TargetData bubbling_gesture_scroll_target_; TargetData first_bubbling_scroll_target_; + // Used to target wheel events for the duration of a scroll when wheel scroll + // latching is enabled. + TargetData wheel_target_; // Maintains the same target between mouse down and mouse up. TargetData mouse_capture_target_;
diff --git a/content/common/service_manager/embedded_service_runner.cc b/content/common/service_manager/embedded_service_runner.cc index 7e217a1c..ee4157d6 100644 --- a/content/common/service_manager/embedded_service_runner.cc +++ b/content/common/service_manager/embedded_service_runner.cc
@@ -30,6 +30,8 @@ : name_(name.as_string()), factory_callback_(info.factory), use_own_thread_(!info.task_runner && info.use_own_thread), + message_loop_type_(info.message_loop_type), + thread_priority_(info.thread_priority), quit_closure_(quit_closure), quit_task_runner_(base::ThreadTaskRunnerHandle::Get()), service_task_runner_(info.task_runner) { @@ -43,7 +45,10 @@ if (use_own_thread_ && !thread_) { // Start a new thread if necessary. thread_.reset(new base::Thread(name_)); - thread_->Start(); + base::Thread::Options options; + options.message_loop_type = message_loop_type_; + options.priority = thread_priority_; + thread_->StartWithOptions(options); service_task_runner_ = thread_->task_runner(); } @@ -133,6 +138,8 @@ const std::string name_; const ServiceInfo::ServiceFactory factory_callback_; const bool use_own_thread_; + base::MessageLoop::Type message_loop_type_; + base::ThreadPriority thread_priority_; const base::Closure quit_closure_; const scoped_refptr<base::SingleThreadTaskRunner> quit_task_runner_;
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibility.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibility.java index fd39ba9..89c7fe2e 100644 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibility.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibility.java
@@ -144,7 +144,7 @@ } public void enable() { - nativeEnable(mNativeObj); + if (mNativeObj != 0) nativeEnable(mNativeObj); } /**
diff --git a/content/public/common/service_info.h b/content/public/common/service_info.h index a0df30c..c323b76 100644 --- a/content/public/common/service_info.h +++ b/content/public/common/service_info.h
@@ -9,7 +9,9 @@ #include "base/callback.h" #include "base/memory/ref_counted.h" +#include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" +#include "base/threading/platform_thread.h" #include "content/common/content_export.h" namespace service_manager { @@ -43,6 +45,14 @@ // // If |task_runner| is not null, this value is ignored. bool use_own_thread = false; + + // If the service uses its own thread, this determines the type of the message + // loop used by the thread. + base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_DEFAULT; + + // If the service uses its own thread, this determines the priority of the + // thread. + base::ThreadPriority thread_priority = base::ThreadPriority::NORMAL; }; } // namespace content
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc index a2ccde49..580b7826 100644 --- a/content/renderer/accessibility/blink_ax_tree_source.cc +++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -103,6 +103,9 @@ case WebAXObjectAttribute::kAriaActiveDescendant: dst_->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, value.AxID()); break; + case WebAXObjectAttribute::kAriaDetails: + dst_->AddIntAttribute(ui::AX_ATTR_DETAILS_ID, value.AxID()); + break; case WebAXObjectAttribute::kAriaErrorMessage: dst_->AddIntAttribute(ui::AX_ATTR_ERRORMESSAGE_ID, value.AxID()); break; @@ -119,10 +122,6 @@ AddIntListAttributeFromWebObjects(ui::AX_ATTR_CONTROLS_IDS, value, dst_); break; - case WebAXObjectVectorAttribute::kAriaDetails: - AddIntListAttributeFromWebObjects(ui::AX_ATTR_DETAILS_IDS, value, - dst_); - break; case WebAXObjectVectorAttribute::kAriaFlowTo: AddIntListAttributeFromWebObjects(ui::AX_ATTR_FLOWTO_IDS, value, dst_); break;
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index da5e62a6..efbddce 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -692,6 +692,7 @@ "../browser/renderer_host/input/touch_action_browsertest.cc", "../browser/renderer_host/input/touch_input_browsertest.cc", "../browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc", + "../browser/renderer_host/input/wheel_scroll_latching_browsertest.cc", "../browser/renderer_host/media/video_capture_browsertest.cc", "../browser/renderer_host/render_process_host_browsertest.cc", "../browser/renderer_host/render_view_host_browsertest.cc",
diff --git a/content/test/data/accessibility/aria/aria-alert-expected-blink.txt b/content/test/data/accessibility/aria/aria-alert-expected-blink.txt new file mode 100644 index 0000000..04322469 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-alert-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++alert liveStatus='assertive' containerLiveAtomic=true liveAtomic=true +++++staticText name='This test is for aria role="alert"' containerLiveAtomic=true +++++++inlineTextBox name='This test is for aria role="alert"' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-alert.html b/content/test/data/accessibility/aria/aria-alert.html index f38332e..00ef417 100644 --- a/content/test/data/accessibility/aria/aria-alert.html +++ b/content/test/data/accessibility/aria/aria-alert.html
@@ -5,6 +5,9 @@ @WIN-ALLOW:atomic:* @WIN-ALLOW:container-atomic:* @WIN-ALLOW:live:* +@BLINK-ALLOW:liveAtomic=true +@BLINK-ALLOW:containerLiveAtomic=true +@BLINK-ALLOW:liveStatus=* --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-application-expected-blink.txt b/content/test/data/accessibility/aria/aria-application-expected-blink.txt new file mode 100644 index 0000000..6dcc2bf --- /dev/null +++ b/content/test/data/accessibility/aria/aria-application-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++application \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-article-expected-blink.txt b/content/test/data/accessibility/aria/aria-article-expected-blink.txt new file mode 100644 index 0000000..fabb32140 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-article-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++article +++++staticText name='This is an ARIA article.' +++++++inlineTextBox name='This is an ARIA article.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt b/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt new file mode 100644 index 0000000..c93963b --- /dev/null +++ b/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt
@@ -0,0 +1,13 @@ +rootWebArea +++log +++++staticText name='This test is for aria-atomic="false"' +++++++inlineTextBox name='This test is for aria-atomic="false"' +++log containerLiveAtomic=true liveAtomic=true +++++staticText name='This test is for aria-atomic="true"' containerLiveAtomic=true +++++++inlineTextBox name='This test is for aria-atomic="true"' +++alert containerLiveAtomic=true liveAtomic=true +++++staticText name='This test is for alert.' containerLiveAtomic=true +++++++inlineTextBox name='This test is for alert.' +++status containerLiveAtomic=true liveAtomic=true +++++staticText name='This test is for status.' containerLiveAtomic=true +++++++inlineTextBox name='This test is for status.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-atomic.html b/content/test/data/accessibility/aria/aria-atomic.html index 4c368f89..28851a1 100644 --- a/content/test/data/accessibility/aria/aria-atomic.html +++ b/content/test/data/accessibility/aria/aria-atomic.html
@@ -3,6 +3,8 @@ @MAC-ALLOW:AXARIAAtomic=* @WIN-ALLOW:atomic:* @WIN-ALLOW:container-atomic:* +@BLINK-ALLOW:liveAtomic=true +@BLINK-ALLOW:containerLiveAtomic=true --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt b/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt new file mode 100644 index 0000000..97a331c9 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt
@@ -0,0 +1,13 @@ +rootWebArea +++comboBox autoComplete='inline' +++++staticText name='autocomplete=inline' +++++++inlineTextBox name='autocomplete=inline' +++comboBox autoComplete='list' +++++staticText name='autocomplete=list' +++++++inlineTextBox name='autocomplete=list' +++comboBox autoComplete='both' +++++staticText name='autocomplete=both' +++++++inlineTextBox name='autocomplete=both' +++comboBox +++++staticText name='autocomplete=none' +++++++inlineTextBox name='autocomplete=none' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-banner-expected-blink.txt b/content/test/data/accessibility/aria/aria-banner-expected-blink.txt new file mode 100644 index 0000000..235b808 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-banner-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++banner +++++staticText name='Chromium Browser' +++++++inlineTextBox name='Chromium Browser' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-busy-expected-blink.txt b/content/test/data/accessibility/aria/aria-busy-expected-blink.txt new file mode 100644 index 0000000..2100ae3 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-busy-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++log busy +++log \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-button-expected-blink.txt b/content/test/data/accessibility/aria/aria-button-expected-blink.txt new file mode 100644 index 0000000..e391dd8 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-button-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++button name='Button1' +++toggleButton name='Button2' checkedState=2 +++toggleButton name='Button3' checkedState=1 +++popUpButton haspopup name='Button4' +++button name='Button5' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-cell-expected-blink.txt b/content/test/data/accessibility/aria/aria-cell-expected-blink.txt new file mode 100644 index 0000000..6964fa3 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-cell-expected-blink.txt
@@ -0,0 +1,16 @@ +rootWebArea +++table +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt new file mode 100644 index 0000000..950d147 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++checkBox name='CheckBox1' checkedState=2 +++checkBox name='CheckBox2' checkedState=1 +++checkBox name='CheckBox3' checkedState=3 +++checkBox name='CheckBox4' checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-checked-expected-blink.txt b/content/test/data/accessibility/aria/aria-checked-expected-blink.txt new file mode 100644 index 0000000..85b21d6 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-checked-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++checkBox checkedState=2 +++checkBox checkedState=1 +++checkBox checkedState=3 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt b/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt new file mode 100644 index 0000000..502abb9 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt
@@ -0,0 +1,26 @@ +rootWebArea +++grid +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++row +++++++cell name='Safari' +++++++++staticText name='Safari' +++++++++++inlineTextBox name='Safari' +++++++cell name='WebKit' +++++++++staticText name='WebKit' +++++++++++inlineTextBox name='WebKit' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt b/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt new file mode 100644 index 0000000..5759d85 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++complementary +++++staticText name='This is ARIA role complementary.' +++++++inlineTextBox name='This is ARIA role complementary.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt b/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt new file mode 100644 index 0000000..7888d8d --- /dev/null +++ b/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++contentInfo +++++staticText name='This is ARIA role contentinfo.' +++++++inlineTextBox name='This is ARIA role contentinfo.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-controls-expected-blink.txt b/content/test/data/accessibility/aria/aria-controls-expected-blink.txt new file mode 100644 index 0000000..beda688 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-controls-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++menuBar horizontal +++++menuItem name='File' controlsIds=menu +++++menuItem name='Edit' +++menu name='File' +++++menuItem name='New' +++++menuItem name='Open' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-current-expected-blink.txt b/content/test/data/accessibility/aria/aria-current-expected-blink.txt index 70ad9d4f..cfb17ab 100644 --- a/content/test/data/accessibility/aria/aria-current-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-current-expected-blink.txt
@@ -9,13 +9,13 @@ ++++staticText name='Section three' ++++++inlineTextBox name='Section three' ++lineBreak name='<newline>' -++heading name='Section one heading' +++heading name='Section one heading' hierarchicalLevel=1 ++++staticText name='Section one heading' ++++++inlineTextBox name='Section one heading' -++heading name='Section two heading' +++heading name='Section two heading' hierarchicalLevel=1 ++++staticText name='Section two heading' ++++++inlineTextBox name='Section two heading' -++heading name='Section three heading' +++heading name='Section three heading' hierarchicalLevel=1 ++++staticText name='Section three heading' ++++++inlineTextBox name='Section three heading' ++lineBreak name='<newline>' @@ -27,4 +27,4 @@ ++++++staticText name='Span 2' ++++++++inlineTextBox name='Span 2' ++++staticText name='Span 3' -++++++inlineTextBox name='Span 3' +++++++inlineTextBox name='Span 3' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-definition-expected-blink.txt b/content/test/data/accessibility/aria/aria-definition-expected-blink.txt new file mode 100644 index 0000000..d6380991 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-definition-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++definition \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt b/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt new file mode 100644 index 0000000..a611ed6c --- /dev/null +++ b/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++textField description='Your username should be your email id' descriptionFrom=5 describedbyIds=tooltip +++tooltip name='Your username should be your email id' +++++staticText name='Your username should be your email id' +++++++inlineTextBox name='Your username should be your email id'
diff --git a/content/test/data/accessibility/aria/aria-describedby.html b/content/test/data/accessibility/aria/aria-describedby.html index 6032e13c..1bde04b 100644 --- a/content/test/data/accessibility/aria/aria-describedby.html +++ b/content/test/data/accessibility/aria/aria-describedby.html
@@ -3,6 +3,7 @@ @MAC-ALLOW:AXSubrole* @WIN-ALLOW:xml-roles:* @WIN-DENY:name* +@BLINK-ALLOW:descri* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-details-expected-blink.txt b/content/test/data/accessibility/aria/aria-details-expected-blink.txt index 0705ebf..b2d2be1 100644 --- a/content/test/data/accessibility/aria/aria-details-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-details-expected-blink.txt
@@ -1,6 +1,6 @@ rootWebArea ++genericContainer -++++textField detailsIds=paragraph +++++textField detailsId=paragraph ++paragraph ++++staticText name='Details' ++++++inlineTextBox name='Details'
diff --git a/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt b/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt new file mode 100644 index 0000000..e041347 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++dialog +++++staticText name='This is ARIA dialog.' +++++++inlineTextBox name='This is ARIA dialog.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-directory-expected-blink.txt b/content/test/data/accessibility/aria/aria-directory-expected-blink.txt new file mode 100644 index 0000000..86539306 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-directory-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++list \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-disabled-expected-blink.txt b/content/test/data/accessibility/aria/aria-disabled-expected-blink.txt new file mode 100644 index 0000000..94ddafd9 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-disabled-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++textField disabled +++++textField \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-disabled.html b/content/test/data/accessibility/aria/aria-disabled.html index 8a43117..72106c9 100644 --- a/content/test/data/accessibility/aria/aria-disabled.html +++ b/content/test/data/accessibility/aria/aria-disabled.html
@@ -1,6 +1,7 @@ <!-- @MAC-ALLOW:AXEnabled* @WIN-ALLOW:UNAVAILABLE* +@BLINK-ALLOW:disabled* --> <!DOCTYPE HTML> <html>
diff --git a/content/test/data/accessibility/aria/aria-document-expected-blink.txt b/content/test/data/accessibility/aria/aria-document-expected-blink.txt new file mode 100644 index 0000000..2af5a4e --- /dev/null +++ b/content/test/data/accessibility/aria/aria-document-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++document +++++staticText name='aria role document' +++++++inlineTextBox name='aria role document' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-dropeffect.html b/content/test/data/accessibility/aria/aria-dropeffect.html index 7b2e3cd1c..5b973f2 100644 --- a/content/test/data/accessibility/aria/aria-dropeffect.html +++ b/content/test/data/accessibility/aria/aria-dropeffect.html
@@ -10,4 +10,4 @@ <li aria-dropeffect="popup">popup</li> <li aria-dropeffect="none">none(default)</li> <li aria-dropeffect="link|popup">link</li> -</ul> \ No newline at end of file +</ul>
diff --git a/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt b/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt index 7e6a526d..fb10b03e7 100644 --- a/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt
@@ -1,6 +1,6 @@ rootWebArea ++genericContainer -++++textField errormessageId=paragraph +++++textField errormessageId=paragraph invalidState=2 ++paragraph ++++staticText name='Error' ++++++inlineTextBox name='Error'
diff --git a/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt b/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt new file mode 100644 index 0000000..28bc8d2 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++menu +++++menuItem collapsed haspopup name='New' +++++menuItem haspopup name='Open' +++++menuItem collapsed name='Save' +++++menuItem name='Quit' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-feed.html b/content/test/data/accessibility/aria/aria-feed.html index 2507820..90beb17 100644 --- a/content/test/data/accessibility/aria/aria-feed.html +++ b/content/test/data/accessibility/aria/aria-feed.html
@@ -1,8 +1,6 @@ <!-- @MAC-ALLOW:AXRole* @WIN-ALLOW:xml-roles* -@WIN-ALLOW:setsize* -@WIN-ALLOW:posinset* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-figure-expected-blink.txt b/content/test/data/accessibility/aria/aria-figure-expected-blink.txt new file mode 100644 index 0000000..9a22292 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-figure-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++figure +++++staticText name='Figure' +++++++inlineTextBox name='Figure' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt b/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt new file mode 100644 index 0000000..94292bf --- /dev/null +++ b/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++region flowtoIds=footer +++++staticText name='Lorem ipsum' +++++++inlineTextBox name='Lorem ipsum' +++footer +++++staticText name='dolor sit amet' +++++++inlineTextBox name='dolor sit amet' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-form-expected-blink.txt b/content/test/data/accessibility/aria/aria-form-expected-blink.txt new file mode 100644 index 0000000..9482feb --- /dev/null +++ b/content/test/data/accessibility/aria/aria-form-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++form \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-grid-expected-blink.txt new file mode 100644 index 0000000..23e1a8c2 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-grid-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++grid +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt b/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt new file mode 100644 index 0000000..e1bbc7a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++grid multiselectable +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-group-expected-blink.txt b/content/test/data/accessibility/aria/aria-group-expected-blink.txt new file mode 100644 index 0000000..d343516 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-group-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++group +++++link name='Group Link1' +++++++staticText name='Group Link1' +++++++++inlineTextBox name='Group Link1' +++++link name='Group Link2' +++++++staticText name='Group Link2' +++++++++inlineTextBox name='Group Link2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt b/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt new file mode 100644 index 0000000..9fcac3d --- /dev/null +++ b/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++comboBox haspopup +++comboBox \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-heading-expected-blink.txt b/content/test/data/accessibility/aria/aria-heading-expected-blink.txt new file mode 100644 index 0000000..2633076c --- /dev/null +++ b/content/test/data/accessibility/aria/aria-heading-expected-blink.txt
@@ -0,0 +1,23 @@ +rootWebArea +++heading name='ARIA Heading 1' hierarchicalLevel=1 +++++staticText name='ARIA Heading 1' +++++++inlineTextBox name='ARIA Heading 1' +++heading name='ARIA Heading 2' hierarchicalLevel=2 +++++staticText name='ARIA Heading 2' +++++++inlineTextBox name='ARIA Heading 2' +++heading name='ARIA Heading 3' hierarchicalLevel=3 +++++staticText name='ARIA Heading 3' +++++++inlineTextBox name='ARIA Heading 3' +++heading name='ARIA Heading 4' hierarchicalLevel=4 +++++staticText name='ARIA Heading 4' +++++++inlineTextBox name='ARIA Heading 4' +++heading name='ARIA Heading 5' hierarchicalLevel=5 +++++staticText name='ARIA Heading 5' +++++++inlineTextBox name='ARIA Heading 5' +++heading name='ARIA Heading 6' hierarchicalLevel=6 +++++staticText name='ARIA Heading 6' +++++++inlineTextBox name='ARIA Heading 6' +++genericContainer +++++heading name='Heading' +++++++staticText name='Heading' +++++++++inlineTextBox name='Heading' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt new file mode 100644 index 0000000..d775003 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++genericContainer +++++staticText name='blockDisplay' +++++++inlineTextBox name='blockDisplay' +++genericContainer +++++staticText name='blockDisplay Hiddenfalse' +++++++inlineTextBox name='blockDisplay Hiddenfalse' +++genericContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-img-expected-blink.txt b/content/test/data/accessibility/aria/aria-img-expected-blink.txt new file mode 100644 index 0000000..049fb738 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-img-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++image \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-invalid-expected-blink.txt b/content/test/data/accessibility/aria/aria-invalid-expected-blink.txt new file mode 100644 index 0000000..be46dc0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-invalid-expected-blink.txt
@@ -0,0 +1,27 @@ +rootWebArea +++genericContainer invalidState=2 +++++staticText name='invalid=true' +++++++inlineTextBox name='invalid=true' +++genericContainer invalidState=3 +++++staticText name='invalid=spelling' +++++++inlineTextBox name='invalid=spelling' +++genericContainer invalidState=4 +++++staticText name='invalid=grammar' +++++++inlineTextBox name='invalid=grammar' +++genericContainer +++++staticText name='invalid=false' +++++++inlineTextBox name='invalid=false' +++genericContainer +++++staticText name='invalid=<empty>' +++++++inlineTextBox name='invalid=<empty>' +++genericContainer +++++staticText name='invalid=<default>' +++++++inlineTextBox name='invalid=<default>' +++genericContainer ariaInvalidValue='unknown' invalidState=5 +++++staticText name='invalid=unknown' +++++++inlineTextBox name='invalid=unknown' +++form +++++textField invalidState=2 +++++++genericContainer +++++++++staticText name='1234' +++++++++++inlineTextBox name='1234'
diff --git a/content/test/data/accessibility/aria/aria-label-expected-blink.txt b/content/test/data/accessibility/aria/aria-label-expected-blink.txt new file mode 100644 index 0000000..99325997 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-label-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++checkBox name='aria label' checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt b/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt new file mode 100644 index 0000000..7f3d202 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++textField name='h2' +++heading name='h2' hierarchicalLevel=2 +++++staticText name='h2' +++++++inlineTextBox name='h2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-level-expected-blink.txt b/content/test/data/accessibility/aria/aria-level-expected-blink.txt new file mode 100644 index 0000000..8d7ba6b --- /dev/null +++ b/content/test/data/accessibility/aria/aria-level-expected-blink.txt
@@ -0,0 +1,43 @@ +rootWebArea +++heading name='Level 2' hierarchicalLevel=2 +++++staticText name='Level 2' +++++++inlineTextBox name='Level 2' +++heading name='Level 9' hierarchicalLevel=9 +++++staticText name='Level 9' +++++++inlineTextBox name='Level 9' +++heading name='Level 1' hierarchicalLevel=1 +++++staticText name='Level 1' +++++++inlineTextBox name='Level 1' +++heading name='Level 3' hierarchicalLevel=3 +++++staticText name='Level 3' +++++++inlineTextBox name='Level 3' +++heading name='Level 3' hierarchicalLevel=3 +++++staticText name='Level 3' +++++++inlineTextBox name='Level 3' +++heading name='Level 4' hierarchicalLevel=4 +++++staticText name='Level 4' +++++++inlineTextBox name='Level 4' +++heading name='Level 5' hierarchicalLevel=5 +++++staticText name='Level 5' +++++++inlineTextBox name='Level 5' +++tree +++++treeItem name='Tree item at level 1 ' hierarchicalLevel=1 +++++++staticText name='Tree item at level 1' +++++++++inlineTextBox name='Tree item at level 1' +++++++treeItem name='Tree item at level 2' hierarchicalLevel=2 +++++++++staticText name='Tree item at level 2' +++++++++++inlineTextBox name='Tree item at level 2' +++++treeItem name='Tree item at level 3' hierarchicalLevel=3 +++++++staticText name='Tree item at level 3' +++++++++inlineTextBox name='Tree item at level 3' +++treeGrid +++++row hierarchicalLevel=1 +++++++cell name='Cell at level 1' +++++++++staticText name='Cell at level 1' +++++++++++inlineTextBox name='Cell at level 1' +++++row hierarchicalLevel=2 +++++++cell name='Cell at level 2' +++++++++staticText name='Cell at level 2' +++++++++++inlineTextBox name='Cell at level 2' +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-list-expected-blink.txt b/content/test/data/accessibility/aria/aria-list-expected-blink.txt new file mode 100644 index 0000000..50b8b63 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-list-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++list +++++listItem name='1' +++++++staticText name='Item 1' +++++++++inlineTextBox name='Item 1' +++++listItem name='2' +++++++staticText name='Item 2' +++++++++inlineTextBox name='Item 2' +++++listItem name='3' +++++++staticText name='Item 3' +++++++++inlineTextBox name='Item 3' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt new file mode 100644 index 0000000..22a40e73 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++listBox activedescendantId=listBoxOption +++++listBoxOption selectable name='1' +++++listBoxOption selectable name='2' +++++listBoxOption selectable selected name='3' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt new file mode 100644 index 0000000..c156be0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++listBox +++++listBoxOption selectable name='1' +++++listBoxOption selectable name='2' +++++listBoxOption selectable name='3' +++++listBoxOption selectable selected name='4' +++++listBoxOption selectable selected name='5' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt new file mode 100644 index 0000000..e56ab32c --- /dev/null +++ b/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++listBox +++++listBoxOption selectable name='1' +++++listBoxOption selectable selected name='2' +++++listBoxOption selectable name='3' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt new file mode 100644 index 0000000..6eaefd90 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++listBox +++++listBoxOption selectable name='Item 1' +++++listBoxOption selectable name='Item 2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt b/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt new file mode 100644 index 0000000..2ae18cf --- /dev/null +++ b/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++list +++++listItem name='1' +++++++staticText name='Item 1' +++++++++inlineTextBox name='Item 1' +++++listItem name='2' +++++++staticText name='Item 2' +++++++++inlineTextBox name='Item 2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-live-expected-blink.txt b/content/test/data/accessibility/aria/aria-live-expected-blink.txt new file mode 100644 index 0000000..b5cb017f --- /dev/null +++ b/content/test/data/accessibility/aria/aria-live-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++marquee +++marquee containerLiveRelevant='additions text' containerLiveStatus='polite' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++marquee containerLiveRelevant='additions text' containerLiveStatus='assertive' liveRelevant='additions text' liveStatus='assertive' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++alert containerLiveRelevant='additions text' containerLiveStatus='assertive' liveRelevant='additions text' liveStatus='assertive' containerLiveAtomic=true containerLiveBusy=false liveAtomic=true liveBusy=false \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt b/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt new file mode 100644 index 0000000..332616e0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt
@@ -0,0 +1,10 @@ +rootWebArea +++marquee +++++staticText name='Off' +++++++inlineTextBox name='Off' +++marquee containerLiveRelevant='additions text' containerLiveStatus='polite' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++++staticText containerLiveRelevant='additions text' containerLiveStatus='polite' name='Polite' liveRelevant='additions text' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++++++inlineTextBox name='Polite' +++marquee containerLiveRelevant='additions text' containerLiveStatus='assertive' liveRelevant='additions text' liveStatus='assertive' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++++staticText containerLiveRelevant='additions text' containerLiveStatus='assertive' name='Assertive' liveRelevant='additions text' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++++++inlineTextBox name='Assertive' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-live-with-content.html b/content/test/data/accessibility/aria/aria-live-with-content.html index fad1b4f..7122ad4 100644 --- a/content/test/data/accessibility/aria/aria-live-with-content.html +++ b/content/test/data/accessibility/aria/aria-live-with-content.html
@@ -4,6 +4,8 @@ @WIN-ALLOW:live* @WIN-ALLOW:container* @WIN-ALLOW:BUSY* +@BLINK-ALLOW:live* +@BLINK-ALLOW:container* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-live.html b/content/test/data/accessibility/aria/aria-live.html index 42d12ba..222a924 100644 --- a/content/test/data/accessibility/aria/aria-live.html +++ b/content/test/data/accessibility/aria/aria-live.html
@@ -5,6 +5,8 @@ @WIN-ALLOW:live* @WIN-ALLOW:container* @WIN-ALLOW:BUSY* +@BLINK-ALLOW:live* +@BLINK-ALLOW:container* --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-log-expected-blink.txt b/content/test/data/accessibility/aria/aria-log-expected-blink.txt new file mode 100644 index 0000000..34feffd --- /dev/null +++ b/content/test/data/accessibility/aria/aria-log-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++log \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-main-expected-blink.txt b/content/test/data/accessibility/aria/aria-main-expected-blink.txt new file mode 100644 index 0000000..b19eee86 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-main-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++main \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-marquee-expected-blink.txt b/content/test/data/accessibility/aria/aria-marquee-expected-blink.txt new file mode 100644 index 0000000..c7c30cb8 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-marquee-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++marquee +++marquee containerLiveRelevant='additions text' containerLiveStatus='polite' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false +++marquee containerLiveRelevant='additions text' containerLiveStatus='assertive' liveRelevant='additions text' liveStatus='assertive' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false
diff --git a/content/test/data/accessibility/aria/aria-marquee.html b/content/test/data/accessibility/aria/aria-marquee.html index d3a52399..96e1a8d9 100644 --- a/content/test/data/accessibility/aria/aria-marquee.html +++ b/content/test/data/accessibility/aria/aria-marquee.html
@@ -6,6 +6,8 @@ @WIN-ALLOW:live* @WIN-ALLOW:container* @WIN-ALLOW:BUSY* +@BLINK-ALLOW:live* +@BLINK-ALLOW:container* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-math-expected-blink.txt b/content/test/data/accessibility/aria/aria-math-expected-blink.txt new file mode 100644 index 0000000..ab25093f --- /dev/null +++ b/content/test/data/accessibility/aria/aria-math-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++math +++++staticText name='ARIA role math.' +++++++inlineTextBox name='ARIA role math.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-menu-expected-blink.txt b/content/test/data/accessibility/aria/aria-menu-expected-blink.txt new file mode 100644 index 0000000..819d35a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-menu-expected-blink.txt
@@ -0,0 +1,10 @@ +rootWebArea +++menuBar horizontal +++++menuItem name='File' controlsIds=menu +++++menuItem name='Edit' +++++menuItem name='View' +++menu name='File' +++++menuItem name='New' +++++menuItem name='Open' +++++menuItem name='Save' +++++menuItem name='Quit'
diff --git a/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt b/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt new file mode 100644 index 0000000..0d1724a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++menuBar horizontal +++++menuItem name='File' +++++menuItem name='Edit' +++++menuItem name='View' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt new file mode 100644 index 0000000..73e79a0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++menu +++++menuItem name='File' +++++menuItem name='Edit' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt new file mode 100644 index 0000000..8a0a315 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++menu +++++menuItemCheckBox name='Menu item 1' checkedState=1 +++++++staticText name='Menu item 1' +++++++++inlineTextBox name='Menu item 1' +++++menuItemCheckBox name='Menu item 2' checkedState=2 +++++++staticText name='Menu item 2' +++++++++inlineTextBox name='Menu item 2' +++++menuItemCheckBox name='Menu item 3' checkedState=3 +++++++staticText name='Menu item 3' +++++++++inlineTextBox name='Menu item 3' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt new file mode 100644 index 0000000..0949c00 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++menu +++++menuItemRadio name='Menu item 1' checkedState=1 +++++++staticText name='Menu item 1' +++++++++inlineTextBox name='Menu item 1' +++++menuItemRadio name='Menu item 2' checkedState=2 +++++++staticText name='Menu item 2' +++++++++inlineTextBox name='Menu item 2' +++++menuItemRadio name='Menu item 3' checkedState=3 +++++++staticText name='Menu item 3' +++++++++inlineTextBox name='Menu item 3' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt b/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt new file mode 100644 index 0000000..4d3b48c6 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++listBox multiselectable +++listBox \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-navigation-expected-blink.txt b/content/test/data/accessibility/aria/aria-navigation-expected-blink.txt new file mode 100644 index 0000000..30ab57a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-navigation-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++navigation \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-none-expected-blink.txt b/content/test/data/accessibility/aria/aria-none-expected-blink.txt new file mode 100644 index 0000000..665640d --- /dev/null +++ b/content/test/data/accessibility/aria/aria-none-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++staticText name='With aria-role none' +++++inlineTextBox name='With aria-role none' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-note-expected-blink.txt b/content/test/data/accessibility/aria/aria-note-expected-blink.txt new file mode 100644 index 0000000..f7f65cf --- /dev/null +++ b/content/test/data/accessibility/aria/aria-note-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++note \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-orientation-expected-blink.txt b/content/test/data/accessibility/aria/aria-orientation-expected-blink.txt new file mode 100644 index 0000000..af0402f9 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-orientation-expected-blink.txt
@@ -0,0 +1,40 @@ +rootWebArea +++comboBox vertical +++comboBox horizontal +++comboBox vertical +++listBox vertical +++listBox horizontal +++listBox vertical +++menu vertical +++menu horizontal +++menu vertical +++menuBar horizontal +++menuBar horizontal +++menuBar vertical +++radioGroup +++radioGroup horizontal +++radioGroup vertical +++scrollBar vertical valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++scrollBar horizontal valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++scrollBar vertical valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++slider horizontal valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++slider horizontal valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++slider vertical valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++splitter horizontal +++splitter horizontal +++splitter vertical +++tabList horizontal +++tabList horizontal +++tabList vertical +++toolbar horizontal +++toolbar horizontal +++toolbar vertical +++tree vertical +++tree horizontal +++tree vertical +++treeGrid +++++tableHeaderContainer +++treeGrid horizontal +++++tableHeaderContainer +++treeGrid vertical +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-orientation.html b/content/test/data/accessibility/aria/aria-orientation.html index 88187b20..7e67106 100644 --- a/content/test/data/accessibility/aria/aria-orientation.html +++ b/content/test/data/accessibility/aria/aria-orientation.html
@@ -2,6 +2,8 @@ @MAC-ALLOW:AXOrientation=* @WIN-ALLOW:IA2_STATE_VERTICAL @WIN-ALLOW:IA2_STATE_HORIZONTAL +@BLINK-ALLOW:vertical +@BLINK-ALLOW:horizontal --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-owns-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-expected-blink.txt new file mode 100644 index 0000000..525ea5b --- /dev/null +++ b/content/test/data/accessibility/aria/aria-owns-expected-blink.txt
@@ -0,0 +1,17 @@ +rootWebArea +++list +++++listItem +++++++genericContainer +++++++++listMarker name='•' +++++++++staticText name='One' +++++++++++inlineTextBox name='One' +++++listItem +++++++listMarker name='•' +++++++genericContainer +++++++++staticText name='Two' +++++++++++inlineTextBox name='Two' +++listItem +++++listMarker name='•' +++++genericContainer +++++++staticText name='Three' +++++++++inlineTextBox name='Three' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt b/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt new file mode 100644 index 0000000..d54814e --- /dev/null +++ b/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt
@@ -0,0 +1,43 @@ +rootWebArea +++listBox +++++listBoxOption selectable name='Item 1' setSize=2 posInSet=1 +++++listBoxOption selectable name='Item 2' setSize=2 posInSet=2 +++listBox +++++listBoxOption selectable name='Item 1' setSize=2 posInSet=1 +++++listBoxOption selectable name='Item 2' setSize=2 posInSet=2 +++form +++++radioButton setSize=4 posInSet=3 checkedState=3 +++++staticText name='1' +++++++inlineTextBox name='1' +++++lineBreak name='<newline>' +++++++inlineTextBox name='<newline>' +++++radioButton setSize=4 posInSet=4 checkedState=3 +++++staticText name='2' +++++++inlineTextBox name='2' +++radioButton setSize=2 posInSet=1 checkedState=3 +++staticText name='Apple' +++++inlineTextBox name='Apple' +++lineBreak name='<newline>' +++++inlineTextBox name='<newline>' +++radioButton setSize=2 posInSet=2 checkedState=3 +++staticText name='Banana' +++++inlineTextBox name='Banana' +++group name='Cake' +++++legend +++++++staticText name='Cake' +++++++++inlineTextBox name='Cake' +++++radioButton name='Chiffon cakes' setSize=2 posInSet=1 checkedState=2 +++++lineBreak name='<newline>' +++++++inlineTextBox name='<newline>' +++++radioButton name='Chocolate cakes' setSize=2 posInSet=2 checkedState=1 +++form +++++paragraph +++++++button name='changedFromRadio' +++++++labelText +++++++++staticText name='red' +++++++++++inlineTextBox name='red' +++++++lineBreak name='<newline>' +++++++++inlineTextBox name='<newline>' +++++++radioButton name='blue' setSize=1 posInSet=1 checkedState=3 +++staticText name='Done' +++++inlineTextBox name='Done'
diff --git a/content/test/data/accessibility/aria/aria-posinset.html b/content/test/data/accessibility/aria/aria-posinset.html index ea61f59..8a38ec5 100644 --- a/content/test/data/accessibility/aria/aria-posinset.html +++ b/content/test/data/accessibility/aria/aria-posinset.html
@@ -3,6 +3,8 @@ @MAC-ALLOW:AXARIA* @WIN-ALLOW:setsize* @WIN-ALLOW:posinset* +@BLINK-ALLOW:setSize* +@BLINK-ALLOW:posInSet* @WAIT-FOR:Done --> <html>
diff --git a/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt b/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt new file mode 100644 index 0000000..0fe92ae --- /dev/null +++ b/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++staticText name='aria-role presentation' +++++inlineTextBox name='aria-role presentation' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt b/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt new file mode 100644 index 0000000..52928f61 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++button name='Regular button' +++toggleButton name='Toggle button unpressed' checkedState=1 +++toggleButton name='Toggle button pressed' checkedState=2 +++toggleButton name='Toggle button mixed' checkedState=3 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-progressbar-expected-blink.txt b/content/test/data/accessibility/aria/aria-progressbar-expected-blink.txt index 38185fe1..12cd448 100644 --- a/content/test/data/accessibility/aria/aria-progressbar-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-progressbar-expected-blink.txt
@@ -1,3 +1,3 @@ rootWebArea -++progressIndicator -++progressIndicator value='three' \ No newline at end of file +++progressIndicator valueForRange=3.00 minValueForRange=1.00 maxValueForRange=37.00 +++progressIndicator value='three' valueForRange=0.00 minValueForRange=1.00 maxValueForRange=96.00 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-radio-expected-blink.txt b/content/test/data/accessibility/aria/aria-radio-expected-blink.txt new file mode 100644 index 0000000..2568657 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-radio-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++radioButton name='Radio1' checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt b/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt new file mode 100644 index 0000000..046e811 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt
@@ -0,0 +1,10 @@ +rootWebArea +++genericContainer +++++textField +++++++genericContainer +++++++++staticText name='Editable text' +++++++++++inlineTextBox name='Editable text' +++++textField ariaReadonly=true +++++++genericContainer +++++++++staticText name='Uneditable text' +++++++++++inlineTextBox name='Uneditable text' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-region-expected-blink.txt b/content/test/data/accessibility/aria/aria-region-expected-blink.txt new file mode 100644 index 0000000..f94d0c1 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-region-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++region +++++staticText name='This is an ARIA region.' +++++++inlineTextBox name='This is an ARIA region.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-relevant-expected-blink.txt b/content/test/data/accessibility/aria/aria-relevant-expected-blink.txt new file mode 100644 index 0000000..e036d49 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-relevant-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++log containerLiveRelevant='additions' liveRelevant='additions' +++log containerLiveRelevant='removals' liveRelevant='removals' +++log containerLiveRelevant='text' liveRelevant='text' +++log containerLiveRelevant='all' liveRelevant='all' +++log containerLiveRelevant='additions text' liveRelevant='additions text' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-relevant.html b/content/test/data/accessibility/aria/aria-relevant.html index c5f7481..811212c 100644 --- a/content/test/data/accessibility/aria/aria-relevant.html +++ b/content/test/data/accessibility/aria/aria-relevant.html
@@ -3,6 +3,8 @@ @MAC-ALLOW:AXARIARelevant* @WIN-ALLOW:relevant:* @WIN-ALLOW:container-relevant:* +@BLINK-ALLOW:liveRelevant* +@BLINK-ALLOW:containerLiveRelevant* --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-required-expected-blink.txt b/content/test/data/accessibility/aria/aria-required-expected-blink.txt new file mode 100644 index 0000000..043910b --- /dev/null +++ b/content/test/data/accessibility/aria/aria-required-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++radioGroup required +++++radioButton checkedState=1 +++++radioButton checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-row-expected-blink.txt b/content/test/data/accessibility/aria/aria-row-expected-blink.txt new file mode 100644 index 0000000..502abb9 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-row-expected-blink.txt
@@ -0,0 +1,26 @@ +rootWebArea +++grid +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++row +++++++cell name='Safari' +++++++++staticText name='Safari' +++++++++++inlineTextBox name='Safari' +++++++cell name='WebKit' +++++++++staticText name='WebKit' +++++++++++inlineTextBox name='WebKit' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt b/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt new file mode 100644 index 0000000..875781a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++grid +++++row +++++row +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt b/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt new file mode 100644 index 0000000..9296c14 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt
@@ -0,0 +1,26 @@ +rootWebArea +++grid +++++row +++++++rowHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Safari' +++++++++staticText name='Safari' +++++++++++inlineTextBox name='Safari' +++++row +++++++rowHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++++cell name='WebKit' +++++++++staticText name='WebKit' +++++++++++inlineTextBox name='WebKit' +++++column +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt b/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt new file mode 100644 index 0000000..674742a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++scrollBar vertical valueForRange=55.00 minValueForRange=0.00 maxValueForRange=0.00 +++scrollBar horizontal valueForRange=55.00 minValueForRange=0.00 maxValueForRange=0.00 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-scrollbar.html b/content/test/data/accessibility/aria/aria-scrollbar.html index 7759f75..0663156 100644 --- a/content/test/data/accessibility/aria/aria-scrollbar.html +++ b/content/test/data/accessibility/aria/aria-scrollbar.html
@@ -6,6 +6,8 @@ @WIN-ALLOW:value* @WIN-DENY:value='http://*' @WIN-ALLOW:xml-roles:* +@BLINK-ALLOW:horizontal +@BLINK-ALLOW:vertical --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-search-expected-blink.txt b/content/test/data/accessibility/aria/aria-search-expected-blink.txt new file mode 100644 index 0000000..737e496 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-search-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++search +++++staticText name='ARIA role search.' +++++++inlineTextBox name='ARIA role search.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-searchbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-searchbox-expected-blink.txt new file mode 100644 index 0000000..6df29ce --- /dev/null +++ b/content/test/data/accessibility/aria/aria-searchbox-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++searchBox +++++staticText name='ARIA role searchbox.' +++++++inlineTextBox name='ARIA role searchbox.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-selected-expected-blink.txt b/content/test/data/accessibility/aria/aria-selected-expected-blink.txt new file mode 100644 index 0000000..7aa2aeaaa --- /dev/null +++ b/content/test/data/accessibility/aria/aria-selected-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++listBox +++++listBoxOption selectable selected name='1' +++++listBoxOption selectable name='2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-separator-expected-blink.txt b/content/test/data/accessibility/aria/aria-separator-expected-blink.txt new file mode 100644 index 0000000..04df8a0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-separator-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++staticText name='Before' +++++inlineTextBox name='Before' +++splitter horizontal +++++staticText name='ARIA separator. No value when unfocusable.' +++++++inlineTextBox name='ARIA separator. No value when unfocusable.' +++splitter horizontal valueForRange=1.00 minValueForRange=1.00 maxValueForRange=3.00 +++++staticText name='ARIA separator. Can have a value when focusable.' +++++++inlineTextBox name='ARIA separator. Can have a value when focusable.' +++staticText name='After' +++++inlineTextBox name='After' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt b/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt new file mode 100644 index 0000000..6bbb422c --- /dev/null +++ b/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt
@@ -0,0 +1,12 @@ +rootWebArea +++listBox +++++listBoxOption selectable name='Item 1' setSize=4 posInSet=1 +++++listBoxOption selectable name='Item 2' setSize=4 posInSet=2 +++++listBoxOption selectable name='Item 3' setSize=4 posInSet=3 +++++listBoxOption selectable name='Item 4' setSize=4 posInSet=4 +++listBox +++++listBoxOption selectable name='Item 1' setSize=5 posInSet=1 +++++listBoxOption selectable name='Item 2' setSize=5 posInSet=2 +++++listBoxOption selectable name='Item 3' setSize=5 posInSet=3 +++++listBoxOption selectable name='Item 4' setSize=5 posInSet=4 +++++listBoxOption selectable name='Item 5' setSize=5 posInSet=5 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-setsize.html b/content/test/data/accessibility/aria/aria-setsize.html index e9ffd1c..6e5e7a3b 100644 --- a/content/test/data/accessibility/aria/aria-setsize.html +++ b/content/test/data/accessibility/aria/aria-setsize.html
@@ -3,6 +3,8 @@ @MAC-ALLOW:AXARIA* @WIN-ALLOW:setsize* @WIN-ALLOW:posinset* +@BLINK-ALLOW:setSize* +@BLINK-ALLOW:posInSet* --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-slider-expected-blink.txt b/content/test/data/accessibility/aria/aria-slider-expected-blink.txt new file mode 100644 index 0000000..8e8bd03 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-slider-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++slider horizontal valueForRange=5.00 minValueForRange=1.00 maxValueForRange=10.00
diff --git a/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt new file mode 100644 index 0000000..12e1a43 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt
@@ -0,0 +1,151 @@ +rootWebArea +++grid +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++grid +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++grid +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++grid +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++tableHeaderContainer +++grid +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++tableHeaderContainer +++grid +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++column +++++column +++++tableHeaderContainer +++grid +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++column +++++column +++++tableHeaderContainer +++grid +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++column +++++column +++++tableHeaderContainer +++grid +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++column +++++column +++++tableHeaderContainer +++grid +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt b/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt new file mode 100644 index 0000000..7db821e0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt
@@ -0,0 +1,169 @@ +rootWebArea +++table name='Data table' +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++column +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++column +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++column +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++column +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++rowHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++column +++++column +++++column +++++tableHeaderContainer +++table name='Data table' +++++row +++++++columnHeader name='Alphabet' +++++++++staticText name='Alphabet' +++++++++++inlineTextBox name='Alphabet' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++row +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++column +++++tableHeaderContainer +++genericContainer +++++staticText name='Alphabet' +++++++inlineTextBox name='Alphabet' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-status-expected-blink.txt b/content/test/data/accessibility/aria/aria-status-expected-blink.txt new file mode 100644 index 0000000..39ccbe0 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-status-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++status containerLiveRelevant='additions text' containerLiveStatus='polite' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=true containerLiveBusy=false liveAtomic=true liveBusy=false +++status containerLiveRelevant='additions text' containerLiveStatus='polite' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false liveBusy=false \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-status.html b/content/test/data/accessibility/aria/aria-status.html index a76335b..2c77c87 100644 --- a/content/test/data/accessibility/aria/aria-status.html +++ b/content/test/data/accessibility/aria/aria-status.html
@@ -7,6 +7,8 @@ @WIN-ALLOW:*live* @WIN-ALLOW:*relevant* @WIN-ALLOW:xml-roles* +@BLINK-ALLOW:live* +@BLINK-ALLOW:container* --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-switch-expected-blink.txt b/content/test/data/accessibility/aria/aria-switch-expected-blink.txt new file mode 100644 index 0000000..f148410 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-switch-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++switch name='Switch1' checkedState=1 +++switch name='Switch2' checkedState=2 +++switch name='Switch3' checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-tab-expected-blink.txt b/content/test/data/accessibility/aria/aria-tab-expected-blink.txt new file mode 100644 index 0000000..33e15c3 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-tab-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++tabList horizontal +++++tab name='Tab 1' setSize=2 posInSet=1 +++++tab name='Tab 2' setSize=2 posInSet=2 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-tab.html b/content/test/data/accessibility/aria/aria-tab.html index 1164a60..90d66fb 100644 --- a/content/test/data/accessibility/aria/aria-tab.html +++ b/content/test/data/accessibility/aria/aria-tab.html
@@ -2,6 +2,9 @@ @MAC-ALLOW:AXRole* @WIN-ALLOW:xml-roles* @WIN-ALLOW:IA2_STATE_HORIZONTAL +@BLINK-ALLOW:horizontal +@BLINK-ALLOW:setSize* +@BLINK-ALLOW:posInSet* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-table-expected-blink.txt b/content/test/data/accessibility/aria/aria-table-expected-blink.txt new file mode 100644 index 0000000..6964fa3 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-table-expected-blink.txt
@@ -0,0 +1,16 @@ +rootWebArea +++table +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt b/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt new file mode 100644 index 0000000..32dcf9a --- /dev/null +++ b/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++tabList horizontal +++++tab name='Tab 1' +++++tab name='Tab 2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-tablist.html b/content/test/data/accessibility/aria/aria-tablist.html index 1164a60..e049c34 100644 --- a/content/test/data/accessibility/aria/aria-tablist.html +++ b/content/test/data/accessibility/aria/aria-tablist.html
@@ -2,6 +2,7 @@ @MAC-ALLOW:AXRole* @WIN-ALLOW:xml-roles* @WIN-ALLOW:IA2_STATE_HORIZONTAL +@BLINK-ALLOW:horizontal --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt b/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt new file mode 100644 index 0000000..9a422929 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++tabPanel +++++tab name='Item' +++++tab name='Prices' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-term-expected-blink.txt b/content/test/data/accessibility/aria/aria-term-expected-blink.txt new file mode 100644 index 0000000..5ff8c71 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-term-expected-blink.txt
@@ -0,0 +1,14 @@ +rootWebArea +++list +++++term +++++++staticText name='Term1' +++++++++inlineTextBox name='Term1' +++++definition +++++++staticText name='Definition1' +++++++++inlineTextBox name='Definition1' +++++term +++++++staticText name='Term2' +++++++++inlineTextBox name='Term2' +++++definition +++++++staticText name='Definition2' +++++++++inlineTextBox name='Definition2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-textbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-textbox-expected-blink.txt new file mode 100644 index 0000000..ea8d527 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-textbox-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++textField +++++staticText name='TextBox1' +++++++inlineTextBox name='TextBox1' +++textField +++++staticText name='TextBox2' +++++++inlineTextBox name='TextBox2' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-blink.txt b/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-blink.txt new file mode 100644 index 0000000..5eccce2 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++textField +++++staticText name='Single line.' +++++++inlineTextBox name='Single line.' +++textField +++++staticText name='Multiple' +++++++inlineTextBox name='Multiple' +++++lineBreak name='<newline>' +++++++inlineTextBox name='<newline>' +++++staticText name='lines.' +++++++inlineTextBox name='lines.' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-timer-expected-blink.txt b/content/test/data/accessibility/aria/aria-timer-expected-blink.txt new file mode 100644 index 0000000..554b469 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-timer-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++timer +++++staticText name='This test is for aria-role = timer' +++++++inlineTextBox name='This test is for aria-role = timer' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt b/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt new file mode 100644 index 0000000..9c179a5 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++button name='Regular button' +++toggleButton name='Toggle button' checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt b/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt new file mode 100644 index 0000000..e2383e2 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++toolbar horizontal +++++staticText name='A toolbar' +++++++inlineTextBox name='A toolbar' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt b/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt new file mode 100644 index 0000000..6e967ea7 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++textField description='Your username should be your email id' descriptionFrom=5 +++tooltip name='Your username should be your email id' +++++staticText name='Your username should be your email id' +++++++inlineTextBox name='Your username should be your email id' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt b/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt new file mode 100644 index 0000000..e768218 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++treeGrid +++++row hierarchicalLevel=1 +++++++cell name='Cell at level 1' +++++++++staticText name='Cell at level 1' +++++++++++inlineTextBox name='Cell at level 1' +++++row hierarchicalLevel=2 +++++++cell name='Cell at level 2' +++++++++staticText name='Cell at level 2' +++++++++++inlineTextBox name='Cell at level 2' +++++column +++++tableHeaderContainer +++treeGrid +++++row hierarchicalLevel=1 +++++++cell name='Cell at level 1' +++++++++staticText name='Cell at level 1' +++++++++++inlineTextBox name='Cell at level 1' +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-valuenow-expected-blink.txt b/content/test/data/accessibility/aria/aria-valuenow-expected-blink.txt new file mode 100644 index 0000000..f234f02 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-valuenow-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++progressIndicator valueForRange=3.00 minValueForRange=0.00 maxValueForRange=0.00 \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-valuetext-expected-blink.txt b/content/test/data/accessibility/aria/aria-valuetext-expected-blink.txt new file mode 100644 index 0000000..74a3b40 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-valuetext-expected-blink.txt
@@ -0,0 +1,2 @@ +rootWebArea +++progressIndicator valueForRange=0.00 minValueForRange=1.00 maxValueForRange=96.00 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/a-name-calc-expected-blink.txt b/content/test/data/accessibility/html/a-name-calc-expected-blink.txt new file mode 100644 index 0000000..bb5d079 --- /dev/null +++ b/content/test/data/accessibility/html/a-name-calc-expected-blink.txt
@@ -0,0 +1,16 @@ +rootWebArea +++link name='InnerText0' nameFrom=4 +++++staticText name='InnerText0' nameFrom=4 +++++++inlineTextBox name='InnerText0' nameFrom=4 +++link description='Title1' name='InnerText1' nameFrom=4 descriptionFrom=2 +++++staticText name='InnerText1' nameFrom=4 +++++++inlineTextBox name='InnerText1' nameFrom=4 +++link name='Title2' nameFrom=2 +++++staticText name='InnerText2' nameFrom=4 +++++++inlineTextBox name='InnerText2' nameFrom=4 +++link name='LabelledBy3' nameFrom=6 +++++staticText name='InnerText3' nameFrom=4 +++++++inlineTextBox name='InnerText3' nameFrom=4 +++link name='Title4' nameFrom=2 +++link name='Label5' nameFrom=2 +++link name='LabelledBy6' nameFrom=6 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/a-name-calc.html b/content/test/data/accessibility/html/a-name-calc.html index a637b124..10467ad 100644 --- a/content/test/data/accessibility/html/a-name-calc.html +++ b/content/test/data/accessibility/html/a-name-calc.html
@@ -4,6 +4,7 @@ @MAC-ALLOW:AXDescription* @MAC-ALLOW:AXHelp* @MAC-DENY:AXValue* +@BLINK-ALLOW:nameFrom* --> <html> <body>
diff --git a/content/test/data/accessibility/html/a-name-expected-blink.txt b/content/test/data/accessibility/html/a-name-expected-blink.txt new file mode 100644 index 0000000..80372bce --- /dev/null +++ b/content/test/data/accessibility/html/a-name-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++anchor name='named anchor' +++++staticText name='named anchor' +++++++inlineTextBox name='named anchor' +++link name='both a named anchor and a link' +++++staticText name='both a named anchor and a link' +++++++inlineTextBox name='both a named anchor and a link' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/a-no-text-expected-blink.txt b/content/test/data/accessibility/html/a-no-text-expected-blink.txt new file mode 100644 index 0000000..e783460 --- /dev/null +++ b/content/test/data/accessibility/html/a-no-text-expected-blink.txt
@@ -0,0 +1,22 @@ +rootWebArea +++genericContainer +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link name=' ' +++++++image +++++link +++++++image +++++link +++++++image \ No newline at end of file
diff --git a/content/test/data/accessibility/html/a-onclick-expected-blink.txt b/content/test/data/accessibility/html/a-onclick-expected-blink.txt new file mode 100644 index 0000000..84889af --- /dev/null +++ b/content/test/data/accessibility/html/a-onclick-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++link name='link with no href but onclick' defaultActionVerb=4 +++++staticText name='link with no href but onclick' defaultActionVerb=3 +++++++inlineTextBox name='link with no href but onclick' +++link name='link with no href and click handler added via script' defaultActionVerb=4 +++++staticText name='link with no href and click handler added via script' defaultActionVerb=3 +++++++inlineTextBox name='link with no href and click handler added via script'
diff --git a/content/test/data/accessibility/html/a-onclick.html b/content/test/data/accessibility/html/a-onclick.html index b4ae70f..5ae2827 100644 --- a/content/test/data/accessibility/html/a-onclick.html +++ b/content/test/data/accessibility/html/a-onclick.html
@@ -1,3 +1,6 @@ +<!-- +@BLINK-ALLOW:defaultActionVerb* +--> <html> <style>a { text-decoration: underline; display: block; }</style> <body>
diff --git a/content/test/data/accessibility/html/abbr-expected-blink.txt b/content/test/data/accessibility/html/abbr-expected-blink.txt new file mode 100644 index 0000000..c68f15b --- /dev/null +++ b/content/test/data/accessibility/html/abbr-expected-blink.txt
@@ -0,0 +1,9 @@ +rootWebArea +++paragraph +++++staticText name='The ' +++++++inlineTextBox name='The ' +++++abbr name='World Health Organization' +++++++staticText name='WHO' +++++++++inlineTextBox name='WHO' +++++staticText name=' was founded in 1948.' +++++++inlineTextBox name=' was founded in 1948.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/action-verbs-expected-blink.txt b/content/test/data/accessibility/html/action-verbs-expected-blink.txt index f09a965a..814f2e5 100644 --- a/content/test/data/accessibility/html/action-verbs-expected-blink.txt +++ b/content/test/data/accessibility/html/action-verbs-expected-blink.txt
@@ -2,7 +2,7 @@ ++genericContainer ++++staticText name='Generic div' ++++++inlineTextBox name='Generic div' -++heading name='Heading' +++heading name='Heading' hierarchicalLevel=1 ++++staticText name='Heading' ++++++inlineTextBox name='Heading' ++button name='Button' defaultActionVerb=6 @@ -15,7 +15,7 @@ ++radioButton defaultActionVerb=7 checkedState=3 ++switch name='ARIA Switch' defaultActionVerb=2 checkedState=1 ++popUpButton collapsed haspopup defaultActionVerb=5 -++++menuListPopup invisible +++++menuListPopup invisible activedescendantId=menuListOption ++++++menuListOption selectable selected name='Pop-up button' defaultActionVerb=3 ++genericContainer defaultActionVerb=3 ++++staticText name='Div with click handler' defaultActionVerb=3
diff --git a/content/test/data/accessibility/html/actions-expected-blink.txt b/content/test/data/accessibility/html/actions-expected-blink.txt index bc0b2de..c506f49 100644 --- a/content/test/data/accessibility/html/actions-expected-blink.txt +++ b/content/test/data/accessibility/html/actions-expected-blink.txt
@@ -1,6 +1,6 @@ rootWebArea name='Actions' ++genericContainer -++++slider horizontal actions=setValue +++++slider horizontal valueForRange=50.00 minValueForRange=1.00 maxValueForRange=100.00 actions=setValue ++++++sliderThumb ++++textField name='Test textfield' actions=setValue ++++++genericContainer
diff --git a/content/test/data/accessibility/html/address-expected-blink.txt b/content/test/data/accessibility/html/address-expected-blink.txt new file mode 100644 index 0000000..5f80ebb --- /dev/null +++ b/content/test/data/accessibility/html/address-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++contentInfo +++++staticText name='Please contact John Citizen for more information.' +++++++inlineTextBox name='Please contact John Citizen for more information.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/area-expected-blink.txt b/content/test/data/accessibility/html/area-expected-blink.txt new file mode 100644 index 0000000..1a6e7b92 --- /dev/null +++ b/content/test/data/accessibility/html/area-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++genericContainer +++++imageMap name='pipe' +++++++link name='pipe1' +++++++link name='pipe2' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/article-expected-blink.txt b/content/test/data/accessibility/html/article-expected-blink.txt new file mode 100644 index 0000000..5d43477d --- /dev/null +++ b/content/test/data/accessibility/html/article-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++article +++++staticText name='This is an article element.' +++++++inlineTextBox name='This is an article element.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/aside-expected-blink.txt b/content/test/data/accessibility/html/aside-expected-blink.txt new file mode 100644 index 0000000..8d99b50 --- /dev/null +++ b/content/test/data/accessibility/html/aside-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++paragraph +++++staticText name='The aside tag defines some content aside from the content it is placed in.' +++++++inlineTextBox name='The aside tag defines some content aside from the content it is placed in.' +++complementary +++++heading name='Aside tag' hierarchicalLevel=4 +++++++staticText name='Aside tag' +++++++++inlineTextBox name='Aside tag' +++++paragraph +++++++staticText name='The aside content should be related to the surrounding content.' +++++++++inlineTextBox name='The aside content should be related to the surrounding content.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/b-expected-blink.txt b/content/test/data/accessibility/html/b-expected-blink.txt new file mode 100644 index 0000000..029a5e8 --- /dev/null +++ b/content/test/data/accessibility/html/b-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++staticText name='This is bold text' +++++++inlineTextBox name='This is bold text' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/bdo-expected-blink.txt b/content/test/data/accessibility/html/bdo-expected-blink.txt new file mode 100644 index 0000000..240297b --- /dev/null +++ b/content/test/data/accessibility/html/bdo-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++genericContainer +++++staticText name='Some LTR text' +++++++inlineTextBox name='Some LTR text' +++++staticText name='Some RTL text ' +++++++inlineTextBox name='Some RTL text ' +++++staticText name='with some LTR text embedded' +++++++inlineTextBox name='with some LTR text embedded' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/blockquote-expected-blink.txt b/content/test/data/accessibility/html/blockquote-expected-blink.txt new file mode 100644 index 0000000..ffa8de7b --- /dev/null +++ b/content/test/data/accessibility/html/blockquote-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++blockquote +++++paragraph +++++++staticText name='First blockquote has a child element.' +++++++++inlineTextBox name='First blockquote has a child element.' +++blockquote +++++staticText name='Second blockquote has no child.' +++++++inlineTextBox name='Second blockquote has no child.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/body-expected-blink.txt b/content/test/data/accessibility/html/body-expected-blink.txt new file mode 100644 index 0000000..523cdc2 --- /dev/null +++ b/content/test/data/accessibility/html/body-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++paragraph +++++staticText name='This test is for body tag' +++++++inlineTextBox name='This test is for body tag' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/button-expected-blink.txt b/content/test/data/accessibility/html/button-expected-blink.txt new file mode 100644 index 0000000..c139492 --- /dev/null +++ b/content/test/data/accessibility/html/button-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++button name='Click me!' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/button-name-calc-expected-blink.txt b/content/test/data/accessibility/html/button-name-calc-expected-blink.txt new file mode 100644 index 0000000..3c4c8494 --- /dev/null +++ b/content/test/data/accessibility/html/button-name-calc-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++button name='InnerText0' +++button description='Title1' name='InnerText1' descriptionFrom=2 +++button description='Title2' name='AriaLabel2' descriptionFrom=2 +++button description='Title3' name='LabelledBy3' descriptionFrom=2 +++button description='DescribedBy4' name='LabelledBy4' descriptionFrom=5 +++button description='DescribedBy5' name='InnerText5' descriptionFrom=5
diff --git a/content/test/data/accessibility/html/canvas-expected-blink.txt b/content/test/data/accessibility/html/canvas-expected-blink.txt new file mode 100644 index 0000000..f277c25 --- /dev/null +++ b/content/test/data/accessibility/html/canvas-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++genericContainer +++++canvas +++++++staticText name='Static fallback' +++++canvas +++++++link name='Interactive fallback' +++++++++staticText name='Interactive fallback' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/caption-expected-blink.txt b/content/test/data/accessibility/html/caption-expected-blink.txt new file mode 100644 index 0000000..99c1e75 --- /dev/null +++ b/content/test/data/accessibility/html/caption-expected-blink.txt
@@ -0,0 +1,30 @@ +rootWebArea +++table name='Browser and Engine' +++++caption +++++++staticText name='Browser and Engine' +++++++++inlineTextBox name='Browser and ' +++++++++inlineTextBox name='Engine' +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Engine' +++++++++staticText name='Engine' +++++++++++inlineTextBox name='Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++row +++++++cell name='Safari' +++++++++staticText name='Safari' +++++++++++inlineTextBox name='Safari' +++++++cell name='WebKit' +++++++++staticText name='WebKit' +++++++++++inlineTextBox name='WebKit' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/checkbox-name-calc-expected-blink.txt b/content/test/data/accessibility/html/checkbox-name-calc-expected-blink.txt new file mode 100644 index 0000000..499b555 --- /dev/null +++ b/content/test/data/accessibility/html/checkbox-name-calc-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++checkBox name='Title0' checkedState=1 +++checkBox description='Title1' name='Label1' descriptionFrom=2 checkedState=1 +++checkBox description='Title2' name='AriaLabel2' descriptionFrom=2 checkedState=1 +++checkBox description='Title3' name='LabelledBy3' descriptionFrom=2 checkedState=1 +++checkBox description='DescribedBy4' name='LabelledBy4' descriptionFrom=5 checkedState=1 +++checkBox description='DescribedBy5' descriptionFrom=5 checkedState=1
diff --git a/content/test/data/accessibility/html/cite-expected-blink.txt b/content/test/data/accessibility/html/cite-expected-blink.txt new file mode 100644 index 0000000..296dafa --- /dev/null +++ b/content/test/data/accessibility/html/cite-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++image name='Pipe' +++paragraph +++++staticText name='The pipe' +++++++inlineTextBox name='The pipe' +++++staticText name=' clicked by SomeOne.' +++++++inlineTextBox name=' clicked by SomeOne.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/code-expected-blink.txt b/content/test/data/accessibility/html/code-expected-blink.txt new file mode 100644 index 0000000..9ee52bd3 --- /dev/null +++ b/content/test/data/accessibility/html/code-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++staticText name='A piece of computer code' +++++++inlineTextBox name='A piece of computer code' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/col-expected-blink.txt b/content/test/data/accessibility/html/col-expected-blink.txt new file mode 100644 index 0000000..9b79a7f3 --- /dev/null +++ b/content/test/data/accessibility/html/col-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++table +++++row +++++++columnHeader name='Browser' +++++++++staticText name='Browser' +++++++++++inlineTextBox name='Browser' +++++++columnHeader name='Rendering Engine' +++++++++staticText name='Rendering Engine' +++++++++++inlineTextBox name='Rendering Engine' +++++row +++++++cell name='Chrome' +++++++++staticText name='Chrome' +++++++++++inlineTextBox name='Chrome' +++++++cell name='Blink' +++++++++staticText name='Blink' +++++++++++inlineTextBox name='Blink' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/colgroup-expected-blink.txt b/content/test/data/accessibility/html/colgroup-expected-blink.txt new file mode 100644 index 0000000..fded47c --- /dev/null +++ b/content/test/data/accessibility/html/colgroup-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++table +++++row +++++++columnHeader name='Single' +++++++++staticText name='Single' +++++++++++inlineTextBox name='Single' +++++++columnHeader name='Pair' +++++++++staticText name='Pair' +++++++++++inlineTextBox name='Pair' +++++row +++++++cell name='A' +++++++++staticText name='A' +++++++++++inlineTextBox name='A' +++++++cell name='AA' +++++++++staticText name='AA' +++++++++++inlineTextBox name='AA' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt new file mode 100644 index 0000000..f38d219a --- /dev/null +++ b/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt
@@ -0,0 +1,34 @@ +rootWebArea +++genericContainer editable richlyEditable +++++paragraph editable richlyEditable +++++++staticText editable richlyEditable name='A contenteditable with a ' +++++++++inlineTextBox name='A contenteditable with a ' +++++++link editable richlyEditable name='link' +++++++++staticText editable richlyEditable name='link' +++++++++++inlineTextBox name='link' +++++++staticText editable richlyEditable name=' and an ' +++++++++inlineTextBox name=' and an ' +++++++image editable richlyEditable name='Image' +++++++staticText editable richlyEditable name=' and a ' +++++++++inlineTextBox name=' and a ' +++++++button editable richlyEditable name='Button' +++++++staticText editable richlyEditable name='.' +++++++++inlineTextBox name='.' +++++table editable richlyEditable +++++++row editable richlyEditable +++++++++cell editable richlyEditable name='Always expose editable tables as tables.' +++++++++++staticText editable richlyEditable name='Always expose editable tables as tables.' +++++++++++++inlineTextBox name='Always expose editable tables as tables.' +++++++column +++++++tableHeaderContainer +++++list editable richlyEditable +++++++listItem editable richlyEditable +++++++++listMarker name='1' +++++++++staticText editable richlyEditable name='Editable list item.' +++++++++++inlineTextBox name='Editable list item.' +++paragraph +++++staticText name='Non-editable paragraph.' +++++++inlineTextBox name='Non-editable paragraph.' +++paragraph editable richlyEditable +++++staticText editable richlyEditable name='Should keep the role but change the state.' +++++++inlineTextBox name='Should keep the role but change the state.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/contenteditable-descendants-with-selection.html b/content/test/data/accessibility/html/contenteditable-descendants-with-selection.html index 4998084..d9268e53 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants-with-selection.html +++ b/content/test/data/accessibility/html/contenteditable-descendants-with-selection.html
@@ -6,6 +6,8 @@ @WIN-ALLOW:n_selections* @WIN-ALLOW:selection_start* @WIN-ALLOW:selection_end* +@BLINK-ALLOW:editable* +@BLINK-ALLOW:richlyEditable* --> <div id="contenteditable" tabindex="0" contenteditable> <p>A contenteditable with a
diff --git a/content/test/data/accessibility/html/contenteditable-descendants.html b/content/test/data/accessibility/html/contenteditable-descendants.html index 5c1557d..1d973259 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants.html +++ b/content/test/data/accessibility/html/contenteditable-descendants.html
@@ -6,6 +6,8 @@ @WIN-ALLOW:n_selections* @WIN-ALLOW:selection_start* @WIN-ALLOW:selection_end* +@BLINK-ALLOW:editable* +@BLINK-ALLOW:richlyEditable* --> <div contenteditable> <p>A contenteditable with a
diff --git a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt new file mode 100644 index 0000000..2d02822 --- /dev/null +++ b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt
@@ -0,0 +1,15 @@ +rootWebArea +++genericContainer editable richlyEditable +++++paragraph editable richlyEditable +++++++staticText editable richlyEditable name='This is editable.' +++++++++inlineTextBox name='This is editable.' +++++staticText name='This is not editable.' +++++++inlineTextBox name='This is not editable.' +++++lineBreak name='<newline>' +++++++inlineTextBox name='<newline>' +++++paragraph editable richlyEditable +++++++staticText editable richlyEditable name='But this one is.' +++++++++inlineTextBox name='But this one is.' +++++paragraph editable richlyEditable +++++++staticText editable richlyEditable name='So is this one.' +++++++++inlineTextBox name='So is this one.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables.html b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables.html index 01d6090..da1067c8 100644 --- a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables.html +++ b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables.html
@@ -5,6 +5,8 @@ @WIN-ALLOW:n_selections* @WIN-ALLOW:selection_start* @WIN-ALLOW:selection_end* +@BLINK-ALLOW:editable* +@BLINK-ALLOW:richlyEditable* --> <div contenteditable> <p>This is editable.</p>
diff --git a/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt new file mode 100644 index 0000000..81fbe1da --- /dev/null +++ b/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++genericContainer editable richlyEditable name='label' +++genericContainer editable richlyEditable description='description' descriptionFrom=5 +++genericContainer editable richlyEditable name='title' +++paragraph +++++staticText name='description' +++++++inlineTextBox name='description'
diff --git a/content/test/data/accessibility/html/contenteditable-with-no-descendants.html b/content/test/data/accessibility/html/contenteditable-with-no-descendants.html index 1027c9bcf..21693473 100644 --- a/content/test/data/accessibility/html/contenteditable-with-no-descendants.html +++ b/content/test/data/accessibility/html/contenteditable-with-no-descendants.html
@@ -2,6 +2,8 @@ @WIN-ALLOW:description* @WIN-ALLOW:IA2_STATE_EDITABLE @WIN-ALLOW:ia2_hypertext=* +@BLINK-ALLOW:editable +@BLINK-ALLOW:richlyEditable --> <div contenteditable aria-label="label"></div> <div contenteditable aria-describedby="description"></div>
diff --git a/content/test/data/accessibility/html/dd-expected-blink.txt b/content/test/data/accessibility/html/dd-expected-blink.txt new file mode 100644 index 0000000..2a91cf6 --- /dev/null +++ b/content/test/data/accessibility/html/dd-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++descriptionList +++++descriptionListTerm +++++++staticText name='Coffee' +++++++++inlineTextBox name='Coffee' +++++descriptionListDetail +++++++staticText name='Black hot drink' +++++++++inlineTextBox name='Black hot drink' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/del-expected-blink.txt b/content/test/data/accessibility/html/del-expected-blink.txt new file mode 100644 index 0000000..a603c8f2 --- /dev/null +++ b/content/test/data/accessibility/html/del-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++paragraph +++++staticText name='I am ' +++++++inlineTextBox name='I am ' +++++staticText name='vegetarian' +++++++inlineTextBox name='vegetarian' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/details-expected-blink.txt b/content/test/data/accessibility/html/details-expected-blink.txt new file mode 100644 index 0000000..1d3b41f --- /dev/null +++ b/content/test/data/accessibility/html/details-expected-blink.txt
@@ -0,0 +1,12 @@ +rootWebArea +++details +++++disclosureTriangle collapsed name='details tag' +++++++staticText name='details tag' +++++++++inlineTextBox name='details tag' +++details +++++disclosureTriangle name='details tag open' +++++++staticText name='details tag open' +++++++++inlineTextBox name='details tag open' +++++paragraph +++++++staticText name='The details tag with open specifies that the details should be visible (open) to the user.' +++++++++inlineTextBox name='The details tag with open specifies that the details should be visible (open) to the user.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/dfn-expected-blink.txt b/content/test/data/accessibility/html/dfn-expected-blink.txt new file mode 100644 index 0000000..0c5714e1 --- /dev/null +++ b/content/test/data/accessibility/html/dfn-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++genericContainer +++++staticText name='Web Browser' +++++++inlineTextBox name='Web Browser' +++++staticText name=' A computer program with a graphical user interface for displaying HTML files, used to navigate the World Wide Web.' +++++++inlineTextBox name=' A computer program with a graphical user interface for displaying HTML files, used to navigate the World ' +++++++inlineTextBox name='Wide Web.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/dialog-expected-blink.txt b/content/test/data/accessibility/html/dialog-expected-blink.txt new file mode 100644 index 0000000..ad6c8e6 --- /dev/null +++ b/content/test/data/accessibility/html/dialog-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++dialog +++++staticText name='Text in dialog' +++++++inlineTextBox name='Text in dialog' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/div-expected-blink.txt b/content/test/data/accessibility/html/div-expected-blink.txt new file mode 100644 index 0000000..8154e313 --- /dev/null +++ b/content/test/data/accessibility/html/div-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++genericContainer +++++staticText name='Unfocusable div' +++++++inlineTextBox name='Unfocusable div' +++genericContainer name='Focusable div' +++++staticText name='Focusable div' +++++++inlineTextBox name='Focusable div' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/dl-expected-blink.txt b/content/test/data/accessibility/html/dl-expected-blink.txt new file mode 100644 index 0000000..a7114fe2 --- /dev/null +++ b/content/test/data/accessibility/html/dl-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++descriptionList +++++descriptionListTerm +++++++staticText name='Term' +++++++++inlineTextBox name='Term' +++++descriptionListDetail +++++++staticText name='Description' +++++++++inlineTextBox name='Description' +++definition +++++staticText name='Definition' +++++++inlineTextBox name='Definition' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/dt-expected-blink.txt b/content/test/data/accessibility/html/dt-expected-blink.txt new file mode 100644 index 0000000..2a91cf6 --- /dev/null +++ b/content/test/data/accessibility/html/dt-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++descriptionList +++++descriptionListTerm +++++++staticText name='Coffee' +++++++++inlineTextBox name='Coffee' +++++descriptionListDetail +++++++staticText name='Black hot drink' +++++++++inlineTextBox name='Black hot drink' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt b/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt deleted file mode 100644 index 15ec10ab..0000000 --- a/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt +++ /dev/null
@@ -1,5 +0,0 @@ -rootWebArea htmlTag='#document' -++heading htmlTag='h1' name='Image' -++++staticText name='Image' -++++++inlineTextBox name='Image' -++image htmlTag='img' name='ImageAlt'
diff --git a/content/test/data/accessibility/html/em-expected-blink.txt b/content/test/data/accessibility/html/em-expected-blink.txt new file mode 100644 index 0000000..7620ad39 --- /dev/null +++ b/content/test/data/accessibility/html/em-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++genericContainer +++++staticText name='One word is ' +++++++inlineTextBox name='One word is ' +++++staticText name='emphasized' +++++++inlineTextBox name='emphasized' +++++staticText name='.' +++++++inlineTextBox name='.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/embed-expected-blink.txt b/content/test/data/accessibility/html/embed-expected-blink.txt new file mode 100644 index 0000000..9497935 --- /dev/null +++ b/content/test/data/accessibility/html/embed-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++embeddedObject \ No newline at end of file
diff --git a/content/test/data/accessibility/html/fieldset-expected-blink.txt b/content/test/data/accessibility/html/fieldset-expected-blink.txt new file mode 100644 index 0000000..f7133d35 --- /dev/null +++ b/content/test/data/accessibility/html/fieldset-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++form +++++group name='Browser Engines:' +++++++legend +++++++++staticText name='Browser Engines:' +++++++++++inlineTextBox name='Browser Engines:' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/figcaption-expected-blink.txt b/content/test/data/accessibility/html/figcaption-expected-blink.txt new file mode 100644 index 0000000..8732fcd4 --- /dev/null +++ b/content/test/data/accessibility/html/figcaption-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++figure name='Fig.1 - A green Box' +++++image name='This is a green box.' +++++figcaption +++++++staticText name='Fig.1 - A green Box' +++++++++inlineTextBox name='Fig.1 - A green Box' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/figure-expected-blink.txt b/content/test/data/accessibility/html/figure-expected-blink.txt new file mode 100644 index 0000000..f7a97076 --- /dev/null +++ b/content/test/data/accessibility/html/figure-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++figure +++++image name='Sunspots' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/footer-expected-blink.txt b/content/test/data/accessibility/html/footer-expected-blink.txt new file mode 100644 index 0000000..afa2b9b --- /dev/null +++ b/content/test/data/accessibility/html/footer-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++footer +++++staticText name='Footer element' +++++++inlineTextBox name='Footer element' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt b/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt new file mode 100644 index 0000000..1564408 --- /dev/null +++ b/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt
@@ -0,0 +1,16 @@ +rootWebArea +++article +++++genericContainer +++++++paragraph +++++++++staticText name='footer inside article.' +++++++++++inlineTextBox name='footer inside article.' +++region +++++genericContainer +++++++paragraph +++++++++staticText name='footer inside section.' +++++++++++inlineTextBox name='footer inside section.' +++main +++++genericContainer +++++++paragraph +++++++++staticText name='footer inside main.' +++++++++++inlineTextBox name='footer inside main.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/form-expected-blink.txt b/content/test/data/accessibility/html/form-expected-blink.txt new file mode 100644 index 0000000..99b183a --- /dev/null +++ b/content/test/data/accessibility/html/form-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++form +++++button name='Submit' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/header-expected-blink.txt b/content/test/data/accessibility/html/header-expected-blink.txt new file mode 100644 index 0000000..235b808 --- /dev/null +++ b/content/test/data/accessibility/html/header-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++banner +++++staticText name='Chromium Browser' +++++++inlineTextBox name='Chromium Browser' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt b/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt new file mode 100644 index 0000000..0a5439a6 --- /dev/null +++ b/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt
@@ -0,0 +1,16 @@ +rootWebArea +++article +++++genericContainer +++++++paragraph +++++++++staticText name='Header inside article.' +++++++++++inlineTextBox name='Header inside article.' +++region +++++genericContainer +++++++paragraph +++++++++staticText name='Header inside section.' +++++++++++inlineTextBox name='Header inside section.' +++main +++++genericContainer +++++++paragraph +++++++++staticText name='Header inside main.' +++++++++++inlineTextBox name='Header inside main.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/heading-expected-blink.txt b/content/test/data/accessibility/html/heading-expected-blink.txt new file mode 100644 index 0000000..634f065c --- /dev/null +++ b/content/test/data/accessibility/html/heading-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++heading name='Heading 1' hierarchicalLevel=1 +++++staticText name='Heading 1' +++++++inlineTextBox name='Heading 1' +++heading name='Heading 2' hierarchicalLevel=2 +++++staticText name='Heading 2' +++++++inlineTextBox name='Heading 2' +++heading name='Heading 3' hierarchicalLevel=3 +++++staticText name='Heading 3' +++++++inlineTextBox name='Heading 3' +++heading name='Heading 4' hierarchicalLevel=4 +++++staticText name='Heading 4' +++++++inlineTextBox name='Heading 4' +++heading name='Heading 5' hierarchicalLevel=5 +++++staticText name='Heading 5' +++++++inlineTextBox name='Heading 5' +++heading name='Heading 6' hierarchicalLevel=6 +++++staticText name='Heading 6' +++++++inlineTextBox name='Heading 6' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/hr-expected-blink.txt b/content/test/data/accessibility/html/hr-expected-blink.txt new file mode 100644 index 0000000..3c7c11e --- /dev/null +++ b/content/test/data/accessibility/html/hr-expected-blink.txt
@@ -0,0 +1,12 @@ +rootWebArea +++paragraph +++++staticText name='Before.' +++++++inlineTextBox name='Before.' +++splitter horizontal name='Dividing line' +++paragraph +++++staticText name='Middle.' +++++++inlineTextBox name='Middle.' +++splitter horizontal +++paragraph +++++staticText name='After.' +++++++inlineTextBox name='After.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/i-expected-blink.txt b/content/test/data/accessibility/html/i-expected-blink.txt new file mode 100644 index 0000000..fcb4c61 --- /dev/null +++ b/content/test/data/accessibility/html/i-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++paragraph +++++staticText name='This is to check ' +++++++inlineTextBox name='This is to check ' +++++staticText name='italic property' +++++++inlineTextBox name='italic property' +++++staticText name=' using i tag.' +++++++inlineTextBox name=' using i tag.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/id-expected-blink.txt b/content/test/data/accessibility/html/id-expected-blink.txt new file mode 100644 index 0000000..f367acb --- /dev/null +++ b/content/test/data/accessibility/html/id-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++paragraph +++++staticText name='No id' +++++++inlineTextBox name='No id' +++paragraph +++++staticText name='Has id' +++++++inlineTextBox name='Has id' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/iframe-presentational-expected-blink.txt b/content/test/data/accessibility/html/iframe-presentational-expected-blink.txt new file mode 100644 index 0000000..ae9918d --- /dev/null +++ b/content/test/data/accessibility/html/iframe-presentational-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++iframePresentational +++++++rootWebArea \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-button-expected-blink.txt b/content/test/data/accessibility/html/input-button-expected-blink.txt new file mode 100644 index 0000000..988c3e0 --- /dev/null +++ b/content/test/data/accessibility/html/input-button-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++button name='Button' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-button-in-menu-expected-blink.txt b/content/test/data/accessibility/html/input-button-in-menu-expected-blink.txt new file mode 100644 index 0000000..997cb63 --- /dev/null +++ b/content/test/data/accessibility/html/input-button-in-menu-expected-blink.txt
@@ -0,0 +1,9 @@ +rootWebArea +++genericContainer +++++menuItem name='Button in menu element' +++++++staticText name='Button in menu element' +++++++++inlineTextBox name='Button in menu element' +++menu +++++menuItem name='Button in element with menu role' +++++++staticText name='Button in element with menu role' +++++++++inlineTextBox name='Button in element with menu role' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-checkbox-expected-blink.txt b/content/test/data/accessibility/html/input-checkbox-expected-blink.txt new file mode 100644 index 0000000..b39b902 --- /dev/null +++ b/content/test/data/accessibility/html/input-checkbox-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++genericContainer +++++checkBox name='Checkbox0' checkedState=1 +++++checkBox name='Checkbox1' checkedState=2 +++++checkBox name='Checkbox2' checkedState=2 +++++checkBox name='Checkbox3' checkedState=2 +++++checkBox name='Checkbox4' checkedState=3 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-checkbox-in-menu-expected-blink.txt b/content/test/data/accessibility/html/input-checkbox-in-menu-expected-blink.txt new file mode 100644 index 0000000..64e1c0cd --- /dev/null +++ b/content/test/data/accessibility/html/input-checkbox-in-menu-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++genericContainer +++++checkBox name='Checkbox1' checkedState=1 +++++checkBox name='Checkbox2' checkedState=2 +++menu +++++checkBox name='Checkbox3' checkedState=2 +++++checkBox name='Checkbox4' checkedState=3 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-checkbox-label-expected-blink.txt b/content/test/data/accessibility/html/input-checkbox-label-expected-blink.txt new file mode 100644 index 0000000..74b506d --- /dev/null +++ b/content/test/data/accessibility/html/input-checkbox-label-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++labelText +++++++checkBox name=' Checkbox Title' checkedState=1 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-date-expected-blink.txt b/content/test/data/accessibility/html/input-date-expected-blink.txt new file mode 100644 index 0000000..2be5d1f --- /dev/null +++ b/content/test/data/accessibility/html/input-date-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++date name='@NO_CHILDREN_DUMP' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-datetime-expected-blink.txt b/content/test/data/accessibility/html/input-datetime-expected-blink.txt new file mode 100644 index 0000000..fa46a8d --- /dev/null +++ b/content/test/data/accessibility/html/input-datetime-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++genericContainer +++++textField +++++++genericContainer +++++++++staticText name='1/1/2015 1:00AM' +++++++++++inlineTextBox name='1/1/2015 1:00AM' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-email-expected-blink.txt b/content/test/data/accessibility/html/input-email-expected-blink.txt deleted file mode 100644 index ad3ba9b..0000000 --- a/content/test/data/accessibility/html/input-email-expected-blink.txt +++ /dev/null
@@ -1,6 +0,0 @@ -rootWebArea -++genericContainer -++++textField value='someone@example.com' -++++++genericContainer -++++++++staticText name='someone@example.com' -++++++++++inlineTextBox name='someone@example.com' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-file-expected-blink.txt b/content/test/data/accessibility/html/input-file-expected-blink.txt new file mode 100644 index 0000000..31a10e1a --- /dev/null +++ b/content/test/data/accessibility/html/input-file-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++button name='Choose File' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-image-button-in-menu-expected-blink.txt b/content/test/data/accessibility/html/input-image-button-in-menu-expected-blink.txt new file mode 100644 index 0000000..addb15d --- /dev/null +++ b/content/test/data/accessibility/html/input-image-button-in-menu-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++genericContainer +++++button name='Bullet' +++menu +++++button name='Bullet' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-image-expected-blink.txt b/content/test/data/accessibility/html/input-image-expected-blink.txt new file mode 100644 index 0000000..2ae6148 --- /dev/null +++ b/content/test/data/accessibility/html/input-image-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++button name='Submit' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-month-expected-blink.txt b/content/test/data/accessibility/html/input-month-expected-blink.txt new file mode 100644 index 0000000..9af9ad05 --- /dev/null +++ b/content/test/data/accessibility/html/input-month-expected-blink.txt
@@ -0,0 +1,11 @@ +rootWebArea +++genericContainer +++++dateTime +++++++genericContainer +++++++++genericContainer +++++++++++spinButton description='Month' descriptionFrom=2 valueForRange=0.00 minValueForRange=1.00 maxValueForRange=12.00 +++++++++++spinButton description='Year' descriptionFrom=2 valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 +++++++popUpButton haspopup +++++++spinButton valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++++++++button +++++++++button \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt b/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt new file mode 100644 index 0000000..670cbe79 --- /dev/null +++ b/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt
@@ -0,0 +1,13 @@ +rootWebArea +++genericContainer +++++menuItemRadio checkedState=2 +++++staticText name='Radio0 ' +++++++inlineTextBox name='Radio0 ' +++++menuItemRadio checkedState=1 +++++staticText name='Radio1 ' +++++++inlineTextBox name='Radio1 ' +++++radioButton name='Radio2' checkedState=1 +++menu +++++radioButton name='Radio3' checkedState=1 +++++menuItemRadio checkedState=1 +++++menuItemRadio checkedState=2 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-range-expected-blink.txt b/content/test/data/accessibility/html/input-range-expected-blink.txt deleted file mode 100644 index ec7b0a2..0000000 --- a/content/test/data/accessibility/html/input-range-expected-blink.txt +++ /dev/null
@@ -1,4 +0,0 @@ -rootWebArea -++genericContainer -++++slider horizontal value='5' -++++++sliderThumb \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-reset-expected-blink.txt b/content/test/data/accessibility/html/input-reset-expected-blink.txt new file mode 100644 index 0000000..c5f9b6b8 --- /dev/null +++ b/content/test/data/accessibility/html/input-reset-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++textField +++++button name='Reset' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-submit-expected-blink.txt b/content/test/data/accessibility/html/input-submit-expected-blink.txt new file mode 100644 index 0000000..3ef6d9a --- /dev/null +++ b/content/test/data/accessibility/html/input-submit-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++form +++++textField +++++button name='Submit' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt b/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt new file mode 100644 index 0000000..1260ba4 --- /dev/null +++ b/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++comboBox \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-text-name-calc-expected-blink.txt b/content/test/data/accessibility/html/input-text-name-calc-expected-blink.txt new file mode 100644 index 0000000..43871c2 --- /dev/null +++ b/content/test/data/accessibility/html/input-text-name-calc-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea +++textField name='Title0' +++textField description='Title1' name='Label1' descriptionFrom=2 +++textField description='Title2' name='AriaLabel2' descriptionFrom=2 +++textField description='Title3' name='LabelledBy3' descriptionFrom=2 +++textField name='Placeholder4' +++++genericContainer +++++++staticText name='Placeholder4' +++++++++inlineTextBox name='Placeholder4' +++textField name='ARIA Placeholder4a' +++textField name='Placeholder4b' +++++genericContainer +++++++staticText name='Placeholder4b' +++++++++inlineTextBox name='Placeholder4b' +++textField description='Title5' name='Placeholder5' descriptionFrom=2 +++++genericContainer +++++++staticText name='Placeholder5' +++++++++inlineTextBox name='Placeholder5' +++textField description='DescribedBy6' name='LabelledBy6' descriptionFrom=5 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt b/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt new file mode 100644 index 0000000..a08382aa --- /dev/null +++ b/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt
@@ -0,0 +1,14 @@ +rootWebArea +++genericContainer +++++textField +++++++genericContainer +++++++++staticText name='aaYYYYbb' +++++++++++inlineTextBox name='aaYYYYbb' +++++textField +++++++genericContainer +++++++++staticText name='aa' +++++++++++inlineTextBox name='aa' +++++textField +++++++genericContainer +++++++++staticText name='After' +++++++++++inlineTextBox name='After' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-time-expected-blink.txt b/content/test/data/accessibility/html/input-time-expected-blink.txt new file mode 100644 index 0000000..efba911 --- /dev/null +++ b/content/test/data/accessibility/html/input-time-expected-blink.txt
@@ -0,0 +1,13 @@ +rootWebArea +++genericContainer +++++inputTime +++++++genericContainer +++++++++genericContainer +++++++++++spinButton description='Hours' descriptionFrom=2 valueForRange=12.00 minValueForRange=1.00 maxValueForRange=12.00 +++++++++++staticText name=':' +++++++++++++inlineTextBox name=':' +++++++++++spinButton description='Minutes' descriptionFrom=2 valueForRange=0.00 minValueForRange=0.00 maxValueForRange=59.00 +++++++++++spinButton description='AM/PM' descriptionFrom=2 valueForRange=1.00 minValueForRange=1.00 maxValueForRange=2.00 +++++++spinButton valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++++++++button +++++++++button \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-week-expected-blink.txt b/content/test/data/accessibility/html/input-week-expected-blink.txt new file mode 100644 index 0000000..2fa8483 --- /dev/null +++ b/content/test/data/accessibility/html/input-week-expected-blink.txt
@@ -0,0 +1,15 @@ +rootWebArea +++genericContainer +++++dateTime +++++++genericContainer +++++++++genericContainer +++++++++++staticText name='Week ' +++++++++++++inlineTextBox name='Week ' +++++++++++spinButton description='Week' descriptionFrom=2 valueForRange=0.00 minValueForRange=1.00 maxValueForRange=53.00 +++++++++++staticText name=', ' +++++++++++++inlineTextBox name=', ' +++++++++++spinButton description='Year' descriptionFrom=2 valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 +++++++popUpButton haspopup +++++++spinButton valueForRange=0.00 minValueForRange=0.00 maxValueForRange=0.00 +++++++++button +++++++++button \ No newline at end of file
diff --git a/content/test/data/accessibility/html/ins-expected-blink.txt b/content/test/data/accessibility/html/ins-expected-blink.txt new file mode 100644 index 0000000..e80d6477 --- /dev/null +++ b/content/test/data/accessibility/html/ins-expected-blink.txt
@@ -0,0 +1,10 @@ +rootWebArea +++paragraph +++++staticText name='My favorite browser is ' +++++++inlineTextBox name='My favorite browser is ' +++++staticText name='ABC' +++++++inlineTextBox name='ABC' +++++staticText name='Chrome' +++++++inlineTextBox name='Chrome' +++++staticText name='!' +++++++inlineTextBox name='!' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/label-expected-blink.txt b/content/test/data/accessibility/html/label-expected-blink.txt new file mode 100644 index 0000000..3e43345 --- /dev/null +++ b/content/test/data/accessibility/html/label-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++genericContainer +++++labelText +++++++staticText name='Label' +++++++++inlineTextBox name='Label' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/landmark-expected-blink.txt b/content/test/data/accessibility/html/landmark-expected-blink.txt new file mode 100644 index 0000000..5776927 --- /dev/null +++ b/content/test/data/accessibility/html/landmark-expected-blink.txt
@@ -0,0 +1,202 @@ +rootWebArea +++banner +++++staticText name='This is a header element.' +++++++inlineTextBox name='This is a header element.' +++complementary +++++staticText name='This is an aside element.' +++++++inlineTextBox name='This is an aside element.' +++contentInfo +++++staticText name='This is an address element.' +++++++inlineTextBox name='This is an address element.' +++footer +++++staticText name='This is a footer element.' +++++++inlineTextBox name='This is a footer element.' +++form +++++staticText name='This is a form element.' +++++++inlineTextBox name='This is a form element.' +++main +++++staticText name='This is a main element.' +++++++inlineTextBox name='This is a main element.' +++navigation +++++staticText name='This is a nav element.' +++++++inlineTextBox name='This is a nav element.' +++application +++++staticText name='This is an ARIA application landmark.' +++++++inlineTextBox name='This is an ARIA application landmark.' +++banner +++++staticText name='This is an ARIA banner landmark.' +++++++inlineTextBox name='This is an ARIA banner landmark.' +++complementary +++++staticText name='This is an ARIA complementary landmark.' +++++++inlineTextBox name='This is an ARIA complementary landmark.' +++contentInfo +++++staticText name='This is an ARIA contentinfo landmark.' +++++++inlineTextBox name='This is an ARIA contentinfo landmark.' +++form +++++staticText name='This is an ARIA form landmark.' +++++++inlineTextBox name='This is an ARIA form landmark.' +++main +++++staticText name='This is an ARIA main landmark.' +++++++inlineTextBox name='This is an ARIA main landmark.' +++navigation +++++staticText name='This is an ARIA navigation landmark.' +++++++inlineTextBox name='This is an ARIA navigation landmark.' +++search +++++staticText name='This is an ARIA search landmark.' +++++++inlineTextBox name='This is an ARIA search landmark.' +++article +++++genericContainer +++++++staticText name='This should NOT banner role.' +++++++++inlineTextBox name='This should NOT banner role.' +++complementary +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++navigation +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++region +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++blockquote +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++details +++++disclosureTriangle name='Details' +++++++staticText name='Details' +++++++++inlineTextBox name='Details' +++group +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++figure +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++genericContainer +++++staticText name='This should NOT have banner role.' +++++++inlineTextBox name='This should NOT have banner role.' +++main +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++article +++++genericContainer +++++++staticText name='This should NOT banner role.' +++++++++inlineTextBox name='This should NOT banner role.' +++complementary +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++navigation +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++region +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++blockquote +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++details +++++disclosureTriangle name='Details' +++++++staticText name='Details' +++++++++inlineTextBox name='Details' +++group +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++figure +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++genericContainer +++++staticText name='This should NOT have banner role.' +++++++inlineTextBox name='This should NOT have banner role.' +++main +++++genericContainer +++++++staticText name='This should NOT have banner role.' +++++++++inlineTextBox name='This should NOT have banner role.' +++article +++++genericContainer +++++++staticText name='This should NOT footer role.' +++++++++inlineTextBox name='This should NOT footer role.' +++complementary +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++navigation +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++region +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++blockquote +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++details +++++disclosureTriangle name='Details' +++++++staticText name='Details' +++++++++inlineTextBox name='Details' +++group +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++figure +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++genericContainer +++++staticText name='This should NOT have footer role.' +++++++inlineTextBox name='This should NOT have footer role.' +++main +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++article +++++genericContainer +++++++staticText name='This should NOT footer role.' +++++++++inlineTextBox name='This should NOT footer role.' +++complementary +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++navigation +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++region +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++blockquote +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++details +++++disclosureTriangle name='Details' +++++++staticText name='Details' +++++++++inlineTextBox name='Details' +++group +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++figure +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' +++genericContainer +++++staticText name='This should NOT have footer role.' +++++++inlineTextBox name='This should NOT have footer role.' +++main +++++genericContainer +++++++staticText name='This should NOT have footer role.' +++++++++inlineTextBox name='This should NOT have footer role.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/legend-expected-blink.txt b/content/test/data/accessibility/html/legend-expected-blink.txt new file mode 100644 index 0000000..939c4ec --- /dev/null +++ b/content/test/data/accessibility/html/legend-expected-blink.txt
@@ -0,0 +1,13 @@ +rootWebArea +++form +++++group name='Browser Engines:' +++++++legend +++++++++staticText name='Browser Engines:' +++++++++++inlineTextBox name='Browser Engines:' +++++++staticText name='Browser: ' +++++++++inlineTextBox name='Browser: ' +++++++textField +++++++staticText name=' Rendering Engine: ' +++++++++inlineTextBox name=' ' +++++++++inlineTextBox name='Rendering Engine: ' +++++++textField \ No newline at end of file
diff --git a/content/test/data/accessibility/html/li-expected-blink.txt b/content/test/data/accessibility/html/li-expected-blink.txt new file mode 100644 index 0000000..e6552fb0 --- /dev/null +++ b/content/test/data/accessibility/html/li-expected-blink.txt
@@ -0,0 +1,14 @@ +rootWebArea +++list display='block' +++++listItem display='list-item' setSize=3 posInSet=1 +++++++listMarker name='•' +++++++staticText display='list-item' name='Item 1' +++++++++inlineTextBox display='list-item' name='Item 1' +++++listItem display='list-item' setSize=3 posInSet=2 +++++++listMarker name='•' +++++++staticText display='list-item' name='Item 2' +++++++++inlineTextBox display='list-item' name='Item 2' +++++listItem display='list-item' setSize=3 posInSet=3 +++++++listMarker name='•' +++++++staticText display='list-item' name='Item 3' +++++++++inlineTextBox display='list-item' name='Item 3' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/li.html b/content/test/data/accessibility/html/li.html index dd53b7a..93ea363 100644 --- a/content/test/data/accessibility/html/li.html +++ b/content/test/data/accessibility/html/li.html
@@ -1,6 +1,9 @@ <!-- @MAC-ALLOW:AXSubrole* @WIN-ALLOW:display* +@BLINK-ALLOW:display* +@BLINK-ALLOW:setSize* +@BLINK-ALLOW:posInSet* --> <html> <body>
diff --git a/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt b/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt new file mode 100644 index 0000000..1b20125 --- /dev/null +++ b/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++heading name='Link In Heading' hierarchicalLevel=1 +++++link name='Link In Heading' +++++++staticText name='Link In Heading' +++++++++inlineTextBox name='Link In Heading' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/list-expected-blink.txt b/content/test/data/accessibility/html/list-expected-blink.txt new file mode 100644 index 0000000..ec8e2cbc --- /dev/null +++ b/content/test/data/accessibility/html/list-expected-blink.txt
@@ -0,0 +1,24 @@ +rootWebArea +++list +++++listItem +++++++listMarker name='•' +++++++staticText name='tic' +++++++++inlineTextBox name='tic' +++++listItem +++++++listMarker name='•' +++++++staticText name='tac' +++++++++inlineTextBox name='tac' +++++listItem +++++++listMarker name='•' +++++++staticText name='toe' +++++++++inlineTextBox name='toe' +++list +++++listItem +++++++staticText name='tic' +++++++++inlineTextBox name='tic' +++++listItem +++++++staticText name='tac' +++++++++inlineTextBox name='tac' +++++listItem +++++++staticText name='toe' +++++++++inlineTextBox name='toe' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/list-markers-expected-blink.txt b/content/test/data/accessibility/html/list-markers-expected-blink.txt new file mode 100644 index 0000000..59189b6 --- /dev/null +++ b/content/test/data/accessibility/html/list-markers-expected-blink.txt
@@ -0,0 +1,26 @@ +rootWebArea +++list +++++listItem +++++++listMarker name='•' +++++++staticText name='First item properly groups itself despite ' +++++++++inlineTextBox name='First item properly groups itself despite ' +++++++staticText name='bolded' +++++++++inlineTextBox name='bolded' +++++++staticText name=' text.' +++++++++inlineTextBox name=' text.' +++++listItem +++++++listMarker name='•' +++++++staticText name='This should also be ' +++++++++inlineTextBox name='This should also be ' +++++++staticText name='seen' +++++++++inlineTextBox name='seen' +++++++staticText name=' as a group.' +++++++++inlineTextBox name=' as a group.' +++++listItem +++++++listMarker name='•' +++++++staticText name='Some ' +++++++++inlineTextBox name='Some ' +++++++staticText name='more' +++++++++inlineTextBox name='more' +++++++staticText name=' text.' +++++++++inlineTextBox name=' text.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/main-expected-blink.txt b/content/test/data/accessibility/html/main-expected-blink.txt new file mode 100644 index 0000000..4273ede0 --- /dev/null +++ b/content/test/data/accessibility/html/main-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++main +++++staticText name='This is main element.' +++++++inlineTextBox name='This is main element.' +++main +++++staticText name='This is an ARIA role main.' +++++++inlineTextBox name='This is an ARIA role main.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/mark-expected-blink.txt b/content/test/data/accessibility/html/mark-expected-blink.txt new file mode 100644 index 0000000..021a790 --- /dev/null +++ b/content/test/data/accessibility/html/mark-expected-blink.txt
@@ -0,0 +1,9 @@ +rootWebArea +++paragraph +++++staticText name='This test is to check ' +++++++inlineTextBox name='This test is to check ' +++++mark +++++++staticText name='mark tag' +++++++++inlineTextBox name='mark tag' +++++staticText name='.' +++++++inlineTextBox name='.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/menu-type-context-expected-blink.txt b/content/test/data/accessibility/html/menu-type-context-expected-blink.txt new file mode 100644 index 0000000..b958ecc --- /dev/null +++ b/content/test/data/accessibility/html/menu-type-context-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++paragraph +++++staticText name='Right-click inside this box to see the context menu!' +++++++inlineTextBox name='Right-click inside this box to see the context menu!' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/meter-expected-blink.txt b/content/test/data/accessibility/html/meter-expected-blink.txt new file mode 100644 index 0000000..d3f131d6 --- /dev/null +++ b/content/test/data/accessibility/html/meter-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++meter valueForRange=2.00 minValueForRange=1.00 maxValueForRange=10.00 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt new file mode 100644 index 0000000..83afb6f5 --- /dev/null +++ b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++staticText name='Test that elements respawn in the accessibility tree after a modal dialog closes.' +++++inlineTextBox name='Test that elements respawn in the accessibility tree after a modal dialog closes.' +++region +++++popUpButton collapsed haspopup +++++++menuListPopup invisible activedescendantId=menuListOption +++++++++menuListOption selectable selected name='This should be in the tree.' +++colorWell \ No newline at end of file
diff --git a/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt index 3feaba9..cbe3eee 100644 --- a/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt
@@ -6,4 +6,4 @@ ++++++rootWebArea ++++++++dialog ++++++++++staticText name='Text in the dialog.' -++++++++++++inlineTextBox name='Text in the dialog.' +++++++++++++inlineTextBox name='Text in the dialog.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt new file mode 100644 index 0000000..a47840b --- /dev/null +++ b/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt
@@ -0,0 +1,7 @@ +rootWebArea +++dialog +++++staticText name='The dialog subtree should be the only text content in the accessibility tree. ' +++++++inlineTextBox name='The dialog subtree should be the only text content in the accessibility tree. ' +++++link name='Link inside the dialog.' +++++++staticText name='Link inside the dialog.' +++++++++inlineTextBox name='Link inside the dialog.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt new file mode 100644 index 0000000..96ef96fa --- /dev/null +++ b/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++dialog +++++staticText name='This is the now active dialog. Of course it should be in the tree. ' +++++++inlineTextBox name='This is the now active dialog. Of course it should be in the tree. ' +++++button name='This is in the active dialog and should be in the tree.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/navigation-expected-blink.txt b/content/test/data/accessibility/html/navigation-expected-blink.txt new file mode 100644 index 0000000..e584f09 --- /dev/null +++ b/content/test/data/accessibility/html/navigation-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++navigation +++++link name='Don't click on me' +++++++staticText name='Don't click on me' +++++++++inlineTextBox name='Don't click on me' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/object-expected-blink.txt b/content/test/data/accessibility/html/object-expected-blink.txt new file mode 100644 index 0000000..9497935 --- /dev/null +++ b/content/test/data/accessibility/html/object-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++embeddedObject \ No newline at end of file
diff --git a/content/test/data/accessibility/html/ol-expected-blink.txt b/content/test/data/accessibility/html/ol-expected-blink.txt new file mode 100644 index 0000000..a1a7048 --- /dev/null +++ b/content/test/data/accessibility/html/ol-expected-blink.txt
@@ -0,0 +1,27 @@ +rootWebArea +++list +++++listItem +++++++listMarker name='1' +++++++staticText name='Chrome' +++++++++inlineTextBox name='Chrome' +++++listItem +++++++listMarker name='2' +++++++staticText name='Safari' +++++++++inlineTextBox name='Safari' +++++listItem +++++++listMarker name='3' +++++++staticText name='IE' +++++++++inlineTextBox name='IE' +++list +++++listItem +++++++listMarker name='10' +++++++staticText name='Android' +++++++++inlineTextBox name='Android' +++++listItem +++++++listMarker name='11' +++++++staticText name='Mac' +++++++++inlineTextBox name='Mac' +++++listItem +++++++listMarker name='12' +++++++staticText name='Windows' +++++++++inlineTextBox name='Windows' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/optgroup-expected-blink.txt b/content/test/data/accessibility/html/optgroup-expected-blink.txt new file mode 100644 index 0000000..17d01c6 --- /dev/null +++ b/content/test/data/accessibility/html/optgroup-expected-blink.txt
@@ -0,0 +1,17 @@ +rootWebArea +++genericContainer +++++listBox +++++++group name='Enabled' +++++++++staticText name='Enabled' +++++++++++inlineTextBox name='Enabled' +++++++listBoxOption selectable name='One' +++++++listBoxOption selectable name='Two' +++++++listBoxOption selectable name='Three' +++++++listBoxOption selectable name='Four' +++++++group name='Disabled' +++++++++staticText name='Disabled' +++++++++++inlineTextBox name='Disabled' +++++++listBoxOption name='One' +++++++listBoxOption name='Two' +++++++listBoxOption name='Three' +++++++listBoxOption name='Four' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/param-expected-blink.txt b/content/test/data/accessibility/html/param-expected-blink.txt new file mode 100644 index 0000000..0b0b3e0 --- /dev/null +++ b/content/test/data/accessibility/html/param-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++embeddedObject
diff --git a/content/test/data/accessibility/html/pre-expected-blink.txt b/content/test/data/accessibility/html/pre-expected-blink.txt new file mode 100644 index 0000000..7e945ff --- /dev/null +++ b/content/test/data/accessibility/html/pre-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++pre +++++staticText name='This test is to check pre tag.' +++++++inlineTextBox name='This test is to check pre tag.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/progress-expected-blink.txt b/content/test/data/accessibility/html/progress-expected-blink.txt new file mode 100644 index 0000000..a4fb9db --- /dev/null +++ b/content/test/data/accessibility/html/progress-expected-blink.txt
@@ -0,0 +1,3 @@ +rootWebArea +++genericContainer +++++progressIndicator valueForRange=22.00 minValueForRange=0.00 maxValueForRange=100.00 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/q-expected-blink.txt b/content/test/data/accessibility/html/q-expected-blink.txt new file mode 100644 index 0000000..f584aee --- /dev/null +++ b/content/test/data/accessibility/html/q-expected-blink.txt
@@ -0,0 +1,12 @@ +rootWebArea +++paragraph +++++staticText name='This is ' +++++++inlineTextBox name='This is ' +++++staticText name='"' +++++++inlineTextBox name='"' +++++staticText name='Chromium Blink' +++++++inlineTextBox name='Chromium Blink' +++++staticText name='"' +++++++inlineTextBox name='"' +++++staticText name=' based browser.' +++++++inlineTextBox name=' based browser.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/ruby-expected-blink.txt b/content/test/data/accessibility/html/ruby-expected-blink.txt new file mode 100644 index 0000000..96b5ab0 --- /dev/null +++ b/content/test/data/accessibility/html/ruby-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++genericContainer +++++ruby +++++++annotation +++++++++staticText name='ruby text' +++++++++++inlineTextBox name='ruby text' +++++++staticText name='ruby base' +++++++++inlineTextBox name='ruby base' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/s-expected-blink.txt b/content/test/data/accessibility/html/s-expected-blink.txt new file mode 100644 index 0000000..ba690bc --- /dev/null +++ b/content/test/data/accessibility/html/s-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++staticText name='My car is blue.' +++++++inlineTextBox name='My car is blue.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/samp-expected-blink.txt b/content/test/data/accessibility/html/samp-expected-blink.txt new file mode 100644 index 0000000..442a316 --- /dev/null +++ b/content/test/data/accessibility/html/samp-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++staticText name='Sample output from a computer program' +++++++inlineTextBox name='Sample output from a computer program' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/section-expected-blink.txt b/content/test/data/accessibility/html/section-expected-blink.txt new file mode 100644 index 0000000..8d0074f --- /dev/null +++ b/content/test/data/accessibility/html/section-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++region +++++staticText name='This is a section element.' +++++++inlineTextBox name='This is a section element.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/select-expected-blink.txt b/content/test/data/accessibility/html/select-expected-blink.txt index b18712e..5988ce6 100644 --- a/content/test/data/accessibility/html/select-expected-blink.txt +++ b/content/test/data/accessibility/html/select-expected-blink.txt
@@ -1,25 +1,25 @@ rootWebArea focusable ++genericContainer ++++popUpButton collapsed focusable haspopup -++++++menuListPopup invisible +++++++menuListPopup invisible activedescendantId=menuListOption ++++++++menuListOption focusable selectable selected name='Placeholder option' ++++++++menuListOption focusable invisible selectable name='Option 1' ++++++++menuListOption focusable invisible selectable name='Option 2' ++++popUpButton collapsed focusable haspopup -++++++menuListPopup invisible +++++++menuListPopup invisible activedescendantId=menuListOption ++++++++menuListOption focusable invisible selectable name='Option 1' ++++++++menuListOption focusable selectable selected name='Option 2' ++++++++menuListOption focusable invisible selectable name='Option 3' ++++popUpButton collapsed focusable haspopup required -++++++menuListPopup invisible +++++++menuListPopup invisible activedescendantId=menuListOption ++++++++menuListOption focusable selectable selected name='Option 1' ++++++++menuListOption focusable invisible selectable name='Option 2' ++++++++menuListOption focusable invisible selectable name='Option 3' ++++listBox focusable multiselectable -++++++listBoxOption focusable selectable name='Option 1' -++++++listBoxOption focusable selectable name='Option 2' -++++++listBoxOption focusable selectable name='Option 3' +++++++listBoxOption focusable selectable name='Option 1' setSize=3 posInSet=1 +++++++listBoxOption focusable selectable name='Option 2' setSize=3 posInSet=2 +++++++listBoxOption focusable selectable name='Option 3' setSize=3 posInSet=3 ++++listBox focusable -++++++listBoxOption focusable selectable name='Option 1' -++++++listBoxOption focusable selectable name='Option 2' -++++++listBoxOption focusable selectable name='Option 3' \ No newline at end of file +++++++listBoxOption focusable selectable name='Option 1' setSize=3 posInSet=1 +++++++listBoxOption focusable selectable name='Option 2' setSize=3 posInSet=2 +++++++listBoxOption focusable selectable name='Option 3' setSize=3 posInSet=3 \ No newline at end of file
diff --git a/content/test/data/accessibility/html/select.html b/content/test/data/accessibility/html/select.html index 655163e3..7ee955e 100644 --- a/content/test/data/accessibility/html/select.html +++ b/content/test/data/accessibility/html/select.html
@@ -7,6 +7,8 @@ @WIN-ALLOW:SELECT* @BLINK-ALLOW:focus* @BLINK-ALLOW:select* +@BLINK-ALLOW:setSize* +@BLINK-ALLOW:posInSet* --> <html> <body>
diff --git a/content/test/data/accessibility/html/small-expected-blink.txt b/content/test/data/accessibility/html/small-expected-blink.txt new file mode 100644 index 0000000..713253ea --- /dev/null +++ b/content/test/data/accessibility/html/small-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++paragraph +++++staticText name='Chromium' +++++++inlineTextBox name='Chromium' +++++staticText name='open source project' +++++++inlineTextBox name='open source project' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/span-expected-blink.txt b/content/test/data/accessibility/html/span-expected-blink.txt new file mode 100644 index 0000000..66e580b --- /dev/null +++ b/content/test/data/accessibility/html/span-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++paragraph +++++staticText name='This paragraph has one ' +++++++inlineTextBox name='This paragraph has one ' +++++staticText name='word' +++++++inlineTextBox name='word' +++++staticText name=' in a span.' +++++++inlineTextBox name=' in a span.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/strong-expected-blink.txt b/content/test/data/accessibility/html/strong-expected-blink.txt new file mode 100644 index 0000000..617639a --- /dev/null +++ b/content/test/data/accessibility/html/strong-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++staticText name='Strong text' +++++++inlineTextBox name='Strong text' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/sub-expected-blink.txt b/content/test/data/accessibility/html/sub-expected-blink.txt new file mode 100644 index 0000000..aa74a7d0 --- /dev/null +++ b/content/test/data/accessibility/html/sub-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++paragraph +++++staticText name='This text contains ' +++++++inlineTextBox name='This text contains ' +++++staticText name='subscript' +++++++inlineTextBox name='subscript' +++++staticText name=' text.' +++++++inlineTextBox name=' text.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/summary-expected-blink.txt b/content/test/data/accessibility/html/summary-expected-blink.txt new file mode 100644 index 0000000..987d99f --- /dev/null +++ b/content/test/data/accessibility/html/summary-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++details +++++disclosureTriangle collapsed name='details tag' +++++++staticText name='details tag' +++++++++inlineTextBox name='details tag' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/sup-expected-blink.txt b/content/test/data/accessibility/html/sup-expected-blink.txt new file mode 100644 index 0000000..2747002 --- /dev/null +++ b/content/test/data/accessibility/html/sup-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++paragraph +++++staticText name='This text contains' +++++++inlineTextBox name='This text contains' +++++staticText name='superscript' +++++++inlineTextBox name='superscript' +++++staticText name='text.' +++++++inlineTextBox name='text.' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/svg-expected-blink.txt b/content/test/data/accessibility/html/svg-expected-blink.txt new file mode 100644 index 0000000..d2f792f --- /dev/null +++ b/content/test/data/accessibility/html/svg-expected-blink.txt
@@ -0,0 +1,6 @@ +rootWebArea +++genericContainer +++++svgRoot name='svg' +++++++genericContainer +++++++++staticText name='Test' +++++++++++inlineTextBox name='Test' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/table-simple-expected-blink.txt b/content/test/data/accessibility/html/table-simple-expected-blink.txt new file mode 100644 index 0000000..9284f32 --- /dev/null +++ b/content/test/data/accessibility/html/table-simple-expected-blink.txt
@@ -0,0 +1,26 @@ +rootWebArea name='Table example' +++table +++++row +++++++columnHeader name='Pair' +++++++++staticText name='Pair' +++++++++++inlineTextBox name='Pair' +++++++columnHeader name='Single' +++++++++staticText name='Single' +++++++++++inlineTextBox name='Single' +++++row +++++++cell name='AB' +++++++++staticText name='AB' +++++++++++inlineTextBox name='AB' +++++++cell name='B' +++++++++staticText name='B' +++++++++++inlineTextBox name='B' +++++row +++++++cell name='CD' +++++++++staticText name='CD' +++++++++++inlineTextBox name='CD' +++++++cell name='D' +++++++++staticText name='D' +++++++++++inlineTextBox name='D' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/table-spans-expected-blink.txt b/content/test/data/accessibility/html/table-spans-expected-blink.txt new file mode 100644 index 0000000..df718fa --- /dev/null +++ b/content/test/data/accessibility/html/table-spans-expected-blink.txt
@@ -0,0 +1,35 @@ +rootWebArea name='Table example with rowspan and colspan' +++table +++++row +++++++cell name='AD' +++++++++staticText name='AD' +++++++++++inlineTextBox name='AD' +++++++cell name='BC' +++++++++staticText name='BC' +++++++++++inlineTextBox name='BC' +++++row +++++++cell name='EF' +++++++++staticText name='EF' +++++++++++inlineTextBox name='EF' +++++column +++++column +++++tableHeaderContainer +++table +++++row +++++++cell name='AD' +++++++++staticText name='AD' +++++++++++inlineTextBox name='AD' +++++++cell name='BC' +++++++++staticText name='BC' +++++++++++inlineTextBox name='BC' +++++row +++++++cell name='EF' +++++++++staticText name='EF' +++++++++++inlineTextBox name='EF' +++++++cell name='GH' +++++++++staticText name='GH' +++++++++++inlineTextBox name='GH' +++++column +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt b/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt new file mode 100644 index 0000000..f8d8152 --- /dev/null +++ b/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt
@@ -0,0 +1,19 @@ +rootWebArea name='Table example - th rowheader' +++table +++++row +++++++rowHeader name='Firstname' +++++++++staticText name='Firstname' +++++++++++inlineTextBox name='Firstname' +++++++cell name='Jill' +++++++++staticText name='Jill' +++++++++++inlineTextBox name='Jill' +++++row +++++++rowHeader name='Lastname' +++++++++staticText name='Lastname' +++++++++++inlineTextBox name='Lastname' +++++++cell name='Smith' +++++++++staticText name='Smith' +++++++++++inlineTextBox name='Smith' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt b/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt new file mode 100644 index 0000000..6f1ce31a --- /dev/null +++ b/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt
@@ -0,0 +1,33 @@ +rootWebArea name='Table example - thead, tbody, tfoot' +++table +++++row +++++++columnHeader name='Sum' +++++++++staticText name='Sum' +++++++++++inlineTextBox name='Sum' +++++++columnHeader name='Subtraction' +++++++++staticText name='Subtraction' +++++++++++inlineTextBox name='Subtraction' +++++row +++++++cell name='10' +++++++++staticText name='10' +++++++++++inlineTextBox name='10' +++++++cell name='7' +++++++++staticText name='7' +++++++++++inlineTextBox name='7' +++++row +++++++cell name='2' +++++++++staticText name='2' +++++++++++inlineTextBox name='2' +++++++cell name='4' +++++++++staticText name='4' +++++++++++inlineTextBox name='4' +++++row +++++++cell name='12' +++++++++staticText name='12' +++++++++++inlineTextBox name='12' +++++++cell name='3' +++++++++staticText name='3' +++++++++++inlineTextBox name='3' +++++column +++++column +++++tableHeaderContainer \ No newline at end of file
diff --git a/content/test/data/accessibility/html/time-expected-blink.txt b/content/test/data/accessibility/html/time-expected-blink.txt new file mode 100644 index 0000000..8286771 --- /dev/null +++ b/content/test/data/accessibility/html/time-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++genericContainer +++++time +++++++staticText name='10:00' +++++++++inlineTextBox name='10:00' +++++time +++++++staticText name='Valentines day' +++++++++inlineTextBox name='Valentines day' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/title-expected-blink.txt b/content/test/data/accessibility/html/title-expected-blink.txt new file mode 100644 index 0000000..f42e87f --- /dev/null +++ b/content/test/data/accessibility/html/title-expected-blink.txt
@@ -0,0 +1 @@ +rootWebArea name='Title of the document' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/transition-expected-blink.txt b/content/test/data/accessibility/html/transition-expected-blink.txt new file mode 100644 index 0000000..0b3179c --- /dev/null +++ b/content/test/data/accessibility/html/transition-expected-blink.txt
@@ -0,0 +1,5 @@ +rootWebArea +++genericContainer +++++button name='GrowButton' +++++staticText name='Done' +++++++inlineTextBox name='Done' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/ul-expected-blink.txt b/content/test/data/accessibility/html/ul-expected-blink.txt new file mode 100644 index 0000000..30a1f249f --- /dev/null +++ b/content/test/data/accessibility/html/ul-expected-blink.txt
@@ -0,0 +1,14 @@ +rootWebArea +++list +++++listItem +++++++listMarker name='•' +++++++staticText name='Item 1' +++++++++inlineTextBox name='Item 1' +++++listItem +++++++listMarker name='•' +++++++staticText name='Item 2' +++++++++inlineTextBox name='Item 2' +++++listItem +++++++listMarker name='•' +++++++staticText name='Item 3' +++++++++inlineTextBox name='Item 3' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/var-expected-blink.txt b/content/test/data/accessibility/html/var-expected-blink.txt new file mode 100644 index 0000000..5ad6f33 --- /dev/null +++ b/content/test/data/accessibility/html/var-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea +++genericContainer +++++staticText name='Variable' +++++++inlineTextBox name='Variable' \ No newline at end of file
diff --git a/content/test/data/accessibility/html/wbr-expected-blink.txt b/content/test/data/accessibility/html/wbr-expected-blink.txt new file mode 100644 index 0000000..6ef81960 --- /dev/null +++ b/content/test/data/accessibility/html/wbr-expected-blink.txt
@@ -0,0 +1,8 @@ +rootWebArea +++genericContainer +++++staticText name='Supercali' +++++++inlineTextBox name='Supercali' +++++staticText name='fragilistic' +++++++inlineTextBox name='fragilistic' +++++staticText name='expialidocious' +++++++inlineTextBox name='expialidocious' \ No newline at end of file
diff --git a/content/test/gpu/generate_buildbot_json.py b/content/test/gpu/generate_buildbot_json.py index 4d4f3e8..3c43b3b 100755 --- a/content/test/gpu/generate_buildbot_json.py +++ b/content/test/gpu/generate_buildbot_json.py
@@ -1095,11 +1095,14 @@ 'gpu': '10de:104a', 'os': 'Windows-2008ServerR2-SP1' }, + # Temporarily disable AMD deqp ES3 tests due to issues with the log + # size causing out-of-memory errors in the recipe engine. + # crbug.com/713196 # AMD Win 7 - { - 'gpu': '1002:6613', - 'os': 'Windows-2008ServerR2-SP1' - } + #{ + # 'gpu': '1002:6613', + # 'os': 'Windows-2008ServerR2-SP1' + #} ], } ],
diff --git a/crypto/hmac.cc b/crypto/hmac.cc index 0480099e..4db1f6e 100644 --- a/crypto/hmac.cc +++ b/crypto/hmac.cc
@@ -50,12 +50,7 @@ } bool HMAC::Init(const SymmetricKey* key) { - std::string raw_key; - bool result = key->GetRawKey(&raw_key) && Init(raw_key); - // Zero out key copy. This might get optimized away, but one can hope. - // Using std::string to store key info at all is a larger problem. - std::fill(raw_key.begin(), raw_key.end(), 0); - return result; + return Init(key->key()); } bool HMAC::Sign(const base::StringPiece& data,
diff --git a/crypto/symmetric_key.cc b/crypto/symmetric_key.cc index b75080a..55ffb72f 100644 --- a/crypto/symmetric_key.cc +++ b/crypto/symmetric_key.cc
@@ -100,11 +100,6 @@ return key; } -bool SymmetricKey::GetRawKey(std::string* raw_key) const { - *raw_key = key_; - return true; -} - SymmetricKey::SymmetricKey() = default; } // namespace crypto
diff --git a/crypto/symmetric_key.h b/crypto/symmetric_key.h index e762555..9803cdc 100644 --- a/crypto/symmetric_key.h +++ b/crypto/symmetric_key.h
@@ -50,18 +50,14 @@ // Imports an array of key bytes in |raw_key|. This key may have been // generated by GenerateRandomKey or DeriveKeyFromPassword and exported with - // GetRawKey, or via another compatible method. The key must be of suitable - // size for use with |algorithm|. The caller owns the returned SymmetricKey. + // key(). The key must be of suitable size for use with |algorithm|. + // The caller owns the returned SymmetricKey. static std::unique_ptr<SymmetricKey> Import(Algorithm algorithm, const std::string& raw_key); + // Returns the raw platform specific key data. const std::string& key() const { return key_; } - // Extracts the raw key from the platform specific data. - // Warning: |raw_key| holds the raw key as bytes and thus must be handled - // carefully. - bool GetRawKey(std::string* raw_key) const; - private: SymmetricKey();
diff --git a/crypto/symmetric_key_unittest.cc b/crypto/symmetric_key_unittest.cc index d954761..02f12e5 100644 --- a/crypto/symmetric_key_unittest.cc +++ b/crypto/symmetric_key_unittest.cc
@@ -15,36 +15,27 @@ std::unique_ptr<crypto::SymmetricKey> key( crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 256)); ASSERT_TRUE(key); - std::string raw_key; - EXPECT_TRUE(key->GetRawKey(&raw_key)); - EXPECT_EQ(32U, raw_key.size()); + EXPECT_EQ(32U, key->key().size()); // Do it again and check that the keys are different. // (Note: this has a one-in-10^77 chance of failure!) std::unique_ptr<crypto::SymmetricKey> key2( crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 256)); ASSERT_TRUE(key2); - std::string raw_key2; - EXPECT_TRUE(key2->GetRawKey(&raw_key2)); - EXPECT_EQ(32U, raw_key2.size()); - EXPECT_NE(raw_key, raw_key2); + EXPECT_EQ(32U, key2->key().size()); + EXPECT_NE(key->key(), key2->key()); } TEST(SymmetricKeyTest, ImportGeneratedKey) { std::unique_ptr<crypto::SymmetricKey> key1( crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 256)); ASSERT_TRUE(key1); - std::string raw_key1; - EXPECT_TRUE(key1->GetRawKey(&raw_key1)); std::unique_ptr<crypto::SymmetricKey> key2( - crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, raw_key1)); + crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key1->key())); ASSERT_TRUE(key2); - std::string raw_key2; - EXPECT_TRUE(key2->GetRawKey(&raw_key2)); - - EXPECT_EQ(raw_key1, raw_key2); + EXPECT_EQ(key1->key(), key2->key()); } TEST(SymmetricKeyTest, ImportDerivedKey) { @@ -52,17 +43,12 @@ crypto::SymmetricKey::DeriveKeyFromPassword( crypto::SymmetricKey::HMAC_SHA1, "password", "somesalt", 1024, 160)); ASSERT_TRUE(key1); - std::string raw_key1; - EXPECT_TRUE(key1->GetRawKey(&raw_key1)); - std::unique_ptr<crypto::SymmetricKey> key2( - crypto::SymmetricKey::Import(crypto::SymmetricKey::HMAC_SHA1, raw_key1)); + std::unique_ptr<crypto::SymmetricKey> key2(crypto::SymmetricKey::Import( + crypto::SymmetricKey::HMAC_SHA1, key1->key())); ASSERT_TRUE(key2); - std::string raw_key2; - EXPECT_TRUE(key2->GetRawKey(&raw_key2)); - - EXPECT_EQ(raw_key1, raw_key2); + EXPECT_EQ(key1->key(), key2->key()); } struct PBKDF2TestVector { @@ -86,8 +72,7 @@ test_data.rounds, test_data.key_size_in_bits)); ASSERT_TRUE(key); - std::string raw_key; - key->GetRawKey(&raw_key); + const std::string& raw_key = key->key(); EXPECT_EQ(test_data.key_size_in_bits / 8, raw_key.size()); EXPECT_EQ(test_data.expected, base::ToLowerASCII(base::HexEncode(raw_key.data(),
diff --git a/docs/speed/perf_lab_platforms.md b/docs/speed/perf_lab_platforms.md new file mode 100644 index 0000000..341d13d --- /dev/null +++ b/docs/speed/perf_lab_platforms.md
@@ -0,0 +1,51 @@ +# Platforms tested in the Performance Lab + +## Android + + * [Nexus + 5X](https://build.chromium.org/p/chromium.perf/builders/Android%20Nexus5X%20Perf) + (Chrome and Webview) + * [Nexus + 5](https://build.chromium.org/p/chromium.perf/builders/Android%20Nexus5%20Perf) + * [Nexus + 6](https://build.chromium.org/p/chromium.perf/builders/Android%20Nexus6%20Perf) (Chrome and WebView) + * [Nexus + 7](https://build.chromium.org/p/chromium.perf/builders/Android%20Nexus7v2%20Perf) + * [Android + One](https://build.chromium.org/p/chromium.perf/builders/Android%20One%20Perf) + +## Mac + + * [Mac + 10.11](https://build.chromium.org/p/chromium.perf/builders/Mac%2010.11%20Perf) + * [Mac + 10.12](https://build.chromium.org/p/chromium.perf/builders/Mac%2010.12%20Perf) + * [Retina + Mac](https://build.chromium.org/p/chromium.perf/builders/Mac%20Retina%20Perf) + * [Macbook Pro + 10.11](https://build.chromium.org/p/chromium.perf/builders/Mac%20Pro%2010.11%20Perf) + * [Macbook Air + 10.11](https://build.chromium.org/p/chromium.perf/builders/Mac%20Air%2010.11%20Perf) + * [Mac Mini - 8GB running + 10.12](https://build.chromium.org/p/chromium.perf/builders/Mac%20Mini%208GB%2010.12%20Perf) + +## Windows + + * [Zenbook](https://build.chromium.org/p/chromium.perf/builders/Win%20Zenbook%20Perf) + * [Win 10 - High + DPI](https://build.chromium.org/p/chromium.perf/builders/Win%2010%20High-DPI%20Perf) + * [Win 10](https://build.chromium.org/p/chromium.perf/builders/Win%2010%20Perf) + * [Win 8](https://build.chromium.org/p/chromium.perf/builders/Win%208%20Perf) + * [Win 7](https://build.chromium.org/p/chromium.perf/builders/Win%207%20Perf) + * [Win 7 - + x64](https://build.chromium.org/p/chromium.perf/builders/Win%207%20x64%20Perf) + * [Win 7 with ATI + GPU](https://build.chromium.org/p/chromium.perf/builders/Win%207%20ATI%20GPU%20Perf) + * [Win 7 with Intel + GPU](https://build.chromium.org/p/chromium.perf/builders/Win%207%20Intel%20GPU%20Perf) + * [Win 7 with nVidia + GPU](https://build.chromium.org/p/chromium.perf/builders/Win%207%20Nvidia%20GPU%20Perf) + +## Linux + + * [Ubuntu](https://build.chromium.org/p/chromium.perf/builders/Linux%20Perf)
diff --git a/docs/task_scheduler_migration.md b/docs/task_scheduler_migration.md index 773f181..15bef25 100644 --- a/docs/task_scheduler_migration.md +++ b/docs/task_scheduler_migration.md
@@ -82,8 +82,8 @@ passed down into a component the prefered paradigm is to remove all of that plumbing and simply have the leaf layers requiring a TaskRunner get it from base::CreateSequenceTaskRunnerWithTraits() directly. - 3. Ideally migrating from a single-threaded context to a [much preferred] - (threading_and_tasks.md#Prefer-Sequences-to-Threads) sequenced context. + 3. Ideally migrating from a single-threaded context to a + [much preferred](threading_and_tasks.md#Prefer-Sequences-to-Threads) sequenced context. * Note: if your tasks use COM APIs (Component Object Model on Windows), you'll need to use CreateCOMSTATaskRunnerWithTraits() and sequencing will not be an option (there are DCHECKs in place that will fire if your task
diff --git a/docs/windows_build_instructions.md b/docs/windows_build_instructions.md index 7f1bf875..2e8feba 100644 --- a/docs/windows_build_instructions.md +++ b/docs/windows_build_instructions.md
@@ -89,6 +89,16 @@ ## Get the code +First, configure Git: + +```shell +$ git config --global user.name "My Name" +$ git config --global user.email "my-name@chromium.org" +$ git config --global core.autocrlf false +$ git config --global core.filemode false +$ git config --global branch.autosetuprebase always +``` + Create a `chromium` directory for the checkout and change to it (you can call this whatever you like and put it wherever you like, as long as the full path has no spaces):
diff --git a/gpu/config/gpu_crash_keys.cc b/gpu/config/gpu_crash_keys.cc index 427bb950..5b201eb 100644 --- a/gpu/config/gpu_crash_keys.cc +++ b/gpu/config/gpu_crash_keys.cc
@@ -19,5 +19,10 @@ const char kGPUVendor[] = "gpu-gl-vendor"; const char kGPURenderer[] = "gpu-gl-renderer"; #endif + +// TODO(sunnyps): Remove after https://crbug.com/729483 is fixed. +const char kGpuChannelFilterTrace[] = "gpu-channel-filter-trace"; +const char kMediaGpuChannelFilterTrace[] = "media-gpu-channel-filter-trace"; + } // namespace crash_keys } // namespace gpu
diff --git a/gpu/config/gpu_crash_keys.h b/gpu/config/gpu_crash_keys.h index b7ee75c..78deb52 100644 --- a/gpu/config/gpu_crash_keys.h +++ b/gpu/config/gpu_crash_keys.h
@@ -24,6 +24,12 @@ extern const char kGPUVendor[]; extern const char kGPURenderer[]; #endif + +// TEMPORARY: Backtraces for gpu message filters to fix use-after-free. +// TODO(sunnyps): Remove after https://crbug.com/729483 is fixed. +extern const char kGpuChannelFilterTrace[]; +extern const char kMediaGpuChannelFilterTrace[]; + } // namespace crash_keys } // namespace gpu
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn index 686c4a9..faeaefd 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn
@@ -74,6 +74,7 @@ "//gpu/command_buffer/common:common_sources", "//gpu/command_buffer/service:service_sources", "//gpu/config:config_sources", + "//gpu/config:crash_keys", "//gpu/ipc/common:ipc_common_sources", ] libs = []
diff --git a/gpu/ipc/service/gpu_channel.cc b/gpu/ipc/service/gpu_channel.cc index c6a1efb..9999491 100644 --- a/gpu/ipc/service/gpu_channel.cc +++ b/gpu/ipc/service/gpu_channel.cc
@@ -18,7 +18,8 @@ #include "base/atomicops.h" #include "base/bind.h" #include "base/command_line.h" -#include "base/debug/alias.h" +#include "base/debug/crash_logging.h" +#include "base/debug/stack_trace.h" #include "base/location.h" #include "base/numerics/safe_conversions.h" #include "base/single_thread_task_runner.h" @@ -37,6 +38,7 @@ #include "gpu/command_buffer/service/mailbox_manager.h" #include "gpu/command_buffer/service/preemption_flag.h" #include "gpu/command_buffer/service/scheduler.h" +#include "gpu/config/gpu_crash_keys.h" #include "gpu/ipc/common/gpu_messages.h" #include "gpu/ipc/service/gpu_channel_manager.h" #include "gpu/ipc/service/gpu_channel_manager_delegate.h" @@ -588,7 +590,10 @@ } GpuChannelMessageFilter::~GpuChannelMessageFilter() { - DCHECK(!gpu_channel_); + // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. + base::debug::SetCrashKeyToStackTrace(gpu::crash_keys::kGpuChannelFilterTrace, + base::debug::StackTrace()); + CHECK(!gpu_channel_); } void GpuChannelMessageFilter::Destroy() { @@ -614,8 +619,6 @@ void GpuChannelMessageFilter::OnFilterAdded(IPC::Channel* channel) { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); DCHECK(!ipc_channel_); ipc_channel_ = channel; @@ -626,8 +629,6 @@ void GpuChannelMessageFilter::OnFilterRemoved() { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) filter->OnFilterRemoved(); @@ -638,8 +639,6 @@ void GpuChannelMessageFilter::OnChannelConnected(int32_t peer_pid) { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); DCHECK(peer_pid_ == base::kNullProcessId); peer_pid_ = peer_pid; @@ -650,8 +649,6 @@ void GpuChannelMessageFilter::OnChannelError() { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) filter->OnChannelError(); @@ -660,8 +657,6 @@ void GpuChannelMessageFilter::OnChannelClosing() { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) filter->OnChannelClosing(); @@ -671,8 +666,6 @@ scoped_refptr<IPC::MessageFilter> filter) { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); channel_filters_.push_back(filter); if (ipc_channel_) @@ -685,8 +678,6 @@ scoped_refptr<IPC::MessageFilter> filter) { // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. CHECK(io_thread_checker_.CalledOnValidThread()); - GpuChannelMessageFilter* alias_this = this; - base::debug::Alias(&alias_this); if (ipc_channel_) filter->OnFilterRemoved();
diff --git a/headless/lib/browser/headless_browser_context_impl.cc b/headless/lib/browser/headless_browser_context_impl.cc index 3da6feb..976c0987 100644 --- a/headless/lib/browser/headless_browser_context_impl.cc +++ b/headless/lib/browser/headless_browser_context_impl.cc
@@ -333,6 +333,21 @@ return id_; } +void HeadlessBrowserContextImpl::AddObserver(Observer* obs) { + observers_.AddObserver(obs); +} + +void HeadlessBrowserContextImpl::RemoveObserver(Observer* obs) { + observers_.RemoveObserver(obs); +} + +void HeadlessBrowserContextImpl::NotifyChildContentsCreated( + HeadlessWebContentsImpl* parent, + HeadlessWebContentsImpl* child) { + for (auto& observer : observers_) + observer.OnChildContentsCreated(parent, child); +} + HeadlessBrowserContext::Builder::Builder(HeadlessBrowserImpl* browser) : browser_(browser), options_(new HeadlessBrowserContextOptions(browser->options())),
diff --git a/headless/lib/browser/headless_browser_context_impl.h b/headless/lib/browser/headless_browser_context_impl.h index b06766a4..71cac80 100644 --- a/headless/lib/browser/headless_browser_context_impl.h +++ b/headless/lib/browser/headless_browser_context_impl.h
@@ -44,6 +44,8 @@ const std::string& devtools_agent_host_id) override; void Close() override; const std::string& Id() const override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; void SetFrameTreeNodeId(int render_process_id, int render_frame_routing_id, @@ -93,6 +95,9 @@ // if it can't be found. Can be called on any thread. int GetFrameTreeNodeId(int render_process_id, int render_frame_id) const; + void NotifyChildContentsCreated(HeadlessWebContentsImpl* parent, + HeadlessWebContentsImpl* child); + private: HeadlessBrowserContextImpl( HeadlessBrowserImpl* browser, @@ -106,6 +111,7 @@ std::unique_ptr<HeadlessBrowserContextOptions> context_options_; std::unique_ptr<HeadlessResourceContext> resource_context_; base::FilePath path_; + base::ObserverList<Observer> observers_; std::unordered_map<std::string, std::unique_ptr<HeadlessWebContents>> web_contents_map_;
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc index c3c2f25..672047a 100644 --- a/headless/lib/browser/headless_browser_impl.cc +++ b/headless/lib/browser/headless_browser_impl.cc
@@ -141,7 +141,7 @@ agent_host_ = content::DevToolsAgentHost::CreateForBrowser( nullptr, content::DevToolsAgentHost::CreateServerSocketCallback()); - PlatformCreateWindow(); + PlatformStart(); on_start_callback_.Run(this); on_start_callback_ = base::Callback<void(HeadlessBrowser*)>(); }
diff --git a/headless/lib/browser/headless_browser_impl.h b/headless/lib/browser/headless_browser_impl.h index 485753d..03b9a3f 100644 --- a/headless/lib/browser/headless_browser_impl.h +++ b/headless/lib/browser/headless_browser_impl.h
@@ -80,9 +80,10 @@ // platform specific headless implementation. // Helper for one time initialization of application void PlatformInitialize(); - void PlatformCreateWindow(); - void PlatformInitializeWebContents(const gfx::Size& initial_size, - HeadlessWebContentsImpl* web_contents); + void PlatformStart(); + void PlatformInitializeWebContents(HeadlessWebContentsImpl* web_contents); + void PlatformSetWebContentsBounds(HeadlessWebContentsImpl* web_contents, + const gfx::Rect& bounds); protected: base::Callback<void(HeadlessBrowser*)> on_start_callback_;
diff --git a/headless/lib/browser/headless_browser_impl_aura.cc b/headless/lib/browser/headless_browser_impl_aura.cc index 57a0f77..687b2f0 100644 --- a/headless/lib/browser/headless_browser_impl_aura.cc +++ b/headless/lib/browser/headless_browser_impl_aura.cc
@@ -13,7 +13,7 @@ #include "ui/base/clipboard/clipboard.h" #include "ui/display/screen.h" #include "ui/events/devices/device_data_manager.h" -#include "ui/gfx/geometry/size.h" +#include "ui/gfx/geometry/rect.h" namespace headless { @@ -27,34 +27,39 @@ base::MakeUnique<HeadlessClipboard>()); } -void HeadlessBrowserImpl::PlatformCreateWindow() { +void HeadlessBrowserImpl::PlatformStart() { DCHECK(aura::Env::GetInstance()); ui::DeviceDataManager::CreateInstance(); } void HeadlessBrowserImpl::PlatformInitializeWebContents( - const gfx::Size& initial_size, HeadlessWebContentsImpl* web_contents) { - gfx::Rect initial_rect(initial_size); - - auto window_tree_host = - base::MakeUnique<HeadlessWindowTreeHost>(initial_rect); + auto window_tree_host = base::MakeUnique<HeadlessWindowTreeHost>(gfx::Rect()); window_tree_host->InitHost(); gfx::NativeWindow parent_window = window_tree_host->window(); parent_window->Show(); window_tree_host->SetParentWindow(parent_window); web_contents->set_window_tree_host(std::move(window_tree_host)); - gfx::NativeView contents = web_contents->web_contents()->GetNativeView(); - DCHECK(!parent_window->Contains(contents)); - parent_window->AddChild(contents); - contents->Show(); - contents->SetBounds(initial_rect); + gfx::NativeView native_view = web_contents->web_contents()->GetNativeView(); + DCHECK(!parent_window->Contains(native_view)); + parent_window->AddChild(native_view); + native_view->Show(); +} + +void HeadlessBrowserImpl::PlatformSetWebContentsBounds( + HeadlessWebContentsImpl* web_contents, + const gfx::Rect& bounds) { + web_contents->window_tree_host()->SetBoundsInPixels(bounds); + web_contents->window_tree_host()->window()->SetBounds(bounds); + + gfx::NativeView native_view = web_contents->web_contents()->GetNativeView(); + native_view->SetBounds(bounds); content::RenderWidgetHostView* host_view = web_contents->web_contents()->GetRenderWidgetHostView(); if (host_view) - host_view->SetSize(initial_size); + host_view->SetSize(bounds.size()); } } // namespace headless
diff --git a/headless/lib/browser/headless_browser_impl_mac.mm b/headless/lib/browser/headless_browser_impl_mac.mm index f5f5f7e..9c40982 100644 --- a/headless/lib/browser/headless_browser_impl_mac.mm +++ b/headless/lib/browser/headless_browser_impl_mac.mm
@@ -6,22 +6,26 @@ #include "content/public/browser/web_contents.h" #include "ui/base/cocoa/base_view.h" +#include "ui/gfx/mac/coordinate_conversion.h" namespace headless { void HeadlessBrowserImpl::PlatformInitialize() {} -void HeadlessBrowserImpl::PlatformCreateWindow() {} +void HeadlessBrowserImpl::PlatformStart() {} void HeadlessBrowserImpl::PlatformInitializeWebContents( - const gfx::Size& initial_size, HeadlessWebContentsImpl* web_contents) { NSView* web_view = web_contents->web_contents()->GetNativeView(); [web_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; +} - NSRect frame = NSMakeRect(0, 0, initial_size.width(), initial_size.height()); +void HeadlessBrowserImpl::PlatformSetWebContentsBounds( + HeadlessWebContentsImpl* web_contents, + const gfx::Rect& bounds) { + NSView* web_view = web_contents->web_contents()->GetNativeView(); + NSRect frame = gfx::ScreenRectToNSRect(bounds); [web_view setFrame:frame]; - return; } } // namespace headless
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.cc b/headless/lib/browser/headless_devtools_manager_delegate.cc index 1be2c69..36a2873d 100644 --- a/headless/lib/browser/headless_devtools_manager_delegate.cc +++ b/headless/lib/browser/headless_devtools_manager_delegate.cc
@@ -72,8 +72,7 @@ std::unique_ptr<base::DictionaryValue> CreateBoundsDict( const HeadlessWebContentsImpl* web_contents) { auto bounds_object = base::MakeUnique<base::DictionaryValue>(); - gfx::Rect bounds = - web_contents->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); + gfx::Rect bounds = web_contents->web_contents()->GetContainerBounds(); bounds_object->SetInteger("left", bounds.x()); bounds_object->SetInteger("top", bounds.y()); bounds_object->SetInteger("width", bounds.width()); @@ -475,8 +474,7 @@ // Compute updated bounds when window state is normal. bool set_bounds = false; - gfx::Rect bounds = - web_contents->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); + gfx::Rect bounds = web_contents->web_contents()->GetContainerBounds(); int left, top, width, height; if (bounds_dict->GetInteger("left", &left)) { bounds.set_x(left); @@ -514,7 +512,7 @@ } web_contents->set_window_state(window_state); - web_contents->web_contents()->GetRenderWidgetHostView()->SetBounds(bounds); + web_contents->SetBounds(bounds); return CreateSuccessResponse(command_id, nullptr); }
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc index 77e94ef5..76e6315 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -52,8 +52,8 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { public: - explicit Delegate(HeadlessBrowserContextImpl* browser_context) - : browser_context_(browser_context) {} + explicit Delegate(HeadlessWebContentsImpl* headless_web_contents) + : headless_web_contents_(headless_web_contents) {} void WebContentsCreated( content::WebContents* source_contents, @@ -64,13 +64,17 @@ content::WebContents* new_contents, const base::Optional<content::WebContents::CreateParams>& create_params) override { - std::unique_ptr<HeadlessWebContentsImpl> web_contents = - HeadlessWebContentsImpl::CreateFromWebContents(new_contents, - browser_context_); + DCHECK(new_contents->GetBrowserContext() == + headless_web_contents_->browser_context()); - DCHECK(new_contents->GetBrowserContext() == browser_context_); - - browser_context_->RegisterWebContents(std::move(web_contents)); + std::unique_ptr<HeadlessWebContentsImpl> child_contents = + HeadlessWebContentsImpl::CreateForChildContents(headless_web_contents_, + new_contents); + HeadlessWebContentsImpl* raw_child_contents = child_contents.get(); + headless_web_contents_->browser_context()->RegisterWebContents( + std::move(child_contents)); + headless_web_contents_->browser_context()->NotifyChildContentsCreated( + headless_web_contents_, raw_child_contents); } #if !defined(CHROME_MULTIPLE_DLL_CHILD) @@ -95,36 +99,23 @@ } void CloseContents(content::WebContents* source) override { - if (!browser_context_) { + if (source != headless_web_contents_->web_contents()) return; - } - - std::vector<HeadlessWebContents*> all_contents = - browser_context_->GetAllWebContents(); - - for (HeadlessWebContents* wc : all_contents) { - if (!wc) { - continue; - } - HeadlessWebContentsImpl* hwc = HeadlessWebContentsImpl::From(wc); - if (hwc->web_contents() == source) { - wc->Close(); - return; - } - } + headless_web_contents_->web_contents()->Close(); } private: - HeadlessBrowserContextImpl* browser_context_; // Not owned. + HeadlessWebContentsImpl* headless_web_contents_; // Not owned. DISALLOW_COPY_AND_ASSIGN(Delegate); }; namespace { -void ForwardToServiceFactory( - const base::Callback<void(TabSocketRequest)>& service_factory, +void CreateTabSocketMojoServiceForContents( + HeadlessWebContents* web_contents, mojo::ScopedMessagePipeHandle handle) { - service_factory.Run(TabSocketRequest(std::move(handle))); + HeadlessWebContentsImpl::From(web_contents) + ->CreateTabSocketMojoService(std::move(handle)); } } // namespace @@ -148,17 +139,11 @@ builder->tab_socket_type_ == Builder::TabSocketType::ISOLATED_WORLD; builder->mojo_services_.emplace_back( - TabSocket::Name_, - base::Bind( - &ForwardToServiceFactory, - base::Bind( - &HeadlessTabSocketImpl::CreateMojoService, - base::Unretained( - headless_web_contents->headless_tab_socket_.get())))); + TabSocket::Name_, base::Bind(&CreateTabSocketMojoServiceForContents)); } headless_web_contents->mojo_services_ = std::move(builder->mojo_services_); - headless_web_contents->InitializeScreen(builder->window_size_); + headless_web_contents->InitializeWindow(gfx::Rect(builder->window_size_)); if (!headless_web_contents->OpenURL(builder->initial_url_)) return nullptr; return headless_web_contents; @@ -166,29 +151,49 @@ // static std::unique_ptr<HeadlessWebContentsImpl> -HeadlessWebContentsImpl::CreateFromWebContents( - content::WebContents* web_contents, - HeadlessBrowserContextImpl* browser_context) { - std::unique_ptr<HeadlessWebContentsImpl> headless_web_contents = - base::WrapUnique( - new HeadlessWebContentsImpl(web_contents, browser_context)); +HeadlessWebContentsImpl::CreateForChildContents( + HeadlessWebContentsImpl* parent, + content::WebContents* child_contents) { + auto child = base::WrapUnique( + new HeadlessWebContentsImpl(child_contents, parent->browser_context())); - return headless_web_contents; + // Child contents should have their own root window. + child->InitializeWindow(child_contents->GetContainerBounds()); + + // Copy mojo services and tab socket settings from parent. + child->mojo_services_ = parent->mojo_services_; + if (parent->headless_tab_socket_) { + child->headless_tab_socket_ = base::MakeUnique<HeadlessTabSocketImpl>(); + child->inject_mojo_services_into_isolated_world_ = + parent->inject_mojo_services_into_isolated_world_; + } + + // There may already be frames, so make sure they also have our services. + for (content::RenderFrameHost* frame_host : child_contents->GetAllFrames()) + child->RenderFrameCreated(frame_host); + + return child; } -void HeadlessWebContentsImpl::InitializeScreen(const gfx::Size& initial_size) { +void HeadlessWebContentsImpl::InitializeWindow( + const gfx::Rect& initial_bounds) { static int window_id = 1; window_id_ = window_id++; window_state_ = "normal"; - browser()->PlatformInitializeWebContents(initial_size, this); + + browser()->PlatformInitializeWebContents(this); + SetBounds(initial_bounds); +} + +void HeadlessWebContentsImpl::SetBounds(const gfx::Rect& bounds) { + browser()->PlatformSetWebContentsBounds(this, bounds); } HeadlessWebContentsImpl::HeadlessWebContentsImpl( content::WebContents* web_contents, HeadlessBrowserContextImpl* browser_context) : content::WebContentsObserver(web_contents), - web_contents_delegate_( - new HeadlessWebContentsImpl::Delegate(browser_context)), + web_contents_delegate_(new HeadlessWebContentsImpl::Delegate(this)), web_contents_(web_contents), agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)), inject_mojo_services_into_isolated_world_(false), @@ -209,6 +214,17 @@ render_process_host_->RemoveObserver(this); } +void HeadlessWebContentsImpl::CreateTabSocketMojoService( + mojo::ScopedMessagePipeHandle handle) { + headless_tab_socket_->CreateMojoService(TabSocketRequest(std::move(handle))); +} + +void HeadlessWebContentsImpl::CreateMojoService( + const MojoService::ServiceFactoryCallback& service_factory, + mojo::ScopedMessagePipeHandle handle) { + service_factory.Run(this, std::move(handle)); +} + void HeadlessWebContentsImpl::RenderFrameCreated( content::RenderFrameHost* render_frame_host) { render_frame_host->GetRemoteInterfaces()->GetInterface( @@ -239,9 +255,11 @@ render_frame_host->GetInterfaceRegistry(); for (const MojoService& service : mojo_services_) { - interface_registry->AddInterface(service.service_name, - service.service_factory, - browser()->BrowserMainThread()); + interface_registry->AddInterface( + service.service_name, + base::Bind(&HeadlessWebContentsImpl::CreateMojoService, + base::Unretained(this), service.service_factory), + browser()->BrowserMainThread()); } browser_context_->SetFrameTreeNodeId(render_frame_host->GetProcess()->GetID(), @@ -419,8 +437,11 @@ HeadlessWebContents::Builder::MojoService::MojoService() {} HeadlessWebContents::Builder::MojoService::MojoService( + const MojoService& other) = default; + +HeadlessWebContents::Builder::MojoService::MojoService( const std::string& service_name, - const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) + const ServiceFactoryCallback& service_factory) : service_name(service_name), service_factory(service_factory) {} HeadlessWebContents::Builder::MojoService::~MojoService() {}
diff --git a/headless/lib/browser/headless_web_contents_impl.h b/headless/lib/browser/headless_web_contents_impl.h index f7eb0fa8..f8fafb9 100644 --- a/headless/lib/browser/headless_web_contents_impl.h +++ b/headless/lib/browser/headless_web_contents_impl.h
@@ -26,7 +26,7 @@ } namespace gfx { -class Size; +class Rect; } namespace headless { @@ -48,10 +48,10 @@ static std::unique_ptr<HeadlessWebContentsImpl> Create( HeadlessWebContents::Builder* builder); - // Takes ownership of |web_contents|. - static std::unique_ptr<HeadlessWebContentsImpl> CreateFromWebContents( - content::WebContents* web_contents, - HeadlessBrowserContextImpl* browser_context); + // Takes ownership of |child_contents|. + static std::unique_ptr<HeadlessWebContentsImpl> CreateForChildContents( + HeadlessWebContentsImpl* parent, + content::WebContents* child_contents); // HeadlessWebContents implementation: void AddObserver(Observer* observer) override; @@ -110,6 +110,11 @@ } const std::string& window_state() const { return window_state_; } + // Set bounds of WebContent's platform window. + void SetBounds(const gfx::Rect& bounds); + + void CreateTabSocketMojoService(mojo::ScopedMessagePipeHandle handle); + private: // Takes ownership of |web_contents|. HeadlessWebContentsImpl(content::WebContents* web_contents, @@ -118,8 +123,12 @@ void MainFrameTabSocketSetupComplete(); void MaybeIssueDevToolsTargetReady(); - void InitializeScreen(const gfx::Size& initial_size); + void InitializeWindow(const gfx::Rect& initial_bounds); + using MojoService = HeadlessWebContents::Builder::MojoService; + void CreateMojoService( + const MojoService::ServiceFactoryCallback& service_factory, + mojo::ScopedMessagePipeHandle handle); class Delegate; std::unique_ptr<Delegate> web_contents_delegate_;
diff --git a/headless/lib/headless_devtools_client_browsertest.cc b/headless/lib/headless_devtools_client_browsertest.cc index bf7caa8..a9305d9 100644 --- a/headless/lib/headless_devtools_client_browsertest.cc +++ b/headless/lib/headless_devtools_client_browsertest.cc
@@ -149,7 +149,7 @@ const browser::WindowState state, std::unique_ptr<browser::GetWindowBoundsResult> result) { const headless::browser::Bounds* actual_bounds = result->GetBounds(); -// https://crbug.com/726288: Mac does not currently support repositioning. +// Mac does not support repositioning, as we don't show any actual window. #if !defined(OS_MACOSX) EXPECT_EQ(bounds.x(), actual_bounds->GetLeft()); EXPECT_EQ(bounds.y(), actual_bounds->GetTop());
diff --git a/headless/lib/headless_web_contents_browsertest.cc b/headless/lib/headless_web_contents_browsertest.cc index c11d6af..f13774ec 100644 --- a/headless/lib/headless_web_contents_browsertest.cc +++ b/headless/lib/headless_web_contents_browsertest.cc
@@ -9,6 +9,7 @@ #include "base/base64.h" #include "base/json/json_writer.h" #include "content/public/test/browser_test.h" +#include "headless/lib/browser/headless_web_contents_impl.h" #include "headless/public/devtools/domains/page.h" #include "headless/public/devtools/domains/runtime.h" #include "headless/public/devtools/domains/security.h" @@ -39,6 +40,24 @@ namespace headless { +#define EXPECT_CHILD_CONTENTS_CREATED(obs) \ + EXPECT_CALL((obs), OnChildContentsCreated(::testing::_, ::testing::_)) \ + .WillOnce(::testing::DoAll(::testing::SaveArg<0>(&((obs).last_parent)), \ + ::testing::SaveArg<1>(&((obs).last_child)))) + +class MockHeadlessBrowserContextObserver + : public HeadlessBrowserContext::Observer { + public: + MOCK_METHOD2(OnChildContentsCreated, + void(HeadlessWebContents*, HeadlessWebContents*)); + + MockHeadlessBrowserContextObserver() {} + virtual ~MockHeadlessBrowserContextObserver() {} + + HeadlessWebContents* last_parent; + HeadlessWebContents* last_child; +}; + class HeadlessWebContentsTest : public HeadlessBrowserTest {}; IN_PROC_BROWSER_TEST_F(HeadlessWebContentsTest, Navigation) { @@ -63,14 +82,107 @@ HeadlessBrowserContext* browser_context = browser()->CreateBrowserContextBuilder().Build(); + MockHeadlessBrowserContextObserver observer; + browser_context->AddObserver(&observer); + EXPECT_CHILD_CONTENTS_CREATED(observer); + HeadlessWebContents* web_contents = browser_context->CreateWebContentsBuilder() .SetInitialURL(embedded_test_server()->GetURL("/window_open.html")) .Build(); EXPECT_TRUE(WaitForLoad(web_contents)); - EXPECT_EQ(static_cast<size_t>(2), - browser_context->GetAllWebContents().size()); + EXPECT_EQ(2u, browser_context->GetAllWebContents().size()); + + auto* parent = HeadlessWebContentsImpl::From(observer.last_parent); + auto* child = HeadlessWebContentsImpl::From(observer.last_child); + EXPECT_NE(nullptr, parent); + EXPECT_NE(nullptr, child); + EXPECT_NE(parent, child); + + // Mac doesn't have WindowTreeHosts. + if (parent && child && parent->window_tree_host()) + EXPECT_NE(parent->window_tree_host(), child->window_tree_host()); +} + +class HeadlessWindowOpenTabSocketTest : public HeadlessBrowserTest, + public HeadlessTabSocket::Listener, + public HeadlessBrowserContext::Observer, + public HeadlessWebContents::Observer { + public: + HeadlessWindowOpenTabSocketTest() + : devtools_client_(HeadlessDevToolsClient::Create()) {} + + void SetUp() override { + options()->mojo_service_names.insert("headless::TabSocket"); + HeadlessBrowserTest::SetUp(); + } + + // HeadlessTabSocket::Listener implementation. + void OnMessageFromTab(const std::string& message) override { + message_ = message; + FinishAsynchronousTest(); + } + + // HeadlessBrowserContext::Observer implementation. + void OnChildContentsCreated(HeadlessWebContents* parent, + HeadlessWebContents* child) override { + EXPECT_EQ(nullptr, child_); + child_ = child; + child_->AddObserver(this); + } + + // HeadlessWebContents::Observer implementation. + void DevToolsTargetReady() override { + child_->RemoveObserver(this); + + // Verify tab socket of child_contents works. + child_->GetDevToolsTarget()->AttachClient(devtools_client_.get()); + devtools_client_->GetRuntime()->Evaluate( + R"(window.TabSocket.onmessage = + function(message) { + window.TabSocket.send('Embedder sent us: ' + message); + }; + )", + base::Bind(&HeadlessWindowOpenTabSocketTest::OnEvaluateResult, + base::Unretained(this))); + } + + void OnEvaluateResult(std::unique_ptr<runtime::EvaluateResult> result) { + child_->GetDevToolsTarget()->DetachClient(devtools_client_.get()); + + HeadlessTabSocket* tab_socket = child_->GetHeadlessTabSocket(); + tab_socket->SendMessageToTab("One"); + tab_socket->SetListener(this); + } + + protected: + std::string message_; + HeadlessWebContents* child_ = nullptr; + std::unique_ptr<HeadlessDevToolsClient> devtools_client_; +}; + +IN_PROC_BROWSER_TEST_F(HeadlessWindowOpenTabSocketTest, + WindowOpenWithTabSocket) { + EXPECT_TRUE(embedded_test_server()->Start()); + + HeadlessBrowserContext* browser_context = + browser()->CreateBrowserContextBuilder().Build(); + browser_context->AddObserver(this); + + HeadlessWebContents* web_contents = + browser_context->CreateWebContentsBuilder() + .SetTabSocketType( + HeadlessWebContents::Builder::TabSocketType::MAIN_WORLD) + .SetInitialURL(embedded_test_server()->GetURL("/window_open.html")) + .Build(); + EXPECT_TRUE(WaitForLoad(web_contents)); + + EXPECT_EQ(2u, browser_context->GetAllWebContents().size()); + EXPECT_NE(nullptr, child_); + + RunAsynchronousTest(); + EXPECT_EQ("Embedder sent us: One", message_); } IN_PROC_BROWSER_TEST_F(HeadlessWebContentsTest, Focus) {
diff --git a/headless/public/headless_browser_context.h b/headless/public/headless_browser_context.h index e1c71c1..ec472c7 100644 --- a/headless/public/headless_browser_context.h +++ b/headless/public/headless_browser_context.h
@@ -40,6 +40,7 @@ // When browser context is deleted, all associated web contents are closed. class HEADLESS_EXPORT HeadlessBrowserContext { public: + class Observer; class Builder; virtual ~HeadlessBrowserContext() {} @@ -65,6 +66,9 @@ // GUID for this browser context. virtual const std::string& Id() const = 0; + virtual void AddObserver(Observer* observer) = 0; + virtual void RemoveObserver(Observer* observer) = 0; + // TODO(skyostil): Allow saving and restoring contexts (crbug.com/617931). protected: @@ -74,6 +78,15 @@ DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContext); }; +class HEADLESS_EXPORT HeadlessBrowserContext::Observer { + public: + virtual void OnChildContentsCreated(HeadlessWebContents* parent, + HeadlessWebContents* child) = 0; + + protected: + virtual ~Observer() {} +}; + class HEADLESS_EXPORT HeadlessBrowserContext::Builder { public: Builder(Builder&&);
diff --git a/headless/public/headless_web_contents.h b/headless/public/headless_web_contents.h index 899249c..01fb232 100644 --- a/headless/public/headless_web_contents.h +++ b/headless/public/headless_web_contents.h
@@ -133,26 +133,19 @@ explicit Builder(HeadlessBrowserContextImpl* browser_context); - template <typename Interface> - static void ForwardToServiceFactory( - const base::Callback<void(mojo::InterfaceRequest<Interface>)>& - service_factory, - mojo::ScopedMessagePipeHandle handle) { - service_factory.Run(mojo::InterfaceRequest<Interface>(std::move(handle))); - } - struct MojoService { + using ServiceFactoryCallback = + base::Callback<void(HeadlessWebContents*, + mojo::ScopedMessagePipeHandle)>; + MojoService(); + MojoService(const MojoService& other); MojoService(const std::string& service_name, - const base::Callback<void(mojo::ScopedMessagePipeHandle)>& - service_factory); + const ServiceFactoryCallback& service_factory); ~MojoService(); std::string service_name; - base::Callback<void(mojo::ScopedMessagePipeHandle)> service_factory; - - private: - DISALLOW_COPY_AND_ASSIGN(MojoService); + ServiceFactoryCallback service_factory; }; HeadlessBrowserContextImpl* browser_context_;
diff --git a/ios/chrome/app/safe_mode/BUILD.gn b/ios/chrome/app/safe_mode/BUILD.gn index e8cd331..d1b9a4a 100644 --- a/ios/chrome/app/safe_mode/BUILD.gn +++ b/ios/chrome/app/safe_mode/BUILD.gn
@@ -14,6 +14,7 @@ } source_set("safe_mode") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "safe_mode_coordinator.h", "safe_mode_coordinator.mm",
diff --git a/ios/chrome/app/safe_mode/safe_mode_coordinator.h b/ios/chrome/app/safe_mode/safe_mode_coordinator.h index 499e924..ba25933 100644 --- a/ios/chrome/app/safe_mode/safe_mode_coordinator.h +++ b/ios/chrome/app/safe_mode/safe_mode_coordinator.h
@@ -21,7 +21,7 @@ @interface SafeModeCoordinator : ChromeRootCoordinator // Delegate for this coordinator. -@property(nonatomic, nullable, assign) id<SafeModeCoordinatorDelegate> delegate; +@property(nonatomic, nullable, weak) id<SafeModeCoordinatorDelegate> delegate; // If YES, there's a reason to show this coordinator. + (BOOL)shouldStart;
diff --git a/ios/chrome/app/safe_mode/safe_mode_coordinator.mm b/ios/chrome/app/safe_mode/safe_mode_coordinator.mm index a919785..c5f8b86 100644 --- a/ios/chrome/app/safe_mode/safe_mode_coordinator.mm +++ b/ios/chrome/app/safe_mode/safe_mode_coordinator.mm
@@ -4,34 +4,26 @@ #import "ios/chrome/app/safe_mode/safe_mode_coordinator.h" -#include "base/mac/scoped_nsobject.h" +#import "base/logging.h" #import "ios/chrome/app/safe_mode/safe_mode_view_controller.h" #include "ios/chrome/browser/crash_loop_detection_util.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace { const int kStartupCrashLoopThreshold = 2; } -@interface SafeModeCoordinator ()<SafeModeViewControllerDelegate> { - // Weak pointer to window passed on init. - base::WeakNSObject<UIWindow> _window; - // Weak pointer backing property of the same name. - base::WeakNSProtocol<id<SafeModeCoordinatorDelegate>> _delegate; -} - +@interface SafeModeCoordinator ()<SafeModeViewControllerDelegate> @end -@implementation SafeModeCoordinator - -#pragma mark - property implementation. - -- (id<SafeModeCoordinatorDelegate>)delegate { - return _delegate; +@implementation SafeModeCoordinator { + __weak UIWindow* _window; } -- (void)setDelegate:(id<SafeModeCoordinatorDelegate>)delegate { - _delegate.reset(delegate); -} +@synthesize delegate = _delegate; #pragma mark - Public class methods @@ -54,8 +46,8 @@ // General note: Safe mode should be safe; it should not depend on other // objects being created. Be extremely conservative when adding code to this // method. - base::scoped_nsobject<SafeModeViewController> viewController( - [[SafeModeViewController alloc] initWithDelegate:self]); + SafeModeViewController* viewController = + [[SafeModeViewController alloc] initWithDelegate:self]; [self.window setRootViewController:viewController]; // Reset the crash count; the user may change something based on the recovery
diff --git a/ios/chrome/app/safe_mode/safe_mode_view_controller.h b/ios/chrome/app/safe_mode/safe_mode_view_controller.h index 38078aa..64e2c2d 100644 --- a/ios/chrome/app/safe_mode/safe_mode_view_controller.h +++ b/ios/chrome/app/safe_mode/safe_mode_view_controller.h
@@ -7,9 +7,6 @@ #import <UIKit/UIKit.h> -#import "base/ios/weak_nsobject.h" -#include "base/mac/scoped_nsobject.h" - @class PrimaryActionButton; // A protocol required by delegates of the SafeModeViewController. @@ -19,16 +16,7 @@ - (void)startBrowserFromSafeMode; @end -@interface SafeModeViewController : UIViewController { - @private - base::WeakNSProtocol<id<SafeModeViewControllerDelegate>> delegate_; - base::scoped_nsobject<UIView> innerView_; - base::scoped_nsobject<PrimaryActionButton> startButton_; - base::scoped_nsobject<UILabel> uploadDescription_; - base::scoped_nsobject<UIProgressView> uploadProgress_; - base::scoped_nsobject<NSDate> uploadStartTime_; - base::scoped_nsobject<NSTimer> uploadTimer_; -} +@interface SafeModeViewController : UIViewController - (id)initWithDelegate:(id<SafeModeViewControllerDelegate>)delegate;
diff --git a/ios/chrome/app/safe_mode/safe_mode_view_controller.mm b/ios/chrome/app/safe_mode/safe_mode_view_controller.mm index fbd921c..a69e21a 100644 --- a/ios/chrome/app/safe_mode/safe_mode_view_controller.mm +++ b/ios/chrome/app/safe_mode/safe_mode_view_controller.mm
@@ -16,6 +16,10 @@ #include "ios/chrome/grit/ios_chromium_strings.h" #import "ui/gfx/ios/NSString+CrStringDrawing.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace { const CGFloat kVerticalSpacing = 20; const CGFloat kUploadProgressSpacing = 5; @@ -41,12 +45,20 @@ - (void)startBrowserFromSafeMode; @end -@implementation SafeModeViewController +@implementation SafeModeViewController { + __weak id<SafeModeViewControllerDelegate> delegate_; + UIView* innerView_; + PrimaryActionButton* startButton_; + UILabel* uploadDescription_; + UIProgressView* uploadProgress_; + NSDate* uploadStartTime_; + NSTimer* uploadTimer_; +} - (id)initWithDelegate:(id<SafeModeViewControllerDelegate>)delegate { self = [super init]; if (self) { - delegate_.reset(delegate); + delegate_ = delegate; } return self; } @@ -139,15 +151,14 @@ if (IsLandscape()) { mainBounds.size = CGSizeMake(mainBounds.size.height, mainBounds.size.width); } - base::scoped_nsobject<UIScrollView> scrollView( - [[UIScrollView alloc] initWithFrame:mainBounds]); + UIScrollView* scrollView = [[UIScrollView alloc] initWithFrame:mainBounds]; self.view = scrollView; [self.view setBackgroundColor:[UIColor colorWithWhite:0.902 alpha:1.0]]; const CGFloat kIPadInset = (mainBounds.size.width - kIPadWidth - kHorizontalSpacing) / 2; const CGFloat widthInset = IsIPadIdiom() ? kIPadInset : kHorizontalSpacing; - innerView_.reset([[UIView alloc] - initWithFrame:CGRectInset(mainBounds, widthInset, kVerticalSpacing * 2)]); + innerView_ = [[UIView alloc] + initWithFrame:CGRectInset(mainBounds, widthInset, kVerticalSpacing * 2)]; [innerView_ setBackgroundColor:[UIColor whiteColor]]; [innerView_ layer].cornerRadius = 3; [innerView_ layer].borderWidth = 1; @@ -157,8 +168,7 @@ [scrollView addSubview:innerView_]; UIImage* fatalImage = [UIImage imageNamed:@"fatal_error.png"]; - base::scoped_nsobject<UIImageView> imageView( - [[UIImageView alloc] initWithImage:fatalImage]); + UIImageView* imageView = [[UIImageView alloc] initWithImage:fatalImage]; // Shift the image down a bit. CGRect imageFrame = [imageView frame]; imageFrame.origin.y = kVerticalSpacing; @@ -166,7 +176,7 @@ [self centerView:imageView afterView:nil]; [innerView_ addSubview:imageView]; - base::scoped_nsobject<UILabel> awSnap([[UILabel alloc] init]); + UILabel* awSnap = [[UILabel alloc] init]; [awSnap setText:NSLocalizedString(@"IDS_IOS_SAFE_MODE_AW_SNAP", @"")]; [awSnap setBackgroundColor:[UIColor clearColor]]; [awSnap setTextColor:[UIColor blackColor]]; @@ -175,7 +185,7 @@ [self centerView:awSnap afterView:imageView]; [innerView_ addSubview:awSnap]; - base::scoped_nsobject<UILabel> description([[UILabel alloc] init]); + UILabel* description = [[UILabel alloc] init]; [description setText:[self startupCrashModuleText]]; [description setBackgroundColor:[UIColor clearColor]]; [description setTextColor:[UIColor colorWithWhite:0.31 alpha:1.0]]; @@ -193,7 +203,7 @@ [self centerView:description afterView:awSnap]; [innerView_ addSubview:description]; - startButton_.reset([[PrimaryActionButton alloc] init]); + startButton_ = [[PrimaryActionButton alloc] init]; NSString* startText = NSLocalizedString(@"IDS_IOS_SAFE_MODE_RELOAD_CHROME", @""); [startButton_ setTitle:startText forState:UIControlStateNormal]; @@ -223,7 +233,7 @@ if (![SafeModeViewController detectedThirdPartyMods]) { [startButton_ setEnabled:NO]; - uploadDescription_.reset([[UILabel alloc] init]); + uploadDescription_ = [[UILabel alloc] init]; [uploadDescription_ setText:NSLocalizedString(@"IDS_IOS_SAFE_MODE_SENDING_CRASH_REPORT", @"")]; @@ -234,8 +244,8 @@ [self centerView:uploadDescription_ afterView:startButton_]; [innerView_ addSubview:uploadDescription_]; - uploadProgress_.reset([[UIProgressView alloc] - initWithProgressViewStyle:UIProgressViewStyleDefault]); + uploadProgress_ = [[UIProgressView alloc] + initWithProgressViewStyle:UIProgressViewStyleDefault]; [self centerView:uploadProgress_ afterView:nil]; frame = [uploadProgress_ frame]; frame.origin.y = @@ -265,13 +275,13 @@ #pragma mark - Private - (void)startUploadProgress { - uploadStartTime_.reset([[NSDate date] retain]); - uploadTimer_.reset( - [[NSTimer scheduledTimerWithTimeInterval:kUploadPumpInterval - target:self - selector:@selector(pumpUploadProgress) - userInfo:nil - repeats:YES] retain]); + uploadStartTime_ = [NSDate date]; + uploadTimer_ = + [NSTimer scheduledTimerWithTimeInterval:kUploadPumpInterval + target:self + selector:@selector(pumpUploadProgress) + userInfo:nil + repeats:YES]; } - (void)pumpUploadProgress {
diff --git a/ipc/ipc_mojo_perftest.cc b/ipc/ipc_mojo_perftest.cc index 836a1df..fb39a2c2 100644 --- a/ipc/ipc_mojo_perftest.cc +++ b/ipc/ipc_mojo_perftest.cc
@@ -31,10 +31,7 @@ // start time and an end time). class EventTimeTracker { public: - explicit EventTimeTracker(const char* name) - : name_(name), - count_(0) { - } + explicit EventTimeTracker(const char* name) : name_(name), count_(0) {} void AddEvent(const base::TimeTicks& start, const base::TimeTicks& end) { DCHECK(end >= start); @@ -46,13 +43,13 @@ void ShowResults() const { VLOG(1) << name_ << " count: " << count_; - VLOG(1) << name_ << " total duration: " - << total_duration_.InMillisecondsF() << " ms"; + VLOG(1) << name_ << " total duration: " << total_duration_.InMillisecondsF() + << " ms"; VLOG(1) << name_ << " average duration: " << (total_duration_.InMillisecondsF() / static_cast<double>(count_)) << " ms"; - VLOG(1) << name_ << " maximum duration: " - << max_duration_.InMillisecondsF() << " ms"; + VLOG(1) << name_ << " maximum duration: " << max_duration_.InMillisecondsF() + << " ms"; } void Reset() { @@ -83,9 +80,7 @@ VLOG(1) << "Server listener up"; } - ~PerformanceChannelListener() override { - VLOG(1) << "Server listener down"; - } + ~PerformanceChannelListener() override { VLOG(1) << "Server listener down"; } void Init(Sender* sender) { DCHECK(!sender_); @@ -120,9 +115,7 @@ latency_tracker_.Reset(); DCHECK(!perf_logger_.get()); std::string test_name = - base::StringPrintf("IPC_%s_Perf_%dx_%u", - label_.c_str(), - msg_count_, + base::StringPrintf("IPC_%s_Perf_%dx_%u", label_.c_str(), msg_count_, static_cast<unsigned>(msg_size_)); perf_logger_.reset(new base::PerfTimeLogger(test_name.c_str())); } else { @@ -167,8 +160,7 @@ class ChannelReflectorListener : public Listener { public: ChannelReflectorListener() - : channel_(NULL), - latency_tracker_("Client messages") { + : channel_(NULL), latency_tracker_("Client messages") { VLOG(1) << "Client listener up"; } @@ -273,8 +265,7 @@ class PingPongTestParams { public: PingPongTestParams(size_t size, int count) - : message_size_(size), message_count_(count) { - } + : message_size_(size), message_count_(count) {} size_t message_size() const { return message_size_; } int message_count() const { return message_count_; } @@ -285,8 +276,8 @@ }; std::vector<PingPongTestParams> GetDefaultTestParams() { - // Test several sizes. We use 12^N for message size, and limit the message - // count to keep the test duration reasonable. +// Test several sizes. We use 12^N for message size, and limit the message +// count to keep the test duration reasonable. #ifdef NDEBUG const int kMultiplier = 100; #else @@ -327,8 +318,7 @@ params[i].message_size()); // This initial message will kick-start the ping-pong of messages. - Message* message = - new Message(0, 2, Message::PRIORITY_NORMAL); + Message* message = new Message(0, 2, Message::PRIORITY_NORMAL); message->WriteInt64(base::TimeTicks::Now().ToInternalValue()); message->WriteInt(-1); message->WriteString("hello"); @@ -347,7 +337,7 @@ EXPECT_TRUE(WaitForClientShutdown()); DestroyChannel(); -} + } void RunTestChannelProxyPingPong() { io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); @@ -365,7 +355,7 @@ std::vector<PingPongTestParams> params = GetDefaultTestParams(); for (size_t i = 0; i < params.size(); i++) { listener.SetTestParams(params[i].message_count(), - params[i].message_size()); + params[i].message_size()); // This initial message will kick-start the ping-pong of messages. Message* message = new Message(0, 2, Message::PRIORITY_NORMAL); @@ -431,8 +421,7 @@ class MojoPerfTestClient { public: - MojoPerfTestClient() - : listener_(new ChannelReflectorListener()) { + MojoPerfTestClient() : listener_(new ChannelReflectorListener()) { mojo::edk::test::MultiprocessTestHelper::ChildSetup(); } @@ -483,9 +472,7 @@ std::move(callback).Run(value); } - void Quit() override { - base::MessageLoop::current()->QuitWhenIdle(); - } + void Quit() override { base::MessageLoop::current()->QuitWhenIdle(); } mojo::Binding<IPC::mojom::Reflector> binding_; }; @@ -500,15 +487,13 @@ mojo::MessagePipeHandle mp_handle(mp); mojo::ScopedMessagePipeHandle scoped_mp(mp_handle); - ping_receiver_.Bind(IPC::mojom::ReflectorPtrInfo( - std::move(scoped_mp), 0u)); + ping_receiver_.Bind(IPC::mojom::ReflectorPtrInfo(std::move(scoped_mp), 0u)); LockThreadAffinity thread_locker(kSharedCore); std::vector<PingPongTestParams> params = GetDefaultTestParams(); for (size_t i = 0; i < params.size(); i++) { - ping_receiver_->Ping( - "hello", - base::Bind(&MojoInterfacePerfTest::OnPong, base::Unretained(this))); + ping_receiver_->Ping("hello", base::Bind(&MojoInterfacePerfTest::OnPong, + base::Unretained(this))); message_count_ = count_down_ = params[i].message_count(); payload_ = std::string(params[i].message_size(), 'a'); @@ -524,10 +509,8 @@ if (value == "hello") { DCHECK(!perf_logger_.get()); std::string test_name = - base::StringPrintf("IPC_%s_Perf_%dx_%zu", - label_.c_str(), - message_count_, - payload_.size()); + base::StringPrintf("IPC_%s_Perf_%dx_%zu", label_.c_str(), + message_count_, payload_.size()); perf_logger_.reset(new base::PerfTimeLogger(test_name.c_str())); } else { DCHECK_EQ(payload_.size(), value.size()); @@ -541,9 +524,8 @@ } } - ping_receiver_->Ping( - payload_, - base::Bind(&MojoInterfacePerfTest::OnPong, base::Unretained(this))); + ping_receiver_->Ping(payload_, base::Bind(&MojoInterfacePerfTest::OnPong, + base::Unretained(this))); } static int RunPingPongClient(MojoHandle mp) { @@ -581,10 +563,10 @@ // Similar to MojoChannelPerfTest above, but uses a Mojo interface instead of // raw IPC::Messages. TEST_F(MojoInterfacePerfTest, MultiprocessPingPong) { - RUN_CHILD_ON_PIPE(PingPongClient, h) + RunTestClient("PingPongClient", [&](MojoHandle h) { base::MessageLoop main_message_loop; - RunPingPongServer(h, "MultiProcess"); - END_CHILD() + RunPingPongServer(h, "Multiprocess"); + }); } // A single process version of the above test. @@ -641,8 +623,7 @@ void Ping(const std::string& value) { main_message_loop_.task_runner()->PostTask( FROM_HERE, - base::Bind(&CallbackPerfTest::OnPong, base::Unretained(this), - value)); + base::Bind(&CallbackPerfTest::OnPong, base::Unretained(this), value)); } void OnPong(const std::string& value) { @@ -650,8 +631,7 @@ DCHECK(!perf_logger_.get()); std::string test_name = base::StringPrintf("Callback_MultiProcess_Perf_%dx_%zu", - message_count_, - payload_.size()); + message_count_, payload_.size()); perf_logger_.reset(new base::PerfTimeLogger(test_name.c_str())); } else { DCHECK_EQ(payload_.size(), value.size()); @@ -674,15 +654,14 @@ LockThreadAffinity thread_locker(kSharedCore); std::vector<PingPongTestParams> params = GetDefaultTestParams(); base::Callback<void(const std::string&, - const base::Callback<void(const std::string&)>&)> ping = - base::Bind(&CallbackPerfTest::SingleThreadPingNoPostTask, - base::Unretained(this)); + const base::Callback<void(const std::string&)>&)> + ping = base::Bind(&CallbackPerfTest::SingleThreadPingNoPostTask, + base::Unretained(this)); for (size_t i = 0; i < params.size(); i++) { payload_ = std::string(params[i].message_size(), 'a'); std::string test_name = base::StringPrintf("Callback_SingleThreadPostTask_Perf_%dx_%zu", - params[i].message_count(), - payload_.size()); + params[i].message_count(), payload_.size()); perf_logger_.reset(new base::PerfTimeLogger(test_name.c_str())); for (int j = 0; j < params[i].message_count(); ++j) { ping.Run(payload_, @@ -693,13 +672,13 @@ } } - void SingleThreadPingNoPostTask(const std::string& value, - const base::Callback<void(const std::string&)>& pong) { + void SingleThreadPingNoPostTask( + const std::string& value, + const base::Callback<void(const std::string&)>& pong) { pong.Run(value); } - void SingleThreadPongNoPostTask(const std::string& value) { - } + void SingleThreadPongNoPostTask(const std::string& value) {} void RunSingleThreadPostTaskPingPongServer() { LockThreadAffinity thread_locker(kSharedCore); @@ -707,9 +686,8 @@ for (size_t i = 0; i < params.size(); i++) { std::string hello("hello"); base::MessageLoop::current()->task_runner()->PostTask( - FROM_HERE, - base::Bind(&CallbackPerfTest::SingleThreadPingPostTask, - base::Unretained(this), hello)); + FROM_HERE, base::Bind(&CallbackPerfTest::SingleThreadPingPostTask, + base::Unretained(this), hello)); message_count_ = count_down_ = params[i].message_count(); payload_ = std::string(params[i].message_size(), 'a'); @@ -719,10 +697,8 @@ void SingleThreadPingPostTask(const std::string& value) { base::MessageLoop::current()->task_runner()->PostTask( - FROM_HERE, - base::Bind(&CallbackPerfTest::SingleThreadPongPostTask, - base::Unretained(this), - value)); + FROM_HERE, base::Bind(&CallbackPerfTest::SingleThreadPongPostTask, + base::Unretained(this), value)); } void SingleThreadPongPostTask(const std::string& value) { @@ -730,8 +706,7 @@ DCHECK(!perf_logger_.get()); std::string test_name = base::StringPrintf("Callback_SingleThreadNoPostTask_Perf_%dx_%zu", - message_count_, - payload_.size()); + message_count_, payload_.size()); perf_logger_.reset(new base::PerfTimeLogger(test_name.c_str())); } else { DCHECK_EQ(payload_.size(), value.size()); @@ -746,9 +721,8 @@ } base::MessageLoop::current()->task_runner()->PostTask( - FROM_HERE, - base::Bind(&CallbackPerfTest::SingleThreadPingPostTask, - base::Unretained(this), payload_)); + FROM_HERE, base::Bind(&CallbackPerfTest::SingleThreadPingPostTask, + base::Unretained(this), payload_)); } private:
diff --git a/media/gpu/ipc/service/BUILD.gn b/media/gpu/ipc/service/BUILD.gn index 776b2e3..5c52de8 100644 --- a/media/gpu/ipc/service/BUILD.gn +++ b/media/gpu/ipc/service/BUILD.gn
@@ -38,6 +38,7 @@ "//media/gpu", ] deps = [ + "//gpu/config:crash_keys", "//gpu/ipc/service", "//media:media_features", "//media/gpu/ipc/common",
diff --git a/media/gpu/ipc/service/media_gpu_channel.cc b/media/gpu/ipc/service/media_gpu_channel.cc index 18323251..64fe2ef4 100644 --- a/media/gpu/ipc/service/media_gpu_channel.cc +++ b/media/gpu/ipc/service/media_gpu_channel.cc
@@ -4,8 +4,11 @@ #include "media/gpu/ipc/service/media_gpu_channel.h" +#include "base/debug/crash_logging.h" +#include "base/debug/stack_trace.h" #include "base/single_thread_task_runner.h" #include "base/unguessable_token.h" +#include "gpu/config/gpu_crash_keys.h" #include "gpu/ipc/service/gpu_channel.h" #include "ipc/message_filter.h" #include "media/gpu/ipc/common/media_messages.h" @@ -72,7 +75,12 @@ } private: - ~MediaGpuChannelFilter() override {} + ~MediaGpuChannelFilter() override { + // TODO(sunnyps): Remove once crbug.com/729483 has been resolved. + base::debug::SetCrashKeyToStackTrace( + gpu::crash_keys::kMediaGpuChannelFilterTrace, + base::debug::StackTrace()); + } IPC::Channel* channel_; base::UnguessableToken channel_token_;
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc index 7c41bc9..c49328f 100644 --- a/mojo/edk/embedder/embedder_unittest.cc +++ b/mojo/edk/embedder/embedder_unittest.cc
@@ -190,7 +190,7 @@ #if !defined(OS_IOS) TEST_F(EmbedderTest, MultiprocessChannels) { - RUN_CHILD_ON_PIPE(MultiprocessChannelsClient, server_mp) + RunTestClient("MultiprocessChannelsClient", [&](MojoHandle server_mp) { // 1. Write a message to |server_mp| (attaching nothing). WriteMessage(server_mp, "hello"); @@ -229,10 +229,11 @@ ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, state.satisfiable_signals); ASSERT_EQ(MOJO_RESULT_OK, MojoClose(mp2)); - END_CHILD() + }); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessChannelsClient, EmbedderTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessChannelsClient, + EmbedderTest, client_mp) { // 1. Read the first message from |client_mp|. EXPECT_EQ("hello", ReadMessage(client_mp)); @@ -273,15 +274,15 @@ } TEST_F(EmbedderTest, MultiprocessBaseSharedMemory) { - RUN_CHILD_ON_PIPE(MultiprocessSharedMemoryClient, server_mp) + RunTestClient("MultiprocessSharedMemoryClient", [&](MojoHandle server_mp) { // 1. Create a base::SharedMemory object and create a mojo shared buffer // from it. base::SharedMemoryCreateOptions options; options.size = 123; base::SharedMemory shared_memory; ASSERT_TRUE(shared_memory.Create(options)); - base::SharedMemoryHandle shm_handle = base::SharedMemory::DuplicateHandle( - shared_memory.handle()); + base::SharedMemoryHandle shm_handle = + base::SharedMemory::DuplicateHandle(shared_memory.handle()); MojoHandle sb1; ASSERT_EQ(MOJO_RESULT_OK, CreateSharedBufferWrapper(shm_handle, 123, false, &sb1)); @@ -312,10 +313,11 @@ std::string(static_cast<char*>(shared_memory.memory()))); ASSERT_EQ(MOJO_RESULT_OK, MojoClose(sb1)); - END_CHILD() + }); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessSharedMemoryClient, EmbedderTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessSharedMemoryClient, + EmbedderTest, client_mp) { // 1. Read the first message from |client_mp|, which should have |sb1| which // should be a shared buffer handle. @@ -352,15 +354,15 @@ #if defined(OS_MACOSX) && !defined(OS_IOS) TEST_F(EmbedderTest, MultiprocessMachSharedMemory) { - RUN_CHILD_ON_PIPE(MultiprocessSharedMemoryClient, server_mp) + RunTestClient("MultiprocessSharedMemoryClient", [&](MojoHandle server_mp) { // 1. Create a Mach base::SharedMemory object and create a mojo shared // buffer from it. base::SharedMemoryCreateOptions options; options.size = 123; base::SharedMemory shared_memory; ASSERT_TRUE(shared_memory.Create(options)); - base::SharedMemoryHandle shm_handle = base::SharedMemory::DuplicateHandle( - shared_memory.handle()); + base::SharedMemoryHandle shm_handle = + base::SharedMemory::DuplicateHandle(shared_memory.handle()); MojoHandle sb1; ASSERT_EQ(MOJO_RESULT_OK, CreateSharedBufferWrapper(shm_handle, 123, false, &sb1)); @@ -391,7 +393,7 @@ std::string(static_cast<char*>(shared_memory.memory()))); ASSERT_EQ(MOJO_RESULT_OK, MojoClose(sb1)); - END_CHILD() + }); } enum class HandleType { @@ -401,17 +403,14 @@ }; const HandleType kTestHandleTypes[] = { - HandleType::MACH, - HandleType::MACH_NULL, - HandleType::POSIX, - HandleType::POSIX, - HandleType::MACH, + HandleType::MACH, HandleType::MACH_NULL, HandleType::POSIX, + HandleType::POSIX, HandleType::MACH, }; // Test that we can mix file descriptors and mach port handles. TEST_F(EmbedderTest, MultiprocessMixMachAndFds) { const size_t kShmSize = 1234; - RUN_CHILD_ON_PIPE(MultiprocessMixMachAndFdsClient, server_mp) + RunTestClient("MultiprocessMixMachAndFdsClient", [&](MojoHandle server_mp) { // 1. Create fds or Mach objects and mojo handles from them. MojoHandle platform_handles[arraysize(kTestHandleTypes)]; for (size_t i = 0; i < arraysize(kTestHandleTypes); i++) { @@ -425,8 +424,8 @@ scoped_handle.reset(PlatformHandle(file.TakePlatformFile())); EXPECT_EQ(PlatformHandle::Type::POSIX, scoped_handle.get().type); } else if (type == HandleType::MACH_NULL) { - scoped_handle.reset(PlatformHandle( - static_cast<mach_port_t>(MACH_PORT_NULL))); + scoped_handle.reset( + PlatformHandle(static_cast<mach_port_t>(MACH_PORT_NULL))); EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type); } else { base::SharedMemoryCreateOptions options; @@ -438,8 +437,9 @@ scoped_handle.reset(PlatformHandle(shm_handle.GetMemoryObject())); EXPECT_EQ(PlatformHandle::Type::MACH, scoped_handle.get().type); } - ASSERT_EQ(MOJO_RESULT_OK, CreatePlatformHandleWrapper( - std::move(scoped_handle), platform_handles + i)); + ASSERT_EQ(MOJO_RESULT_OK, + CreatePlatformHandleWrapper(std::move(scoped_handle), + platform_handles + i)); } // 2. Send all the handles to the child. @@ -448,10 +448,11 @@ // 3. Read a message from |server_mp|. EXPECT_EQ("bye", ReadMessage(server_mp)); - END_CHILD() + }); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessMixMachAndFdsClient, EmbedderTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessMixMachAndFdsClient, + EmbedderTest, client_mp) { const int kNumHandles = arraysize(kTestHandleTypes); MojoHandle platform_handles[kNumHandles]; @@ -554,7 +555,8 @@ EXPECT_EQ(0, controller.WaitForShutdown()); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ClosePipeToConnectedPeerClient, EmbedderTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ClosePipeToConnectedPeerClient, + EmbedderTest, client_mp) { // 1. Read the first message from |client_mp|. EXPECT_EQ("hello", ReadMessage(client_mp)); @@ -579,7 +581,8 @@ EXPECT_EQ(0, controller.WaitForShutdown()); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ClosePipeToConnectingPeerClient, EmbedderTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ClosePipeToConnectingPeerClient, + EmbedderTest, client_mp) { ASSERT_EQ(MOJO_RESULT_OK, WaitForSignals(client_mp, MOJO_HANDLE_SIGNAL_PEER_CLOSED));
diff --git a/mojo/edk/embedder/entrypoints.cc b/mojo/edk/embedder/entrypoints.cc index 45d5222e..96048028 100644 --- a/mojo/edk/embedder/entrypoints.cc +++ b/mojo/edk/embedder/entrypoints.cc
@@ -201,19 +201,21 @@ MojoResult MojoWrapPlatformSharedBufferHandleImpl( const MojoPlatformHandle* platform_handle, size_t num_bytes, + const MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags flags, MojoHandle* mojo_handle) { return g_core->WrapPlatformSharedBufferHandle(platform_handle, num_bytes, - flags, mojo_handle); + guid, flags, mojo_handle); } MojoResult MojoUnwrapPlatformSharedBufferHandleImpl( MojoHandle mojo_handle, MojoPlatformHandle* platform_handle, size_t* num_bytes, + MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags* flags) { return g_core->UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle, - num_bytes, flags); + num_bytes, guid, flags); } MojoResult MojoNotifyBadMessageImpl(MojoMessageHandle message,
diff --git a/mojo/edk/embedder/platform_shared_buffer.cc b/mojo/edk/embedder/platform_shared_buffer.cc index 2087a2c..0f8b8b0 100644 --- a/mojo/edk/embedder/platform_shared_buffer.cc +++ b/mojo/edk/embedder/platform_shared_buffer.cc
@@ -57,11 +57,12 @@ PlatformSharedBuffer* PlatformSharedBuffer::CreateFromPlatformHandle( size_t num_bytes, bool read_only, + const base::UnguessableToken& guid, ScopedPlatformHandle platform_handle) { DCHECK_GT(num_bytes, 0u); PlatformSharedBuffer* rv = new PlatformSharedBuffer(num_bytes, read_only); - if (!rv->InitFromPlatformHandle(std::move(platform_handle))) { + if (!rv->InitFromPlatformHandle(guid, std::move(platform_handle))) { // We can't just delete it directly, due to the "in destructor" (debug) // check. scoped_refptr<PlatformSharedBuffer> deleter(rv); @@ -74,6 +75,7 @@ // static PlatformSharedBuffer* PlatformSharedBuffer::CreateFromPlatformHandlePair( size_t num_bytes, + const base::UnguessableToken& guid, ScopedPlatformHandle rw_platform_handle, ScopedPlatformHandle ro_platform_handle) { DCHECK_GT(num_bytes, 0u); @@ -81,7 +83,7 @@ DCHECK(ro_platform_handle.is_valid()); PlatformSharedBuffer* rv = new PlatformSharedBuffer(num_bytes, false); - if (!rv->InitFromPlatformHandlePair(std::move(rw_platform_handle), + if (!rv->InitFromPlatformHandlePair(guid, std::move(rw_platform_handle), std::move(ro_platform_handle))) { // We can't just delete it directly, due to the "in destructor" (debug) // check. @@ -113,6 +115,11 @@ return read_only_; } +base::UnguessableToken PlatformSharedBuffer::GetGUID() const { + DCHECK(shared_memory_); + return shared_memory_->handle().GetGUID(); +} + std::unique_ptr<PlatformSharedBufferMapping> PlatformSharedBuffer::Map( size_t offset, size_t length) { @@ -230,11 +237,10 @@ } bool PlatformSharedBuffer::InitFromPlatformHandle( + const base::UnguessableToken& guid, ScopedPlatformHandle platform_handle) { DCHECK(!shared_memory_); - // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763. - base::UnguessableToken guid = base::UnguessableToken::Create(); #if defined(OS_WIN) base::SharedMemoryHandle handle(platform_handle.release().handle, num_bytes_, guid); @@ -252,6 +258,7 @@ } bool PlatformSharedBuffer::InitFromPlatformHandlePair( + const base::UnguessableToken& guid, ScopedPlatformHandle rw_platform_handle, ScopedPlatformHandle ro_platform_handle) { #if defined(OS_MACOSX) @@ -259,14 +266,12 @@ return false; #else // defined(OS_MACOSX) - // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763. - base::UnguessableToken guid = base::UnguessableToken::Create(); #if defined(OS_WIN) base::SharedMemoryHandle handle(rw_platform_handle.release().handle, num_bytes_, guid); base::SharedMemoryHandle ro_handle(ro_platform_handle.release().handle, num_bytes_, guid); -#else // defined(OS_WIN) +#else // defined(OS_WIN) base::SharedMemoryHandle handle( base::FileDescriptor(rw_platform_handle.release().handle, false), num_bytes_, guid); @@ -303,9 +308,9 @@ } bool PlatformSharedBufferMapping::Map() { - // Mojo shared buffers can be mapped at any offset. However, - // base::SharedMemory must be mapped at a page boundary. So calculate what the - // nearest whole page offset is, and build a mapping that's offset from that. +// Mojo shared buffers can be mapped at any offset. However, +// base::SharedMemory must be mapped at a page boundary. So calculate what the +// nearest whole page offset is, and build a mapping that's offset from that. #if defined(OS_NACL) // base::SysInfo isn't available under NaCl. size_t page_size = getpagesize();
diff --git a/mojo/edk/embedder/platform_shared_buffer.h b/mojo/edk/embedder/platform_shared_buffer.h index 45be723..637fce24 100644 --- a/mojo/edk/embedder/platform_shared_buffer.h +++ b/mojo/edk/embedder/platform_shared_buffer.h
@@ -14,6 +14,7 @@ #include "base/memory/shared_memory.h" #include "base/memory/shared_memory_handle.h" #include "base/synchronization/lock.h" +#include "base/unguessable_token.h" #include "mojo/edk/embedder/scoped_platform_handle.h" #include "mojo/edk/system/system_impl_export.h" @@ -44,6 +45,7 @@ static PlatformSharedBuffer* CreateFromPlatformHandle( size_t num_bytes, bool read_only, + const base::UnguessableToken& guid, ScopedPlatformHandle platform_handle); // Creates a shared buffer of size |num_bytes| from the existing pair of @@ -51,6 +53,7 @@ // |ro_platform_handle|. Returns null on failure. static PlatformSharedBuffer* CreateFromPlatformHandlePair( size_t num_bytes, + const base::UnguessableToken& guid, ScopedPlatformHandle rw_platform_handle, ScopedPlatformHandle ro_platform_handle); @@ -67,6 +70,10 @@ // Returns whether this shared buffer is read-only. bool IsReadOnly() const; + // Returns a GUID which uniquely identifies the underlying shared buffer + // object. + base::UnguessableToken GetGUID() const; + // Maps (some) of the shared buffer into memory; [|offset|, |offset + length|] // must be contained in [0, |num_bytes|], and |length| must be at least 1. // Returns null on failure. @@ -110,9 +117,11 @@ // This is like |Init()|, but for |CreateFromPlatformHandle()|. (Note: It // should verify that |platform_handle| is an appropriate handle for the // claimed |num_bytes_|.) - bool InitFromPlatformHandle(ScopedPlatformHandle platform_handle); + bool InitFromPlatformHandle(const base::UnguessableToken& guid, + ScopedPlatformHandle platform_handle); - bool InitFromPlatformHandlePair(ScopedPlatformHandle rw_platform_handle, + bool InitFromPlatformHandlePair(const base::UnguessableToken& guid, + ScopedPlatformHandle rw_platform_handle, ScopedPlatformHandle ro_platform_handle); void InitFromSharedMemoryHandle(base::SharedMemoryHandle handle);
diff --git a/mojo/edk/system/broker_host.cc b/mojo/edk/system/broker_host.cc index 751495b..4796e33 100644 --- a/mojo/edk/system/broker_host.cc +++ b/mojo/edk/system/broker_host.cc
@@ -46,8 +46,8 @@ bool BrokerHost::PrepareHandlesForClient(PlatformHandleVector* handles) { #if defined(OS_WIN) - if (!Channel::Message::RewriteHandles( - base::GetCurrentProcessHandle(), client_process_, handles)) { + if (!Channel::Message::RewriteHandles(base::GetCurrentProcessHandle(), + client_process_, handles)) { // NOTE: We only log an error here. We do not signal a logical error or // prevent any message from being sent. The client should handle unexpected // invalid handles appropriately. @@ -80,7 +80,7 @@ if (!PrepareHandlesForClient(handles.get())) return false; - message->SetHandles(std::move(handles)); + message->SetHandles(std::move(handles)); channel_->Write(std::move(message)); return true; } @@ -109,9 +109,13 @@ if (!read_only_buffer) buffer = nullptr; + BufferResponseData* response; Channel::MessagePtr message = CreateBrokerMessage( - BrokerMessageType::BUFFER_RESPONSE, buffer ? 2 : 0, nullptr); + BrokerMessageType::BUFFER_RESPONSE, buffer ? 2 : 0, 0, &response); if (buffer) { + base::UnguessableToken guid = buffer->GetGUID(); + response->guid_high = guid.GetHighForSerialization(); + response->guid_low = guid.GetLowForSerialization(); ScopedPlatformHandleVectorPtr handles; handles.reset(new PlatformHandleVector(2)); handles->at(0) = buffer->PassPlatformHandle().release(); @@ -134,7 +138,7 @@ switch (header->type) { case BrokerMessageType::BUFFER_REQUEST: if (payload_size == - sizeof(BrokerMessageHeader) + sizeof(BufferRequestData)) { + sizeof(BrokerMessageHeader) + sizeof(BufferRequestData)) { const BufferRequestData* request = reinterpret_cast<const BufferRequestData*>(header + 1); OnBufferRequest(request->size); @@ -147,9 +151,13 @@ } } -void BrokerHost::OnChannelError() { delete this; } +void BrokerHost::OnChannelError() { + delete this; +} -void BrokerHost::WillDestroyCurrentMessageLoop() { delete this; } +void BrokerHost::WillDestroyCurrentMessageLoop() { + delete this; +} } // namespace edk } // namespace mojo
diff --git a/mojo/edk/system/broker_messages.h b/mojo/edk/system/broker_messages.h index 0f0dd9d..88cab4e4 100644 --- a/mojo/edk/system/broker_messages.h +++ b/mojo/edk/system/broker_messages.h
@@ -30,6 +30,11 @@ uint32_t size; }; +struct BufferResponseData { + uint64_t guid_high; + uint64_t guid_low; +}; + #if defined(OS_WIN) struct InitData { // NOTE: InitData in the payload is followed by string16 data with exactly @@ -42,6 +47,17 @@ #pragma pack(pop) template <typename T> +inline bool GetBrokerMessageData(Channel::Message* message, T** out_data) { + const size_t required_size = sizeof(BrokerMessageHeader) + sizeof(T); + if (message->payload_size() < required_size) + return false; + + auto* header = static_cast<BrokerMessageHeader*>(message->mutable_payload()); + *out_data = reinterpret_cast<T*>(header + 1); + return true; +} + +template <typename T> inline Channel::MessagePtr CreateBrokerMessage( BrokerMessageType type, size_t num_handles, @@ -49,7 +65,7 @@ T** out_message_data, void** out_extra_data = nullptr) { const size_t message_size = sizeof(BrokerMessageHeader) + - sizeof(**out_message_data) + extra_data_size; + sizeof(**out_message_data) + extra_data_size; Channel::MessagePtr message(new Channel::Message(message_size, num_handles)); BrokerMessageHeader* header = reinterpret_cast<BrokerMessageHeader*>(message->mutable_payload());
diff --git a/mojo/edk/system/broker_posix.cc b/mojo/edk/system/broker_posix.cc index 8742f70..0dc07d5 100644 --- a/mojo/edk/system/broker_posix.cc +++ b/mojo/edk/system/broker_posix.cc
@@ -23,12 +23,14 @@ namespace { -bool WaitForBrokerMessage(PlatformHandle platform_handle, - BrokerMessageType expected_type, - size_t expected_num_handles, - std::deque<PlatformHandle>* incoming_handles) { - Channel::MessagePtr message( - new Channel::Message(sizeof(BrokerMessageHeader), expected_num_handles)); +Channel::MessagePtr WaitForBrokerMessage( + PlatformHandle platform_handle, + BrokerMessageType expected_type, + size_t expected_num_handles, + size_t expected_data_size, + std::deque<PlatformHandle>* incoming_handles) { + Channel::MessagePtr message(new Channel::Message( + sizeof(BrokerMessageHeader) + expected_data_size, expected_num_handles)); std::deque<PlatformHandle> incoming_platform_handles; ssize_t read_result = PlatformChannelRecvmsg( platform_handle, const_cast<void*>(message->data()), @@ -60,7 +62,10 @@ if (incoming_handles) incoming_handles->swap(incoming_platform_handles); } - return !error; + + if (error) + return nullptr; + return message; } } // namespace @@ -77,7 +82,7 @@ // Wait for the first message, which should contain a handle. std::deque<PlatformHandle> incoming_platform_handles; - if (WaitForBrokerMessage(sync_channel_.get(), BrokerMessageType::INIT, 1, + if (WaitForBrokerMessage(sync_channel_.get(), BrokerMessageType::INIT, 1, 0, &incoming_platform_handles)) { parent_channel_ = ScopedPlatformHandle(incoming_platform_handles.front()); } @@ -108,14 +113,20 @@ } std::deque<PlatformHandle> incoming_platform_handles; - if (WaitForBrokerMessage(sync_channel_.get(), - BrokerMessageType::BUFFER_RESPONSE, 2, - &incoming_platform_handles)) { + Channel::MessagePtr message = WaitForBrokerMessage( + sync_channel_.get(), BrokerMessageType::BUFFER_RESPONSE, 2, + sizeof(BufferResponseData), &incoming_platform_handles); + if (message) { + const BufferResponseData* data; + if (!GetBrokerMessageData(message.get(), &data)) + return nullptr; + base::UnguessableToken guid = + base::UnguessableToken::Deserialize(data->guid_high, data->guid_low); ScopedPlatformHandle rw_handle(incoming_platform_handles.front()); incoming_platform_handles.pop_front(); ScopedPlatformHandle ro_handle(incoming_platform_handles.front()); return PlatformSharedBuffer::CreateFromPlatformHandlePair( - num_bytes, std::move(rw_handle), std::move(ro_handle)); + num_bytes, guid, std::move(rw_handle), std::move(ro_handle)); } return nullptr;
diff --git a/mojo/edk/system/broker_win.cc b/mojo/edk/system/broker_win.cc index 063282c..6369b4e4 100644 --- a/mojo/edk/system/broker_win.cc +++ b/mojo/edk/system/broker_win.cc
@@ -108,7 +108,7 @@ const InitData* data = reinterpret_cast<const InitData*>(header + 1); CHECK_EQ(message->payload_size(), sizeof(BrokerMessageHeader) + sizeof(InitData) + - data->pipe_name_length * sizeof(base::char16)); + data->pipe_name_length * sizeof(base::char16)); const base::char16* name_data = reinterpret_cast<const base::char16*>(data + 1); CHECK(data->pipe_name_length); @@ -144,8 +144,13 @@ sync_channel_.get(), BrokerMessageType::BUFFER_RESPONSE); if (response && TakeHandlesFromBrokerMessage(response.get(), 2, &handles[0])) { + BufferResponseData* data; + if (!GetBrokerMessageData(response.get(), &data)) + return nullptr; + base::UnguessableToken guid = + base::UnguessableToken::Deserialize(data->guid_high, data->guid_low); return PlatformSharedBuffer::CreateFromPlatformHandlePair( - num_bytes, std::move(handles[0]), std::move(handles[1])); + num_bytes, guid, std::move(handles[0]), std::move(handles[1])); } return nullptr;
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc index 51782ee7..6b837022 100644 --- a/mojo/edk/system/core.cc +++ b/mojo/edk/system/core.cc
@@ -370,9 +370,8 @@ RequestContext request_context; ports::PortRef port0, port1; GetNodeController()->node()->CreatePortPair(&port0, &port1); - MojoHandle handle = AddDispatcher( - new MessagePipeDispatcher(GetNodeController(), port0, - kUnknownPipeIdForDebug, 1)); + MojoHandle handle = AddDispatcher(new MessagePipeDispatcher( + GetNodeController(), port0, kUnknownPipeIdForDebug, 1)); GetNodeController()->MergePortIntoParent(name, port1); return ScopedMessagePipeHandle(MessagePipeHandle(handle)); } @@ -569,10 +568,9 @@ } } -MojoResult Core::CreateMessagePipe( - const MojoCreateMessagePipeOptions* options, - MojoHandle* message_pipe_handle0, - MojoHandle* message_pipe_handle1) { +MojoResult Core::CreateMessagePipe(const MojoCreateMessagePipeOptions* options, + MojoHandle* message_pipe_handle0, + MojoHandle* message_pipe_handle1) { RequestContext request_context; ports::PortRef port0, port1; GetNodeController()->node()->CreatePortPair(&port0, &port1); @@ -692,10 +690,9 @@ return MOJO_RESULT_OK; } -MojoResult Core::CreateDataPipe( - const MojoCreateDataPipeOptions* options, - MojoHandle* data_pipe_producer_handle, - MojoHandle* data_pipe_consumer_handle) { +MojoResult Core::CreateDataPipe(const MojoCreateDataPipeOptions* options, + MojoHandle* data_pipe_producer_handle, + MojoHandle* data_pipe_consumer_handle) { RequestContext request_context; if (options && options->struct_size != sizeof(MojoCreateDataPipeOptions)) return MOJO_RESULT_INVALID_ARGUMENT; @@ -705,9 +702,9 @@ create_options.flags = options ? options->flags : 0; create_options.element_num_bytes = options ? options->element_num_bytes : 1; // TODO(rockot): Use Configuration to get default data pipe capacity. - create_options.capacity_num_bytes = - options && options->capacity_num_bytes ? options->capacity_num_bytes - : 64 * 1024; + create_options.capacity_num_bytes = options && options->capacity_num_bytes + ? options->capacity_num_bytes + : 64 * 1024; scoped_refptr<PlatformSharedBuffer> ring_buffer = GetNodeController()->CreateSharedBuffer( @@ -917,8 +914,8 @@ MojoResult Core::WrapPlatformHandle(const MojoPlatformHandle* platform_handle, MojoHandle* mojo_handle) { ScopedPlatformHandle handle; - MojoResult result = MojoPlatformHandleToScopedPlatformHandle(platform_handle, - &handle); + MojoResult result = + MojoPlatformHandleToScopedPlatformHandle(platform_handle, &handle); if (result != MOJO_RESULT_OK) return result; @@ -939,18 +936,21 @@ MojoResult Core::WrapPlatformSharedBufferHandle( const MojoPlatformHandle* platform_handle, size_t size, + const MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags flags, MojoHandle* mojo_handle) { DCHECK(size); ScopedPlatformHandle handle; - MojoResult result = MojoPlatformHandleToScopedPlatformHandle(platform_handle, - &handle); + MojoResult result = + MojoPlatformHandleToScopedPlatformHandle(platform_handle, &handle); if (result != MOJO_RESULT_OK) return result; + base::UnguessableToken token = + base::UnguessableToken::Deserialize(guid->high, guid->low); bool read_only = flags & MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_READ_ONLY; scoped_refptr<PlatformSharedBuffer> platform_buffer = - PlatformSharedBuffer::CreateFromPlatformHandle(size, read_only, + PlatformSharedBuffer::CreateFromPlatformHandle(size, read_only, token, std::move(handle)); if (!platform_buffer) return MOJO_RESULT_UNKNOWN; @@ -975,6 +975,7 @@ MojoHandle mojo_handle, MojoPlatformHandle* platform_handle, size_t* size, + MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags* flags) { scoped_refptr<Dispatcher> dispatcher; MojoResult result = MOJO_RESULT_OK; @@ -999,6 +1000,10 @@ DCHECK(size); *size = platform_shared_buffer->GetNumBytes(); + base::UnguessableToken token = platform_shared_buffer->GetGUID(); + guid->high = token.GetHighForSerialization(); + guid->low = token.GetLowForSerialization(); + DCHECK(flags); *flags = MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE; if (platform_shared_buffer->IsReadOnly())
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h index c996cbb..7c8c0a14 100644 --- a/mojo/edk/system/core.h +++ b/mojo/edk/system/core.h
@@ -208,10 +208,9 @@ // These methods correspond to the API functions defined in // "mojo/public/c/system/message_pipe.h": - MojoResult CreateMessagePipe( - const MojoCreateMessagePipeOptions* options, - MojoHandle* message_pipe_handle0, - MojoHandle* message_pipe_handle1); + MojoResult CreateMessagePipe(const MojoCreateMessagePipeOptions* options, + MojoHandle* message_pipe_handle0, + MojoHandle* message_pipe_handle1); MojoResult WriteMessage(MojoHandle message_pipe_handle, MojoMessageHandle message_handle, MojoWriteMessageFlags flags); @@ -225,10 +224,9 @@ // These methods correspond to the API functions defined in // "mojo/public/c/system/data_pipe.h": - MojoResult CreateDataPipe( - const MojoCreateDataPipeOptions* options, - MojoHandle* data_pipe_producer_handle, - MojoHandle* data_pipe_consumer_handle); + MojoResult CreateDataPipe(const MojoCreateDataPipeOptions* options, + MojoHandle* data_pipe_producer_handle, + MojoHandle* data_pipe_consumer_handle); MojoResult WriteData(MojoHandle data_pipe_producer_handle, const void* elements, uint32_t* num_bytes, @@ -252,10 +250,9 @@ // These methods correspond to the API functions defined in // "mojo/public/c/system/buffer.h": - MojoResult CreateSharedBuffer( - const MojoCreateSharedBufferOptions* options, - uint64_t num_bytes, - MojoHandle* shared_buffer_handle); + MojoResult CreateSharedBuffer(const MojoCreateSharedBufferOptions* options, + uint64_t num_bytes, + MojoHandle* shared_buffer_handle); MojoResult DuplicateBufferHandle( MojoHandle buffer_handle, const MojoDuplicateBufferHandleOptions* options, @@ -276,12 +273,14 @@ MojoResult WrapPlatformSharedBufferHandle( const MojoPlatformHandle* platform_handle, size_t size, + const MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags flags, MojoHandle* mojo_handle); MojoResult UnwrapPlatformSharedBufferHandle( MojoHandle mojo_handle, MojoPlatformHandle* platform_handle, size_t* size, + MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags* flags); void GetActiveHandlesForTest(std::vector<MojoHandle>* handles);
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc index a0f6119..b44b7a61 100644 --- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc +++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -39,6 +39,8 @@ uint32_t read_offset; uint32_t bytes_available; uint8_t flags; + uint64_t buffer_guid_high; + uint64_t buffer_guid_low; char padding[7]; }; @@ -114,8 +116,7 @@ (flags & MOJO_READ_DATA_FLAG_DISCARD)) return MOJO_RESULT_INVALID_ARGUMENT; DCHECK(!(flags & MOJO_READ_DATA_FLAG_DISCARD)); // Handled above. - DVLOG_IF(2, elements) - << "Query mode: ignoring non-null |elements|"; + DVLOG_IF(2, elements) << "Query mode: ignoring non-null |elements|"; *num_bytes = static_cast<uint32_t>(bytes_available_); if (had_new_data) @@ -128,8 +129,7 @@ // These flags are mutally exclusive. if (flags & MOJO_READ_DATA_FLAG_PEEK) return MOJO_RESULT_INVALID_ARGUMENT; - DVLOG_IF(2, elements) - << "Discard mode: ignoring non-null |elements|"; + DVLOG_IF(2, elements) << "Discard mode: ignoring non-null |elements|"; discard = true; } @@ -138,8 +138,7 @@ return MOJO_RESULT_INVALID_ARGUMENT; bool all_or_none = flags & MOJO_READ_DATA_FLAG_ALL_OR_NONE; - uint32_t min_num_bytes_to_read = - all_or_none ? max_num_bytes_to_read : 0; + uint32_t min_num_bytes_to_read = all_or_none ? max_num_bytes_to_read : 0; if (min_num_bytes_to_read > bytes_available_) { if (had_new_data) @@ -202,8 +201,7 @@ // These flags may not be used in two-phase mode. if ((flags & MOJO_READ_DATA_FLAG_DISCARD) || - (flags & MOJO_READ_DATA_FLAG_QUERY) || - (flags & MOJO_READ_DATA_FLAG_PEEK)) + (flags & MOJO_READ_DATA_FLAG_QUERY) || (flags & MOJO_READ_DATA_FLAG_PEEK)) return MOJO_RESULT_INVALID_ARGUMENT; const bool had_new_data = new_data_available_; @@ -217,8 +215,8 @@ } DCHECK_LT(read_offset_, options_.capacity_num_bytes); - uint32_t bytes_to_read = std::min(bytes_available_, - options_.capacity_num_bytes - read_offset_); + uint32_t bytes_to_read = + std::min(bytes_available_, options_.capacity_num_bytes - read_offset_); CHECK(ring_buffer_mapping_); uint8_t* data = static_cast<uint8_t*>(ring_buffer_mapping_->GetBase()); @@ -317,6 +315,10 @@ state->bytes_available = bytes_available_; state->flags = peer_closed_ ? kFlagPeerClosed : 0; + base::UnguessableToken guid = shared_ring_buffer_->GetGUID(); + state->buffer_guid_high = guid.GetHighForSerialization(); + state->buffer_guid_low = guid.GetLowForSerialization(); + ports[0] = control_port_.name(); buffer_handle_for_transit_ = shared_ring_buffer_->DuplicatePlatformHandle(); @@ -374,12 +376,13 @@ if (node_controller->node()->GetPort(ports[0], &port) != ports::OK) return nullptr; + base::UnguessableToken guid = base::UnguessableToken::Deserialize( + state->buffer_guid_high, state->buffer_guid_low); PlatformHandle buffer_handle; std::swap(buffer_handle, handles[0]); scoped_refptr<PlatformSharedBuffer> ring_buffer = PlatformSharedBuffer::CreateFromPlatformHandle( - state->options.capacity_num_bytes, - false /* read_only */, + state->options.capacity_num_bytes, false /* read_only */, guid, ScopedPlatformHandle(buffer_handle)); if (!ring_buffer) { DLOG(ERROR) << "Failed to deserialize shared buffer handle."; @@ -438,8 +441,7 @@ base::AutoUnlock unlock(lock_); node_controller_->SetPortObserver( - control_port_, - make_scoped_refptr(new PortObserverThunk(this))); + control_port_, make_scoped_refptr(new PortObserverThunk(this))); return true; } @@ -461,8 +463,8 @@ return MOJO_RESULT_OK; } -HandleSignalsState -DataPipeConsumerDispatcher::GetHandleSignalsStateNoLock() const { +HandleSignalsState DataPipeConsumerDispatcher::GetHandleSignalsStateNoLock() + const { lock_.AssertAcquired(); HandleSignalsState rv; @@ -490,9 +492,9 @@ } void DataPipeConsumerDispatcher::NotifyRead(uint32_t num_bytes) { - DVLOG(1) << "Data pipe consumer " << pipe_id_ << " notifying peer: " - << num_bytes << " bytes read. [control_port=" - << control_port_.name() << "]"; + DVLOG(1) << "Data pipe consumer " << pipe_id_ + << " notifying peer: " << num_bytes + << " bytes read. [control_port=" << control_port_.name() << "]"; SendDataPipeControlMessage(node_controller_, control_port_, DataPipeCommand::DATA_WAS_READ, num_bytes); @@ -550,7 +552,7 @@ } if (static_cast<size_t>(bytes_available_) + m->num_bytes > - options_.capacity_num_bytes) { + options_.capacity_num_bytes) { DLOG(ERROR) << "Producer claims to have written too many bytes."; peer_closed_ = true; break;
diff --git a/mojo/edk/system/data_pipe_producer_dispatcher.cc b/mojo/edk/system/data_pipe_producer_dispatcher.cc index b40b621..296cc61 100644 --- a/mojo/edk/system/data_pipe_producer_dispatcher.cc +++ b/mojo/edk/system/data_pipe_producer_dispatcher.cc
@@ -38,6 +38,8 @@ uint32_t write_offset; uint32_t available_capacity; uint8_t flags; + uint64_t buffer_guid_high; + uint64_t buffer_guid_low; char padding[7]; }; @@ -135,8 +137,7 @@ DCHECK_LE(write_offset_, options_.capacity_num_bytes); uint32_t tail_bytes_to_write = - std::min(options_.capacity_num_bytes - write_offset_, - num_bytes_to_write); + std::min(options_.capacity_num_bytes - write_offset_, num_bytes_to_write); uint32_t head_bytes_to_write = num_bytes_to_write - tail_bytes_to_write; DCHECK_GT(tail_bytes_to_write, 0u); @@ -146,8 +147,8 @@ DCHECK_LE(num_bytes_to_write, available_capacity_); available_capacity_ -= num_bytes_to_write; - write_offset_ = (write_offset_ + num_bytes_to_write) % - options_.capacity_num_bytes; + write_offset_ = + (write_offset_ + num_bytes_to_write) % options_.capacity_num_bytes; watchers_.NotifyState(GetHandleSignalsStateNoLock()); @@ -213,8 +214,8 @@ } else { DCHECK_LE(num_bytes_written + write_offset_, options_.capacity_num_bytes); available_capacity_ -= num_bytes_written; - write_offset_ = (write_offset_ + num_bytes_written) % - options_.capacity_num_bytes; + write_offset_ = + (write_offset_ + num_bytes_written) % options_.capacity_num_bytes; base::AutoUnlock unlock(lock_); NotifyWrite(num_bytes_written); @@ -277,6 +278,10 @@ state->available_capacity = available_capacity_; state->flags = peer_closed_ ? kFlagPeerClosed : 0; + base::UnguessableToken guid = shared_ring_buffer_->GetGUID(); + state->buffer_guid_high = guid.GetHighForSerialization(); + state->buffer_guid_low = guid.GetLowForSerialization(); + ports[0] = control_port_.name(); buffer_handle_for_transit_ = shared_ring_buffer_->DuplicatePlatformHandle(); @@ -336,12 +341,13 @@ if (node_controller->node()->GetPort(ports[0], &port) != ports::OK) return nullptr; + base::UnguessableToken guid = base::UnguessableToken::Deserialize( + state->buffer_guid_high, state->buffer_guid_low); PlatformHandle buffer_handle; std::swap(buffer_handle, handles[0]); scoped_refptr<PlatformSharedBuffer> ring_buffer = PlatformSharedBuffer::CreateFromPlatformHandle( - state->options.capacity_num_bytes, - false /* read_only */, + state->options.capacity_num_bytes, false /* read_only */, guid, ScopedPlatformHandle(buffer_handle)); if (!ring_buffer) { DLOG(ERROR) << "Failed to deserialize shared buffer handle."; @@ -400,8 +406,7 @@ base::AutoUnlock unlock(lock_); node_controller_->SetPortObserver( - control_port_, - make_scoped_refptr(new PortObserverThunk(this))); + control_port_, make_scoped_refptr(new PortObserverThunk(this))); return true; } @@ -439,9 +444,9 @@ } void DataPipeProducerDispatcher::NotifyWrite(uint32_t num_bytes) { - DVLOG(1) << "Data pipe producer " << pipe_id_ << " notifying peer: " - << num_bytes << " bytes written. [control_port=" - << control_port_.name() << "]"; + DVLOG(1) << "Data pipe producer " << pipe_id_ + << " notifying peer: " << num_bytes + << " bytes written. [control_port=" << control_port_.name() << "]"; SendDataPipeControlMessage(node_controller_, control_port_, DataPipeCommand::DATA_WAS_WRITTEN, num_bytes); @@ -499,14 +504,15 @@ } if (static_cast<size_t>(available_capacity_) + m->num_bytes > - options_.capacity_num_bytes) { + options_.capacity_num_bytes) { DLOG(ERROR) << "Consumer claims to have read too many bytes."; break; } DVLOG(1) << "Data pipe producer " << pipe_id_ << " is aware that " - << m->num_bytes << " bytes were read. [control_port=" - << control_port_.name() << "]"; + << m->num_bytes + << " bytes were read. [control_port=" << control_port_.name() + << "]"; available_capacity_ += m->num_bytes; }
diff --git a/mojo/edk/system/data_pipe_unittest.cc b/mojo/edk/system/data_pipe_unittest.cc index 377b129..f85bf0e 100644 --- a/mojo/edk/system/data_pipe_unittest.cc +++ b/mojo/edk/system/data_pipe_unittest.cc
@@ -47,8 +47,8 @@ class DataPipeTest : public test::MojoTestBase { public: - DataPipeTest() : producer_(MOJO_HANDLE_INVALID), - consumer_(MOJO_HANDLE_INVALID) {} + DataPipeTest() + : producer_(MOJO_HANDLE_INVALID), consumer_(MOJO_HANDLE_INVALID) {} ~DataPipeTest() override { if (producer_ != MOJO_HANDLE_INVALID) @@ -167,8 +167,7 @@ int32_t elements[10] = {}; uint32_t num_bytes = 0; - num_bytes = - static_cast<uint32_t>(arraysize(elements) * sizeof(elements[0])); + num_bytes = static_cast<uint32_t>(arraysize(elements) * sizeof(elements[0])); elements[0] = 123; elements[1] = 456; @@ -213,8 +212,7 @@ }; for (size_t i = 0; i < arraysize(test_options); i++) { MojoHandle producer_handle, consumer_handle; - MojoCreateDataPipeOptions* options = - i ? &test_options[i] : nullptr; + MojoCreateDataPipeOptions* options = i ? &test_options[i] : nullptr; ASSERT_EQ(MOJO_RESULT_OK, MojoCreateDataPipe(options, &producer_handle, &consumer_handle)); ASSERT_EQ(MOJO_RESULT_OK, MojoClose(producer_handle)); @@ -237,8 +235,7 @@ uint32_t num_bytes = 0; // Try reading; nothing there yet. - num_bytes = - static_cast<uint32_t>(arraysize(elements) * sizeof(elements[0])); + num_bytes = static_cast<uint32_t>(arraysize(elements) * sizeof(elements[0])); ASSERT_EQ(MOJO_RESULT_SHOULD_WAIT, ReadData(elements, &num_bytes)); // Query; nothing there yet. @@ -398,20 +395,19 @@ ASSERT_GE(num_bytes, static_cast<uint32_t>(1u * sizeof(elements[0]))); static_cast<int32_t*>(buffer)[0] = 789; - ASSERT_EQ(MOJO_RESULT_OK, EndWriteData(static_cast<uint32_t>( - 1u * sizeof(elements[0])))); + ASSERT_EQ(MOJO_RESULT_OK, + EndWriteData(static_cast<uint32_t>(1u * sizeof(elements[0])))); // Read one element, using a two-phase read. const void* read_buffer = nullptr; num_bytes = 0u; - ASSERT_EQ(MOJO_RESULT_OK, - BeginReadData(&read_buffer, &num_bytes, false)); + ASSERT_EQ(MOJO_RESULT_OK, BeginReadData(&read_buffer, &num_bytes, false)); EXPECT_TRUE(read_buffer); // The two-phase read should be able to read at least one element. ASSERT_GE(num_bytes, static_cast<uint32_t>(1u * sizeof(elements[0]))); ASSERT_EQ(456, static_cast<const int32_t*>(read_buffer)[0]); - ASSERT_EQ(MOJO_RESULT_OK, EndReadData(static_cast<uint32_t>( - 1u * sizeof(elements[0])))); + ASSERT_EQ(MOJO_RESULT_OK, + EndReadData(static_cast<uint32_t>(1u * sizeof(elements[0])))); // Write one element. elements[0] = 123; @@ -1087,8 +1083,8 @@ ASSERT_EQ(MOJO_RESULT_OK, EndReadData(0)); // Read as much as possible. We should read 100 bytes. - num_bytes = static_cast<uint32_t>(arraysize(read_buffer) * - sizeof(read_buffer[0])); + num_bytes = + static_cast<uint32_t>(arraysize(read_buffer) * sizeof(read_buffer[0])); memset(read_buffer, 0, num_bytes); ASSERT_EQ(MOJO_RESULT_OK, ReadData(read_buffer, &num_bytes)); ASSERT_EQ(100u, num_bytes); @@ -1141,8 +1137,7 @@ // Start two-phase read. const void* read_buffer_ptr = nullptr; num_bytes = 0u; - ASSERT_EQ(MOJO_RESULT_OK, - BeginReadData(&read_buffer_ptr, &num_bytes)); + ASSERT_EQ(MOJO_RESULT_OK, BeginReadData(&read_buffer_ptr, &num_bytes)); EXPECT_TRUE(read_buffer_ptr); ASSERT_EQ(2u * kTestDataSize, num_bytes); @@ -1156,13 +1151,11 @@ // And start another. read_buffer_ptr = nullptr; num_bytes = 0u; - ASSERT_EQ(MOJO_RESULT_OK, - BeginReadData(&read_buffer_ptr, &num_bytes)); + ASSERT_EQ(MOJO_RESULT_OK, BeginReadData(&read_buffer_ptr, &num_bytes)); EXPECT_TRUE(read_buffer_ptr); ASSERT_EQ(kTestDataSize, num_bytes); } - // Tests the behavior of interrupting a two-phase read and write by closing the // consumer. TEST_F(DataPipeTest, TwoPhaseWriteReadCloseConsumer) { @@ -1536,15 +1529,13 @@ // Check the data. const void* read_buffer = nullptr; num_bytes = 0u; - ASSERT_EQ(MOJO_RESULT_OK, - BeginReadData(&read_buffer, &num_bytes, false)); + ASSERT_EQ(MOJO_RESULT_OK, BeginReadData(&read_buffer, &num_bytes, false)); ASSERT_EQ(0, memcmp(read_buffer, kTestData, kTestDataSize)); EndReadData(num_bytes); // Now send the producer over a MP so that it's serialized. MojoHandle pipe0, pipe1; - ASSERT_EQ(MOJO_RESULT_OK, - MojoCreateMessagePipe(nullptr, &pipe0, &pipe1)); + ASSERT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &pipe0, &pipe1)); ASSERT_EQ(MOJO_RESULT_OK, WriteMessageRaw(MessagePipeHandle(pipe0), nullptr, 0, &producer_, 1, @@ -1573,8 +1564,7 @@ // Check the second write. num_bytes = 0u; - ASSERT_EQ(MOJO_RESULT_OK, - BeginReadData(&read_buffer, &num_bytes, false)); + ASSERT_EQ(MOJO_RESULT_OK, BeginReadData(&read_buffer, &num_bytes, false)); ASSERT_EQ(0, memcmp(read_buffer, kExtraData, kExtraDataSize)); EndReadData(num_bytes); @@ -1614,8 +1604,7 @@ // Now send the consumer over a MP so that it's serialized. MojoHandle pipe0, pipe1; - ASSERT_EQ(MOJO_RESULT_OK, - MojoCreateMessagePipe(nullptr, &pipe0, &pipe1)); + ASSERT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &pipe0, &pipe1)); ASSERT_EQ(MOJO_RESULT_OK, WriteMessageRaw(MessagePipeHandle(pipe0), nullptr, 0, &consumer_, 1, @@ -1723,7 +1712,7 @@ }; ASSERT_EQ(MOJO_RESULT_OK, Create(&options)); - RUN_CHILD_ON_PIPE(MultiprocessClient, server_mp) + RunTestClient("MultiprocessClient", [&](MojoHandle server_mp) { // Send some data before serialising and sending the data pipe over. // This is the first write so we don't need to use WriteAllData. uint32_t num_bytes = kTestDataSize; @@ -1774,7 +1763,7 @@ WriteMessage(server_mp, "quit"); // Don't have to close the consumer here because it will be done for us. - END_CHILD() + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MultiprocessClient, DataPipeTest, client_mp) { @@ -1874,19 +1863,19 @@ TEST_F(DataPipeTest, SendConsumerAndCloseProducer) { // Create a new data pipe. MojoHandle p, c; - EXPECT_EQ(MOJO_RESULT_OK, MojoCreateDataPipe(nullptr, &p ,&c)); + EXPECT_EQ(MOJO_RESULT_OK, MojoCreateDataPipe(nullptr, &p, &c)); - RUN_CHILD_ON_PIPE(WriteAndCloseProducer, producer_client) - RUN_CHILD_ON_PIPE(ReadAndCloseConsumer, consumer_client) + RunTestClient("WriteAndCloseProducer", [&](MojoHandle producer_client) { + RunTestClient("ReadAndCloseConsumer", [&](MojoHandle consumer_client) { const std::string kMessage = "Hello, world!"; WriteMessageWithHandles(producer_client, kMessage, &p, 1); WriteMessageWithHandles(consumer_client, kMessage, &c, 1); WriteMessage(consumer_client, "quit"); - END_CHILD() + }); WriteMessage(producer_client, "quit"); - END_CHILD() + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(CreateAndWrite, DataPipeTest, h) { @@ -1915,7 +1904,7 @@ } TEST_F(DataPipeTest, CreateInChild) { - RUN_CHILD_ON_PIPE(CreateAndWrite, child) + RunTestClient("CreateAndWrite", [&](MojoHandle child) { MojoHandle c; std::string expected_message = ReadMessageWithHandles(child, &c, 1); @@ -1934,11 +1923,12 @@ EXPECT_EQ(MOJO_RESULT_OK, MojoClose(c)); WriteMessage(child, "quit"); - END_CHILD() + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(DataPipeStatusChangeInTransitClient, - DataPipeTest, parent) { + DataPipeTest, + parent) { // This test verifies that peer closure is detectable through various // mechanisms when it races with handle transfer. @@ -1962,7 +1952,7 @@ base::RunLoop run_loop; int count = 0; auto callback = base::Bind( - [] (base::RunLoop* loop, int* count, MojoResult result) { + [](base::RunLoop* loop, int* count, MojoResult result) { EXPECT_EQ(MOJO_RESULT_OK, result); if (++*count == 2) loop->Quit(); @@ -1984,8 +1974,8 @@ MojoResult result; do { uint32_t num_bytes = 0; - result = MojoWriteData( - producers[2], nullptr, &num_bytes, MOJO_WRITE_DATA_FLAG_NONE); + result = MojoWriteData(producers[2], nullptr, &num_bytes, + MOJO_WRITE_DATA_FLAG_NONE); } while (result == MOJO_RESULT_OK); EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result); @@ -1993,8 +1983,8 @@ do { char byte; uint32_t num_bytes = 1; - result = MojoReadData( - consumers[2], &byte, &num_bytes, MOJO_READ_DATA_FLAG_NONE); + result = + MojoReadData(consumers[2], &byte, &num_bytes, MOJO_READ_DATA_FLAG_NONE); } while (result == MOJO_RESULT_SHOULD_WAIT); EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result); @@ -2008,9 +1998,9 @@ for (size_t i = 0; i < 6; ++i) CreateDataPipe(&producers[i], &consumers[i], 1); - RUN_CHILD_ON_PIPE(DataPipeStatusChangeInTransitClient, child) - MojoHandle handles[] = { producers[0], producers[1], producers[2], - consumers[3], consumers[4], consumers[5] }; + RunTestClient("DataPipeStatusChangeInTransitClient", [&](MojoHandle child) { + MojoHandle handles[] = {producers[0], producers[1], producers[2], + consumers[3], consumers[4], consumers[5]}; // Send 3 producers and 3 consumers, and let their transfer race with their // peers' closure. @@ -2020,7 +2010,7 @@ CloseHandle(consumers[i]); for (size_t i = 3; i < 6; ++i) CloseHandle(producers[i]); - END_CHILD() + }); } #endif // !defined(OS_IOS)
diff --git a/mojo/edk/system/message_pipe_perftest.cc b/mojo/edk/system/message_pipe_perftest.cc index 73e788c..70c0092 100644 --- a/mojo/edk/system/message_pipe_perftest.cc +++ b/mojo/edk/system/message_pipe_perftest.cc
@@ -154,9 +154,7 @@ // Waits for the child to close its end before quitting once specified // number of messages has been sent. TEST_F(MessagePipePerfTest, MultiprocessPingPong) { - RUN_CHILD_ON_PIPE(PingPongClient, h) - RunPingPongServer(h); - END_CHILD() + RunTestClient("PingPongClient", [&](MojoHandle h) { RunPingPongServer(h); }); } } // namespace
diff --git a/mojo/edk/system/message_pipe_unittest.cc b/mojo/edk/system/message_pipe_unittest.cc index c662da4c..ada2f57 100644 --- a/mojo/edk/system/message_pipe_unittest.cc +++ b/mojo/edk/system/message_pipe_unittest.cc
@@ -343,13 +343,13 @@ MojoClose(p); } - RUN_CHILD_ON_PIPE(HandlePingPong, h) + RunTestClient("HandlePingPong", [&](MojoHandle h) { for (size_t i = 0; i < kPingPongIterations; i++) { WriteMessageWithHandles(h, "", c, kPingPongHandlesPerIteration); ReadMessageWithHandles(h, c, kPingPongHandlesPerIteration); } WriteMessage(h, "quit", 4); - END_CHILD() + }); for (size_t i = 0; i < kPingPongHandlesPerIteration; ++i) MojoClose(c[i]); } @@ -362,29 +362,29 @@ MojoClose(c); } - RUN_CHILD_ON_PIPE(HandlePingPong, h) + RunTestClient("HandlePingPong", [&](MojoHandle h) { for (size_t i = 0; i < kPingPongIterations; i++) { WriteMessageWithHandles(h, "", p, kPingPongHandlesPerIteration); ReadMessageWithHandles(h, p, kPingPongHandlesPerIteration); } WriteMessage(h, "quit", 4); - END_CHILD() + }); for (size_t i = 0; i < kPingPongHandlesPerIteration; ++i) MojoClose(p[i]); } TEST_F(MessagePipeTest, SharedBufferHandlePingPong) { MojoHandle buffers[kPingPongHandlesPerIteration]; - for (size_t i = 0; i <kPingPongHandlesPerIteration; ++i) + for (size_t i = 0; i < kPingPongHandlesPerIteration; ++i) EXPECT_EQ(MOJO_RESULT_OK, MojoCreateSharedBuffer(nullptr, 1, &buffers[i])); - RUN_CHILD_ON_PIPE(HandlePingPong, h) + RunTestClient("HandlePingPong", [&](MojoHandle h) { for (size_t i = 0; i < kPingPongIterations; i++) { WriteMessageWithHandles(h, "", buffers, kPingPongHandlesPerIteration); ReadMessageWithHandles(h, buffers, kPingPongHandlesPerIteration); } WriteMessage(h, "quit", 4); - END_CHILD() + }); for (size_t i = 0; i < kPingPongHandlesPerIteration; ++i) MojoClose(buffers[i]); }
diff --git a/mojo/edk/system/message_unittest.cc b/mojo/edk/system/message_unittest.cc index e3aa8d9..07f402e 100644 --- a/mojo/edk/system/message_unittest.cc +++ b/mojo/edk/system/message_unittest.cc
@@ -213,11 +213,11 @@ } TEST_F(MessageTest, SerializeSimpleMessageNoHandlesWithContext) { - RUN_CHILD_ON_PIPE(ReceiveMessageNoHandles, h) - auto message = base::MakeUnique<SimpleMessage>(kTestMessageWithContext1); - MojoWriteMessage(h, TestMessageBase::MakeMessageHandle(std::move(message)), - MOJO_WRITE_MESSAGE_FLAG_NONE); - END_CHILD() + RunTestClient("ReceiveMessageNoHandles", [&](MojoHandle h) { + auto message = base::MakeUnique<SimpleMessage>(kTestMessageWithContext1); + MojoWriteMessage(h, TestMessageBase::MakeMessageHandle(std::move(message)), + MOJO_WRITE_MESSAGE_FLAG_NONE); + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReceiveMessageOneHandle, MessageTest, h) { @@ -229,15 +229,15 @@ } TEST_F(MessageTest, SerializeSimpleMessageOneHandleWithContext) { - RUN_CHILD_ON_PIPE(ReceiveMessageOneHandle, h) - auto message = base::MakeUnique<SimpleMessage>(kTestMessageWithContext1); - mojo::MessagePipe pipe; - message->AddMessagePipe(std::move(pipe.handle0)); - MojoWriteMessage(h, TestMessageBase::MakeMessageHandle(std::move(message)), - MOJO_WRITE_MESSAGE_FLAG_NONE); - EXPECT_EQ(kTestMessageWithContext2, - MojoTestBase::ReadMessage(pipe.handle1.get().value())); - END_CHILD() + RunTestClient("ReceiveMessageOneHandle", [&](MojoHandle h) { + auto message = base::MakeUnique<SimpleMessage>(kTestMessageWithContext1); + mojo::MessagePipe pipe; + message->AddMessagePipe(std::move(pipe.handle0)); + MojoWriteMessage(h, TestMessageBase::MakeMessageHandle(std::move(message)), + MOJO_WRITE_MESSAGE_FLAG_NONE); + EXPECT_EQ(kTestMessageWithContext2, + MojoTestBase::ReadMessage(pipe.handle1.get().value())); + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReceiveMessageWithHandles, MessageTest, h) { @@ -252,24 +252,24 @@ } TEST_F(MessageTest, SerializeSimpleMessageWithHandlesWithContext) { - RUN_CHILD_ON_PIPE(ReceiveMessageWithHandles, h) - auto message = base::MakeUnique<SimpleMessage>(kTestMessageWithContext1); - mojo::MessagePipe pipes[4]; - message->AddMessagePipe(std::move(pipes[0].handle0)); - message->AddMessagePipe(std::move(pipes[1].handle0)); - message->AddMessagePipe(std::move(pipes[2].handle0)); - message->AddMessagePipe(std::move(pipes[3].handle0)); - MojoWriteMessage(h, TestMessageBase::MakeMessageHandle(std::move(message)), - MOJO_WRITE_MESSAGE_FLAG_NONE); - EXPECT_EQ(kTestMessageWithContext1, - MojoTestBase::ReadMessage(pipes[0].handle1.get().value())); - EXPECT_EQ(kTestMessageWithContext2, - MojoTestBase::ReadMessage(pipes[1].handle1.get().value())); - EXPECT_EQ(kTestMessageWithContext3, - MojoTestBase::ReadMessage(pipes[2].handle1.get().value())); - EXPECT_EQ(kTestMessageWithContext4, - MojoTestBase::ReadMessage(pipes[3].handle1.get().value())); - END_CHILD() + RunTestClient("ReceiveMessageWithHandles", [&](MojoHandle h) { + auto message = base::MakeUnique<SimpleMessage>(kTestMessageWithContext1); + mojo::MessagePipe pipes[4]; + message->AddMessagePipe(std::move(pipes[0].handle0)); + message->AddMessagePipe(std::move(pipes[1].handle0)); + message->AddMessagePipe(std::move(pipes[2].handle0)); + message->AddMessagePipe(std::move(pipes[3].handle0)); + MojoWriteMessage(h, TestMessageBase::MakeMessageHandle(std::move(message)), + MOJO_WRITE_MESSAGE_FLAG_NONE); + EXPECT_EQ(kTestMessageWithContext1, + MojoTestBase::ReadMessage(pipes[0].handle1.get().value())); + EXPECT_EQ(kTestMessageWithContext2, + MojoTestBase::ReadMessage(pipes[1].handle1.get().value())); + EXPECT_EQ(kTestMessageWithContext3, + MojoTestBase::ReadMessage(pipes[2].handle1.get().value())); + EXPECT_EQ(kTestMessageWithContext4, + MojoTestBase::ReadMessage(pipes[3].handle1.get().value())); + }); } #endif // !defined(OS_IOS)
diff --git a/mojo/edk/system/multiprocess_message_pipe_unittest.cc b/mojo/edk/system/multiprocess_message_pipe_unittest.cc index b2e20f5..15ea7a1 100644 --- a/mojo/edk/system/multiprocess_message_pipe_unittest.cc +++ b/mojo/edk/system/multiprocess_message_pipe_unittest.cc
@@ -151,9 +151,8 @@ std::string read_buffer(1000, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(h, &read_buffer[0], - &read_buffer_size, nullptr, - 0, MOJO_READ_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoReadMessage(h, &read_buffer[0], &read_buffer_size, nullptr, 0, + MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); VLOG(2) << "Child got: " << read_buffer; @@ -174,12 +173,12 @@ } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, Basic) { - RUN_CHILD_ON_PIPE(EchoEcho, h) + int exit_code = RunTestClientAndGetExitCode("EchoEcho", [&](MojoHandle h) { std::string hello("hello"); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, hello.data(), - static_cast<uint32_t>(hello.size()), nullptr, 0u, - MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ( + MOJO_RESULT_OK, + MojoWriteMessage(h, hello.data(), static_cast<uint32_t>(hello.size()), + nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE)); HandleSignalsState hss; ASSERT_EQ(MOJO_RESULT_OK, @@ -192,8 +191,7 @@ std::string read_buffer(1000, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(h, &read_buffer[0], - &read_buffer_size, nullptr, 0, + CHECK_EQ(MojoReadMessage(h, &read_buffer[0], &read_buffer_size, nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); @@ -205,18 +203,19 @@ static_cast<uint32_t>(quitquitquit.size()), nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); - END_CHILD_AND_EXPECT_EXIT_CODE(1 % 100); + }); + EXPECT_EQ(1, exit_code); } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, QueueMessages) { static const size_t kNumMessages = 1001; - RUN_CHILD_ON_PIPE(EchoEcho, h) + int exit_code = RunTestClientAndGetExitCode("EchoEcho", [&](MojoHandle h) { for (size_t i = 0; i < kNumMessages; i++) { std::string write_buffer(i, 'A' + (i % 26)); ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, write_buffer.data(), - static_cast<uint32_t>(write_buffer.size()), - nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE)); + MojoWriteMessage(h, write_buffer.data(), + static_cast<uint32_t>(write_buffer.size()), + nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE)); } for (size_t i = 0; i < kNumMessages; i++) { @@ -231,10 +230,9 @@ std::string read_buffer(kNumMessages * 2, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - ASSERT_EQ(MojoReadMessage(h, &read_buffer[0], - &read_buffer_size, nullptr, 0, - MOJO_READ_MESSAGE_FLAG_NONE), - MOJO_RESULT_OK); + ASSERT_EQ(MojoReadMessage(h, &read_buffer[0], &read_buffer_size, nullptr, + 0, MOJO_READ_MESSAGE_FLAG_NONE), + MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); ASSERT_EQ(std::string(i * 2, 'A' + (i % 26)), read_buffer); @@ -253,10 +251,12 @@ WaitForSignals(h, MOJO_HANDLE_SIGNAL_READABLE, &hss)); ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, hss.satisfied_signals); ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, hss.satisfiable_signals); - END_CHILD_AND_EXPECT_EXIT_CODE(static_cast<int>(kNumMessages % 100)); + }); + EXPECT_EQ(static_cast<int>(kNumMessages % 100), exit_code); } -DEFINE_TEST_CLIENT_WITH_PIPE(CheckSharedBuffer, MultiprocessMessagePipeTest, +DEFINE_TEST_CLIENT_WITH_PIPE(CheckSharedBuffer, + MultiprocessMessagePipeTest, h) { // Wait for the first message from our parent. HandleSignalsState hss; @@ -267,16 +267,15 @@ CHECK_EQ(hss.satisfied_signals, MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE); CHECK_EQ(hss.satisfiable_signals, MOJO_HANDLE_SIGNAL_READABLE | - MOJO_HANDLE_SIGNAL_WRITABLE | - MOJO_HANDLE_SIGNAL_PEER_CLOSED); + MOJO_HANDLE_SIGNAL_WRITABLE | + MOJO_HANDLE_SIGNAL_PEER_CLOSED); // It should have a shared buffer. std::string read_buffer(100, '\0'); uint32_t num_bytes = static_cast<uint32_t>(read_buffer.size()); MojoHandle handles[10]; uint32_t num_handlers = arraysize(handles); // Maximum number to receive - CHECK_EQ(MojoReadMessage(h, &read_buffer[0], - &num_bytes, &handles[0], + CHECK_EQ(MojoReadMessage(h, &read_buffer[0], &num_bytes, &handles[0], &num_handlers, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(num_bytes); @@ -298,9 +297,8 @@ // And send a message to signal that we've written stuff. const std::string go2("go 2"); - CHECK_EQ(MojoWriteMessage(h, go2.data(), - static_cast<uint32_t>(go2.size()), nullptr, 0u, - MOJO_WRITE_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoWriteMessage(h, go2.data(), static_cast<uint32_t>(go2.size()), + nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); // Now wait for our parent to send us a message. @@ -315,8 +313,8 @@ read_buffer = std::string(100, '\0'); num_bytes = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(h, &read_buffer[0], &num_bytes, - nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoReadMessage(h, &read_buffer[0], &num_bytes, nullptr, 0, + MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(num_bytes); CHECK_EQ(read_buffer, std::string("go 3")); @@ -331,7 +329,7 @@ } TEST_F(MultiprocessMessagePipeTest, SharedBufferPassing) { - RUN_CHILD_ON_PIPE(CheckSharedBuffer, h) + RunTestClient("CheckSharedBuffer", [&](MojoHandle h) { // Make a shared buffer. MojoCreateSharedBufferOptions options; options.struct_size = sizeof(options); @@ -346,16 +344,13 @@ MojoHandle duplicated_shared_buffer; ASSERT_EQ(MOJO_RESULT_OK, - MojoDuplicateBufferHandle( - shared_buffer, - nullptr, - &duplicated_shared_buffer)); + MojoDuplicateBufferHandle(shared_buffer, nullptr, + &duplicated_shared_buffer)); MojoHandle handles[1]; handles[0] = duplicated_shared_buffer; ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, &go1[0], - static_cast<uint32_t>(go1.size()), &handles[0], - arraysize(handles), + MojoWriteMessage(h, &go1[0], static_cast<uint32_t>(go1.size()), + &handles[0], arraysize(handles), MOJO_WRITE_MESSAGE_FLAG_NONE)); // Wait for a message from the child. @@ -368,8 +363,7 @@ std::string read_buffer(100, '\0'); uint32_t num_bytes = static_cast<uint32_t>(read_buffer.size()); ASSERT_EQ(MOJO_RESULT_OK, - MojoReadMessage(h, &read_buffer[0], - &num_bytes, nullptr, 0, + MojoReadMessage(h, &read_buffer[0], &num_bytes, nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE)); read_buffer.resize(num_bytes); ASSERT_EQ(std::string("go 2"), read_buffer); @@ -390,9 +384,8 @@ // And send a message to signal that we've written stuff. const std::string go3("go 3"); ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, &go3[0], - static_cast<uint32_t>(go3.size()), nullptr, 0u, - MOJO_WRITE_MESSAGE_FLAG_NONE)); + MojoWriteMessage(h, &go3[0], static_cast<uint32_t>(go3.size()), + nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE)); // Wait for |h| to become readable, which should fail. hss = HandleSignalsState(); @@ -400,11 +393,12 @@ WaitForSignals(h, MOJO_HANDLE_SIGNAL_READABLE, &hss)); ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, hss.satisfied_signals); ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, hss.satisfiable_signals); - END_CHILD() + }); } DEFINE_TEST_CLIENT_WITH_PIPE(CheckPlatformHandleFile, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { HandleSignalsState hss; CHECK_EQ(WaitForSignals(h, MOJO_HANDLE_SIGNAL_READABLE, &hss), MOJO_RESULT_OK); @@ -419,8 +413,7 @@ MojoHandle handles[255]; // Maximum number to receive. uint32_t num_handlers = arraysize(handles); - CHECK_EQ(MojoReadMessage(h, &read_buffer[0], - &num_bytes, &handles[0], + CHECK_EQ(MojoReadMessage(h, &read_buffer[0], &num_bytes, &handles[0], &num_handlers, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); @@ -457,7 +450,7 @@ base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - RUN_CHILD_ON_PIPE(CheckPlatformHandleFile, h) + RunTestClient("CheckPlatformHandleFile", [&](MojoHandle h) { std::vector<MojoHandle> handles; size_t pipe_count = GetParam(); @@ -481,12 +474,11 @@ char message[128]; snprintf(message, sizeof(message), "hello %d", static_cast<int>(pipe_count)); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, message, - static_cast<uint32_t>(strlen(message)), - &handles[0], - static_cast<uint32_t>(handles.size()), - MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ( + MOJO_RESULT_OK, + MojoWriteMessage(h, message, static_cast<uint32_t>(strlen(message)), + &handles[0], static_cast<uint32_t>(handles.size()), + MOJO_WRITE_MESSAGE_FLAG_NONE)); // Wait for it to become readable, which should fail. HandleSignalsState hss; @@ -494,7 +486,7 @@ WaitForSignals(h, MOJO_HANDLE_SIGNAL_READABLE, &hss)); ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, hss.satisfied_signals); ASSERT_EQ(MOJO_HANDLE_SIGNAL_PEER_CLOSED, hss.satisfiable_signals); - END_CHILD() + }); } // Android multi-process tests are not executing the new process. This is flaky. @@ -516,15 +508,14 @@ CHECK_EQ(hss.satisfied_signals, MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE); CHECK_EQ(hss.satisfiable_signals, MOJO_HANDLE_SIGNAL_READABLE | - MOJO_HANDLE_SIGNAL_WRITABLE | - MOJO_HANDLE_SIGNAL_PEER_CLOSED); + MOJO_HANDLE_SIGNAL_WRITABLE | + MOJO_HANDLE_SIGNAL_PEER_CLOSED); // It should have a message pipe. MojoHandle handles[10]; uint32_t num_handlers = arraysize(handles); - CHECK_EQ(MojoReadMessage(h, nullptr, - nullptr, &handles[0], - &num_handlers, MOJO_READ_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoReadMessage(h, nullptr, nullptr, &handles[0], &num_handlers, + MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); CHECK_EQ(num_handlers, 1u); @@ -534,14 +525,13 @@ CHECK_EQ(hss.satisfied_signals, MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE); CHECK_EQ(hss.satisfiable_signals, MOJO_HANDLE_SIGNAL_READABLE | - MOJO_HANDLE_SIGNAL_WRITABLE | - MOJO_HANDLE_SIGNAL_PEER_CLOSED); + MOJO_HANDLE_SIGNAL_WRITABLE | + MOJO_HANDLE_SIGNAL_PEER_CLOSED); std::string read_buffer(100, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(handles[0], &read_buffer[0], - &read_buffer_size, nullptr, - 0, MOJO_READ_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoReadMessage(handles[0], &read_buffer[0], &read_buffer_size, + nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); CHECK_EQ(read_buffer, std::string("hello")); @@ -557,25 +547,23 @@ } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, MessagePipePassing) { - RUN_CHILD_ON_PIPE(CheckMessagePipe, h) + RunTestClient("CheckMessagePipe", [&](MojoHandle h) { MojoCreateSharedBufferOptions options; options.struct_size = sizeof(options); options.flags = MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE; MojoHandle mp1, mp2; - ASSERT_EQ(MOJO_RESULT_OK, - MojoCreateMessagePipe(nullptr, &mp1, &mp2)); + ASSERT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &mp1, &mp2)); // Write a string into one end of the new message pipe and send the other // end. const std::string hello("hello"); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(mp1, &hello[0], - static_cast<uint32_t>(hello.size()), nullptr, 0, - MOJO_WRITE_MESSAGE_FLAG_NONE)); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, nullptr, 0, &mp2, 1, - MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ( + MOJO_RESULT_OK, + MojoWriteMessage(mp1, &hello[0], static_cast<uint32_t>(hello.size()), + nullptr, 0, MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ(MOJO_RESULT_OK, MojoWriteMessage(h, nullptr, 0, &mp2, 1, + MOJO_WRITE_MESSAGE_FLAG_NONE)); // Wait for a message from the child. HandleSignalsState hss; @@ -586,33 +574,30 @@ std::string read_buffer(100, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(mp1, &read_buffer[0], - &read_buffer_size, nullptr, + CHECK_EQ(MojoReadMessage(mp1, &read_buffer[0], &read_buffer_size, nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); CHECK_EQ(read_buffer, std::string("world")); MojoClose(mp1); - END_CHILD() + }); } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, MessagePipeTwoPassing) { - RUN_CHILD_ON_PIPE(CheckMessagePipe, h) + RunTestClient("CheckMessagePipe", [&](MojoHandle h) { MojoHandle mp1, mp2; - ASSERT_EQ(MOJO_RESULT_OK, - MojoCreateMessagePipe(nullptr, &mp2, &mp1)); + ASSERT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &mp2, &mp1)); // Write a string into one end of the new message pipe and send the other // end. const std::string hello("hello"); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(mp1, &hello[0], - static_cast<uint32_t>(hello.size()), nullptr, 0u, - MOJO_WRITE_MESSAGE_FLAG_NONE)); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, nullptr, 0u, &mp2, 1u, - MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ( + MOJO_RESULT_OK, + MojoWriteMessage(mp1, &hello[0], static_cast<uint32_t>(hello.size()), + nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ(MOJO_RESULT_OK, MojoWriteMessage(h, nullptr, 0u, &mp2, 1u, + MOJO_WRITE_MESSAGE_FLAG_NONE)); // Wait for a message from the child. HandleSignalsState hss; @@ -623,13 +608,12 @@ std::string read_buffer(100, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(mp1, &read_buffer[0], - &read_buffer_size, nullptr, + CHECK_EQ(MojoReadMessage(mp1, &read_buffer[0], &read_buffer_size, nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); CHECK_EQ(read_buffer, std::string("world")); - END_CHILD(); + }); } DEFINE_TEST_CLIENT_WITH_PIPE(DataPipeConsumer, MultiprocessMessagePipeTest, h) { @@ -642,15 +626,14 @@ CHECK_EQ(hss.satisfied_signals, MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE); CHECK_EQ(hss.satisfiable_signals, MOJO_HANDLE_SIGNAL_READABLE | - MOJO_HANDLE_SIGNAL_WRITABLE | - MOJO_HANDLE_SIGNAL_PEER_CLOSED); + MOJO_HANDLE_SIGNAL_WRITABLE | + MOJO_HANDLE_SIGNAL_PEER_CLOSED); // It should have a message pipe. MojoHandle handles[10]; uint32_t num_handlers = arraysize(handles); - CHECK_EQ(MojoReadMessage(h, nullptr, - nullptr, &handles[0], - &num_handlers, MOJO_READ_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoReadMessage(h, nullptr, nullptr, &handles[0], &num_handlers, + MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); CHECK_EQ(num_handlers, 1u); @@ -660,14 +643,13 @@ CHECK_EQ(hss.satisfied_signals, MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE); CHECK_EQ(hss.satisfiable_signals, MOJO_HANDLE_SIGNAL_READABLE | - MOJO_HANDLE_SIGNAL_WRITABLE | - MOJO_HANDLE_SIGNAL_PEER_CLOSED); + MOJO_HANDLE_SIGNAL_WRITABLE | + MOJO_HANDLE_SIGNAL_PEER_CLOSED); std::string read_buffer(100, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(handles[0], &read_buffer[0], - &read_buffer_size, nullptr, - 0, MOJO_READ_MESSAGE_FLAG_NONE), + CHECK_EQ(MojoReadMessage(handles[0], &read_buffer[0], &read_buffer_size, + nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); CHECK_EQ(read_buffer, std::string("hello")); @@ -675,33 +657,31 @@ // Now write some data into the message pipe. std::string write_buffer = "world"; CHECK_EQ(MojoWriteMessage(handles[0], write_buffer.data(), - static_cast<uint32_t>(write_buffer.size()), - nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE), - MOJO_RESULT_OK); + static_cast<uint32_t>(write_buffer.size()), nullptr, + 0u, MOJO_WRITE_MESSAGE_FLAG_NONE), + MOJO_RESULT_OK); MojoClose(handles[0]); return 0; } TEST_F(MultiprocessMessagePipeTest, DataPipeConsumer) { - RUN_CHILD_ON_PIPE(DataPipeConsumer, h) + RunTestClient("DataPipeConsumer", [&](MojoHandle h) { MojoCreateSharedBufferOptions options; options.struct_size = sizeof(options); options.flags = MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE; MojoHandle mp1, mp2; - ASSERT_EQ(MOJO_RESULT_OK, - MojoCreateMessagePipe(nullptr, &mp2, &mp1)); + ASSERT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &mp2, &mp1)); // Write a string into one end of the new message pipe and send the other // end. const std::string hello("hello"); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(mp1, &hello[0], - static_cast<uint32_t>(hello.size()), nullptr, 0u, - MOJO_WRITE_MESSAGE_FLAG_NONE)); - ASSERT_EQ(MOJO_RESULT_OK, - MojoWriteMessage(h, nullptr, 0, &mp2, 1u, - MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ( + MOJO_RESULT_OK, + MojoWriteMessage(mp1, &hello[0], static_cast<uint32_t>(hello.size()), + nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE)); + ASSERT_EQ(MOJO_RESULT_OK, MojoWriteMessage(h, nullptr, 0, &mp2, 1u, + MOJO_WRITE_MESSAGE_FLAG_NONE)); // Wait for a message from the child. HandleSignalsState hss; @@ -712,15 +692,14 @@ std::string read_buffer(100, '\0'); uint32_t read_buffer_size = static_cast<uint32_t>(read_buffer.size()); - CHECK_EQ(MojoReadMessage(mp1, &read_buffer[0], - &read_buffer_size, nullptr, + CHECK_EQ(MojoReadMessage(mp1, &read_buffer[0], &read_buffer_size, nullptr, 0, MOJO_READ_MESSAGE_FLAG_NONE), MOJO_RESULT_OK); read_buffer.resize(read_buffer_size); CHECK_EQ(read_buffer, std::string("world")); MojoClose(mp1); - END_CHILD(); + }); } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, CreateMessagePipe) { @@ -762,7 +741,8 @@ } // Echos the primordial channel until "exit". -DEFINE_TEST_CLIENT_WITH_PIPE(ChannelEchoClient, MultiprocessMessagePipeTest, +DEFINE_TEST_CLIENT_WITH_PIPE(ChannelEchoClient, + MultiprocessMessagePipeTest, h) { for (;;) { std::string message = ReadMessage(h); @@ -774,18 +754,19 @@ } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, MultiprocessChannelPipe) { - RUN_CHILD_ON_PIPE(ChannelEchoClient, h) + RunTestClient("ChannelEchoClient", [&](MojoHandle h) { VerifyEcho(h, "in an interstellar burst"); VerifyEcho(h, "i am back to save the universe"); VerifyEcho(h, std::string(10 * 1024 * 1024, 'o')); WriteMessage(h, "exit"); - END_CHILD() + }); } // Receives a pipe handle from the primordial channel and echos on it until // "exit". Used to test simple pipe transfer across processes via channels. -DEFINE_TEST_CLIENT_WITH_PIPE(EchoServiceClient, MultiprocessMessagePipeTest, +DEFINE_TEST_CLIENT_WITH_PIPE(EchoServiceClient, + MultiprocessMessagePipeTest, h) { MojoHandle p; ReadMessageWithHandles(h, &p, 1); @@ -802,8 +783,7 @@ PassMessagePipeCrossProcess) { MojoHandle p0, p1; CreateMessagePipe(&p0, &p1); - RUN_CHILD_ON_PIPE(EchoServiceClient, h) - + RunTestClient("EchoServiceClient", [&](MojoHandle h) { // Pass one end of the pipe to the other process. WriteMessageWithHandles(h, "here take this", &p1, 1); @@ -812,14 +792,15 @@ VerifyEcho(p0, std::string(20 * 1024 * 1024, 'i')); WriteMessage(p0, "exit"); - END_CHILD() + }); CloseHandle(p0); } // Receives a pipe handle from the primordial channel and reads new handles // from it. Each read handle establishes a new echo channel. DEFINE_TEST_CLIENT_WITH_PIPE(EchoServiceFactoryClient, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { MojoHandle p; ReadMessageWithHandles(h, &p, 1); @@ -869,14 +850,14 @@ MojoHandle echo_proxy_c, echo_request_c; CreateMessagePipe(&echo_proxy_c, &echo_request_c); - RUN_CHILD_ON_PIPE(EchoServiceFactoryClient, h) - WriteMessageWithHandles( - h, "gief factory naow plz", &echo_factory_request, 1); + RunTestClient("EchoServiceFactoryClient", [&](MojoHandle h) { + WriteMessageWithHandles(h, "gief factory naow plz", &echo_factory_request, + 1); WriteMessageWithHandles(echo_factory_proxy, "give me an echo service plz!", - &echo_request_a, 1); + &echo_request_a, 1); WriteMessageWithHandles(echo_factory_proxy, "give me one too!", - &echo_request_b, 1); + &echo_request_b, 1); VerifyEcho(echo_proxy_a, "i came here for an argument"); VerifyEcho(echo_proxy_a, "shut your festering gob"); @@ -886,14 +867,14 @@ VerifyEcho(echo_proxy_b, "wubalubadubdub"); WriteMessageWithHandles(echo_factory_proxy, "hook me up also thanks", - &echo_request_c, 1); + &echo_request_c, 1); VerifyEcho(echo_proxy_a, "the frobinators taste like frobinators"); VerifyEcho(echo_proxy_b, "beep bop boop"); VerifyEcho(echo_proxy_c, "zzzzzzzzzzzzzzzzzzzzzzzzzz"); WriteMessage(h, "exit"); - END_CHILD() + }); CloseHandle(echo_factory_proxy); CloseHandle(echo_proxy_a); @@ -903,21 +884,22 @@ TEST_P(MultiprocessMessagePipeTestWithPeerSupport, ChannelPipesWithMultipleChildren) { - RUN_CHILD_ON_PIPE(ChannelEchoClient, a) - RUN_CHILD_ON_PIPE(ChannelEchoClient, b) + RunTestClient("ChannelEchoClient", [&](MojoHandle a) { + RunTestClient("ChannelEchoClient", [&](MojoHandle b) { VerifyEcho(a, "hello child 0"); VerifyEcho(b, "hello child 1"); WriteMessage(a, "exit"); WriteMessage(b, "exit"); - END_CHILD() - END_CHILD() + }); + }); } // Reads and turns a pipe handle some number of times to create lots of // transient proxies. DEFINE_TEST_CLIENT_TEST_WITH_PIPE(PingPongPipeClient, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { const size_t kNumBounces = 50; MojoHandle p0, p1; ReadMessageWithHandles(h, &p0, 1); @@ -936,7 +918,7 @@ MojoHandle p0, p1; CreateMessagePipe(&p0, &p1); - RUN_CHILD_ON_PIPE(PingPongPipeClient, h) + RunTestClient("PingPongPipeClient", [&](MojoHandle h) { const size_t kNumBounces = 50; WriteMessageWithHandles(h, "", &p0, 1); WriteMessageWithHandles(h, "", &p1, 1); @@ -946,7 +928,7 @@ } ReadMessageWithHandles(h, &p0, 1); WriteMessage(h, "quit"); - END_CHILD() + }); EXPECT_EQ("bye", ReadMessage(p0)); @@ -955,7 +937,8 @@ } // Parses commands from the parent pipe and does whatever it's asked to do. -DEFINE_TEST_CLIENT_WITH_PIPE(CommandDrivenClient, MultiprocessMessagePipeTest, +DEFINE_TEST_CLIENT_WITH_PIPE(CommandDrivenClient, + MultiprocessMessagePipeTest, h) { base::hash_map<std::string, MojoHandle> named_pipes; for (;;) { @@ -1030,8 +1013,8 @@ } TEST_F(MultiprocessMessagePipeTest, ChildToChildPipes) { - RUN_CHILD_ON_PIPE(CommandDrivenClient, h0) - RUN_CHILD_ON_PIPE(CommandDrivenClient, h1) + RunTestClient("CommandDrivenClient", [&](MojoHandle h0) { + RunTestClient("CommandDrivenClient", [&](MojoHandle h1) { CommandDrivenClientController a(h0); CommandDrivenClientController b(h1); @@ -1050,15 +1033,15 @@ a.Exit(); b.Exit(); - END_CHILD() - END_CHILD() + }); + }); } TEST_F(MultiprocessMessagePipeTest, MoreChildToChildPipes) { - RUN_CHILD_ON_PIPE(CommandDrivenClient, h0) - RUN_CHILD_ON_PIPE(CommandDrivenClient, h1) - RUN_CHILD_ON_PIPE(CommandDrivenClient, h2) - RUN_CHILD_ON_PIPE(CommandDrivenClient, h3) + RunTestClient("CommandDrivenClient", [&](MojoHandle h0) { + RunTestClient("CommandDrivenClient", [&](MojoHandle h1) { + RunTestClient("CommandDrivenClient", [&](MojoHandle h2) { + RunTestClient("CommandDrivenClient", [&](MojoHandle h3) { CommandDrivenClientController a(h0), b(h1), c(h2), d(h3); // Connect a to b and c to d @@ -1125,32 +1108,34 @@ b.Exit(); c.Exit(); d.Exit(); - END_CHILD() - END_CHILD() - END_CHILD() - END_CHILD() + }); + }); + }); + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReceivePipeWithClosedPeer, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { MojoHandle p; EXPECT_EQ("foo", ReadMessageWithHandles(h, &p, 1)); EXPECT_EQ(MOJO_RESULT_OK, WaitForSignals(p, MOJO_HANDLE_SIGNAL_PEER_CLOSED)); } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, SendPipeThenClosePeer) { - RUN_CHILD_ON_PIPE(ReceivePipeWithClosedPeer, h) + RunTestClient("ReceivePipeWithClosedPeer", [&](MojoHandle h) { MojoHandle a, b; CreateMessagePipe(&a, &b); // Send |a| and immediately close |b|. The child should observe closure. WriteMessageWithHandles(h, "foo", &a, 1); MojoClose(b); - END_CHILD() + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(SendOtherChildPipeWithClosedPeer, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { // Create a new pipe and send one end to the parent, who will connect it to // a client running ReceivePipeWithClosedPeerFromOtherChild. MojoHandle application_proxy, application_request; @@ -1170,7 +1155,8 @@ } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReceivePipeWithClosedPeerFromOtherChild, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { // Receive a pipe from the parent. This is akin to an "application request". MojoHandle application_client; EXPECT_EQ("c2a", ReadMessageWithHandles(h, &application_client, 1)); @@ -1191,26 +1177,27 @@ #if defined(OS_ANDROID) // Android multi-process tests are not executing the new process. This is flaky. #define MAYBE_SendPipeWithClosedPeerBetweenChildren \ - DISABLED_SendPipeWithClosedPeerBetweenChildren + DISABLED_SendPipeWithClosedPeerBetweenChildren #else #define MAYBE_SendPipeWithClosedPeerBetweenChildren \ - SendPipeWithClosedPeerBetweenChildren + SendPipeWithClosedPeerBetweenChildren #endif TEST_F(MultiprocessMessagePipeTest, MAYBE_SendPipeWithClosedPeerBetweenChildren) { - RUN_CHILD_ON_PIPE(SendOtherChildPipeWithClosedPeer, kid_a) - RUN_CHILD_ON_PIPE(ReceivePipeWithClosedPeerFromOtherChild, kid_b) - // Receive an "application request" from the first child and forward it - // to the second child. - MojoHandle application_request; - EXPECT_EQ("c2a plz", - ReadMessageWithHandles(kid_a, &application_request, 1)); + RunTestClient("SendOtherChildPipeWithClosedPeer", [&](MojoHandle kid_a) { + RunTestClient( + "ReceivePipeWithClosedPeerFromOtherChild", [&](MojoHandle kid_b) { + // Receive an "application request" from the first child and forward + // it to the second child. + MojoHandle application_request; + EXPECT_EQ("c2a plz", + ReadMessageWithHandles(kid_a, &application_request, 1)); - WriteMessageWithHandles(kid_b, "c2a", &application_request, 1); - END_CHILD() + WriteMessageWithHandles(kid_b, "c2a", &application_request, 1); + }); WriteMessage(kid_a, "quit"); - END_CHILD() + }); } TEST_P(MultiprocessMessagePipeTestWithPeerSupport, SendClosePeerSend) { @@ -1232,7 +1219,8 @@ } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(WriteCloseSendPeerClient, - MultiprocessMessagePipeTest, h) { + MultiprocessMessagePipeTest, + h) { MojoHandle pipe[2]; EXPECT_EQ("foo", ReadMessageWithHandles(h, pipe, 2)); @@ -1259,7 +1247,7 @@ MojoHandle pipe[2]; CreateMessagePipe(&pipe[0], &pipe[1]); - RUN_CHILD_ON_PIPE(WriteCloseSendPeerClient, h) + RunTestClient("WriteCloseSendPeerClient", [&](MojoHandle h) { // Pass the pipe to the child. WriteMessageWithHandles(h, "foo", pipe, 2); @@ -1275,11 +1263,12 @@ WaitForSignals(p, MOJO_HANDLE_SIGNAL_PEER_CLOSED)); WriteMessage(h, "quit"); - END_CHILD() + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(MessagePipeStatusChangeInTransitClient, - MultiprocessMessagePipeTest, parent) { + MultiprocessMessagePipeTest, + parent) { // This test verifies that peer closure is detectable through various // mechanisms when it races with handle transfer. MojoHandle handles[4]; @@ -1329,15 +1318,18 @@ for (size_t i = 0; i < 4; ++i) CreateMessagePipe(&local_handles[i], &sent_handles[i]); - RUN_CHILD_ON_PIPE(MessagePipeStatusChangeInTransitClient, child) - // Send 4 handles and let their transfer race with their peers' closure. - WriteMessageWithHandles(child, "o_O", sent_handles, 4); - for (size_t i = 0; i < 4; ++i) - CloseHandle(local_handles[i]); - END_CHILD() + RunTestClient("MessagePipeStatusChangeInTransitClient", + [&](MojoHandle child) { + // Send 4 handles and let their transfer race with their + // peers' closure. + WriteMessageWithHandles(child, "o_O", sent_handles, 4); + for (size_t i = 0; i < 4; ++i) + CloseHandle(local_handles[i]); + }); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(BadMessageClient, MultiprocessMessagePipeTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(BadMessageClient, + MultiprocessMessagePipeTest, parent) { MojoHandle pipe; EXPECT_EQ("hi", ReadMessageWithHandles(parent, &pipe, 1)); @@ -1357,10 +1349,10 @@ std::string second_process_error; set_process_error_callback(base::Bind(&OnProcessError, &first_process_error)); - RUN_CHILD_ON_PIPE(BadMessageClient, child1) - set_process_error_callback(base::Bind(&OnProcessError, - &second_process_error)); - RUN_CHILD_ON_PIPE(BadMessageClient, child2) + RunTestClient("BadMessageClient", [&](MojoHandle child1) { + set_process_error_callback( + base::Bind(&OnProcessError, &second_process_error)); + RunTestClient("BadMessageClient", [&](MojoHandle child2) { MojoHandle a, b, c, d; CreateMessagePipe(&a, &b); CreateMessagePipe(&c, &d); @@ -1387,10 +1379,10 @@ EXPECT_EQ(MOJO_RESULT_OK, MojoDestroyMessage(message)); WriteMessage(child2, "bye"); - END_CHILD(); + }); WriteMessage(child1, "bye"); - END_CHILD() + }); // The error messages should match the processes which triggered them. EXPECT_NE(std::string::npos, first_process_error.find(kFirstErrorMessage));
diff --git a/mojo/edk/system/platform_wrapper_unittest.cc b/mojo/edk/system/platform_wrapper_unittest.cc index a97ce32..aa153dd 100644 --- a/mojo/edk/system/platform_wrapper_unittest.cc +++ b/mojo/edk/system/platform_wrapper_unittest.cc
@@ -16,6 +16,7 @@ #include "mojo/edk/embedder/platform_shared_buffer.h" #include "mojo/edk/test/mojo_test_base.h" #include "mojo/public/c/system/platform_handle.h" +#include "mojo/public/cpp/system/message_pipe.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_WIN) @@ -65,7 +66,7 @@ static_cast<int>(kMessage.size())), static_cast<int>(kMessage.size())); - RUN_CHILD_ON_PIPE(ReadPlatformFile, h) + RunTestClient("ReadPlatformFile", [&](MojoHandle h) { // Open the temporary file for reading, wrap its handle, and send it to // the child along with the expected message to be read. base::File file(temp_file_path, @@ -82,7 +83,7 @@ MojoWrapPlatformHandle(&os_file, &wrapped_handle)); WriteMessageWithHandles(h, kMessage, &wrapped_handle, 1); - END_CHILD() + }); base::DeleteFile(temp_file_path, false); } @@ -114,7 +115,7 @@ CHECK(buffer.memory()); memcpy(buffer.memory(), kMessage.data(), kMessage.size()); - RUN_CHILD_ON_PIPE(ReadPlatformSharedBuffer, h) + RunTestClient("ReadPlatformSharedBuffer", [&](MojoHandle h) { // Wrap the shared memory handle and send it to the child along with the // expected message. base::SharedMemoryHandle memory_handle = @@ -125,22 +126,33 @@ #if defined(OS_MACOSX) && !defined(OS_IOS) os_buffer.value = static_cast<uint64_t>(memory_handle.GetMemoryObject()); #elif defined(OS_POSIX) - os_buffer.value = static_cast<uint64_t>(memory_handle.GetHandle()); + os_buffer.value = static_cast<uint64_t>(memory_handle.GetHandle()); #elif defined(OS_WIN) - os_buffer.value = reinterpret_cast<uint64_t>(memory_handle.GetHandle()); + os_buffer.value = reinterpret_cast<uint64_t>(memory_handle.GetHandle()); #endif + MojoSharedBufferGuid mojo_guid; + base::UnguessableToken guid = memory_handle.GetGUID(); + mojo_guid.high = guid.GetHighForSerialization(); + mojo_guid.low = guid.GetLowForSerialization(); + MojoHandle wrapped_handle; - ASSERT_EQ(MOJO_RESULT_OK, - MojoWrapPlatformSharedBufferHandle( - &os_buffer, kMessage.size(), - MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE, - &wrapped_handle)); + ASSERT_EQ(MOJO_RESULT_OK, MojoWrapPlatformSharedBufferHandle( + &os_buffer, kMessage.size(), &mojo_guid, + MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE, + &wrapped_handle)); WriteMessageWithHandles(h, kMessage, &wrapped_handle, 1); - END_CHILD() + + // As a sanity check, send the GUID explicitly in a second message. We'll + // verify that the deserialized buffer handle holds the same GUID on the + // receiving end. + WriteMessageRaw(MessagePipeHandle(h), &mojo_guid, sizeof(mojo_guid), + nullptr, 0, MOJO_WRITE_MESSAGE_FLAG_NONE); + }); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReadPlatformSharedBuffer, PlatformWrapperTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReadPlatformSharedBuffer, + PlatformWrapperTest, h) { // Read a message and a wrapped shared buffer handle. MojoHandle wrapped_handle; @@ -154,15 +166,16 @@ MojoPlatformHandle os_buffer; os_buffer.struct_size = sizeof(MojoPlatformHandle); size_t size; + MojoSharedBufferGuid mojo_guid; MojoPlatformSharedBufferHandleFlags flags; ASSERT_EQ(MOJO_RESULT_OK, MojoUnwrapPlatformSharedBufferHandle(wrapped_handle, &os_buffer, - &size, &flags)); + &size, &mojo_guid, &flags)); bool read_only = flags & MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE; EXPECT_FALSE(read_only); - // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763. - base::UnguessableToken guid = base::UnguessableToken::Create(); + base::UnguessableToken guid = + base::UnguessableToken::Deserialize(mojo_guid.high, mojo_guid.low); #if defined(OS_MACOSX) && !defined(OS_IOS) ASSERT_EQ(MOJO_PLATFORM_HANDLE_TYPE_MACH_PORT, os_buffer.type); base::SharedMemoryHandle memory_handle( @@ -184,6 +197,18 @@ EXPECT_TRUE(std::equal(message.begin(), message.end(), static_cast<const char*>(memory.memory()))); + + // Verify that the received buffer's internal GUID was preserved in transit. + EXPECT_EQ(MOJO_RESULT_OK, WaitForSignals(h, MOJO_HANDLE_SIGNAL_READABLE)); + std::vector<uint8_t> guid_bytes; + EXPECT_EQ(MOJO_RESULT_OK, + ReadMessageRaw(MessagePipeHandle(h), &guid_bytes, nullptr, + MOJO_READ_MESSAGE_FLAG_NONE)); + EXPECT_EQ(sizeof(MojoSharedBufferGuid), guid_bytes.size()); + auto* expected_guid = + reinterpret_cast<MojoSharedBufferGuid*>(guid_bytes.data()); + EXPECT_EQ(expected_guid->high, mojo_guid.high); + EXPECT_EQ(expected_guid->low, mojo_guid.low); } TEST_F(PlatformWrapperTest, InvalidHandle) {
diff --git a/mojo/edk/system/shared_buffer_dispatcher.cc b/mojo/edk/system/shared_buffer_dispatcher.cc index df391050..6d46672 100644 --- a/mojo/edk/system/shared_buffer_dispatcher.cc +++ b/mojo/edk/system/shared_buffer_dispatcher.cc
@@ -27,6 +27,8 @@ struct SerializedState { uint64_t num_bytes; uint32_t flags; + uint64_t guid_high; + uint64_t guid_low; uint32_t padding; }; @@ -123,9 +125,9 @@ return nullptr; } - const SerializedState* serialization = + const SerializedState* serialized_state = static_cast<const SerializedState*>(bytes); - if (!serialization->num_bytes) { + if (!serialized_state->num_bytes) { LOG(ERROR) << "Invalid serialized shared buffer dispatcher (invalid num_bytes)"; return nullptr; @@ -143,12 +145,15 @@ // |platform_handles|. std::swap(platform_handle, *platform_handles); + base::UnguessableToken guid = base::UnguessableToken::Deserialize( + serialized_state->guid_high, serialized_state->guid_low); + // Wrapping |platform_handle| in a |ScopedPlatformHandle| means that it'll be // closed even if creation fails. - bool read_only = (serialization->flags & kSerializedStateFlagsReadOnly); + bool read_only = (serialized_state->flags & kSerializedStateFlagsReadOnly); scoped_refptr<PlatformSharedBuffer> shared_buffer( PlatformSharedBuffer::CreateFromPlatformHandle( - static_cast<size_t>(serialization->num_bytes), read_only, + static_cast<size_t>(serialized_state->num_bytes), read_only, guid, ScopedPlatformHandle(platform_handle))); if (!shared_buffer) { LOG(ERROR) @@ -254,14 +259,17 @@ bool SharedBufferDispatcher::EndSerialize(void* destination, ports::PortName* ports, PlatformHandle* handles) { - SerializedState* serialization = + SerializedState* serialized_state = static_cast<SerializedState*>(destination); base::AutoLock lock(lock_); - serialization->num_bytes = - static_cast<uint64_t>(shared_buffer_->GetNumBytes()); - serialization->flags = + serialized_state->num_bytes = + static_cast<uint64_t>(shared_buffer_->GetNumBytes()); + serialized_state->flags = (shared_buffer_->IsReadOnly() ? kSerializedStateFlagsReadOnly : 0); - serialization->padding = 0; + base::UnguessableToken guid = shared_buffer_->GetGUID(); + serialized_state->guid_high = guid.GetHighForSerialization(); + serialized_state->guid_low = guid.GetLowForSerialization(); + serialized_state->padding = 0; handle_for_transit_ = shared_buffer_->DuplicatePlatformHandle(); if (!handle_for_transit_.is_valid()) {
diff --git a/mojo/edk/system/shared_buffer_unittest.cc b/mojo/edk/system/shared_buffer_unittest.cc index 3a728728..af2c7beb 100644 --- a/mojo/edk/system/shared_buffer_unittest.cc +++ b/mojo/edk/system/shared_buffer_unittest.cc
@@ -67,11 +67,11 @@ const std::string message = "hello"; MojoHandle b = CreateBuffer(message.size()); - RUN_CHILD_ON_PIPE(CopyToBufferClient, h) + RunTestClient("CopyToBufferClient", [&](MojoHandle h) { MojoHandle dupe = DuplicateBuffer(b, false); WriteMessageWithHandles(h, message, &dupe, 1); WriteMessage(h, "quit"); - END_CHILD() + }); ExpectBufferContents(b, 0, message); } @@ -90,11 +90,11 @@ TEST_F(SharedBufferTest, PassSharedBufferFromChild) { const std::string message = "hello"; MojoHandle b; - RUN_CHILD_ON_PIPE(CreateBufferClient, h) + RunTestClient("CreateBufferClient", [&](MojoHandle h) { WriteMessage(h, message); ReadMessageWithHandles(h, &b, 1); WriteMessage(h, "quit"); - END_CHILD() + }); ExpectBufferContents(b, 0, message); } @@ -138,8 +138,8 @@ CreateMessagePipe(&p0, &p1); MojoHandle b; - RUN_CHILD_ON_PIPE(CreateAndPassBuffer, h0) - RUN_CHILD_ON_PIPE(ReceiveAndEditBuffer, h1) + RunTestClient("CreateAndPassBuffer", [&](MojoHandle h0) { + RunTestClient("ReceiveAndEditBuffer", [&](MojoHandle h1) { // Send one end of the pipe to each child. The first child will create // and pass a buffer to the second child and back to us. The second child // will write our message into the buffer. @@ -150,17 +150,18 @@ ReadMessageWithHandles(h0, &b, 1); WriteMessage(h1, "quit"); - END_CHILD() + }); WriteMessage(h0, "quit"); - END_CHILD() + }); // The second child should have written this message. ExpectBufferContents(b, 0, message); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(CreateAndPassBufferParent, SharedBufferTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(CreateAndPassBufferParent, + SharedBufferTest, parent) { - RUN_CHILD_ON_PIPE(CreateAndPassBuffer, child) + RunTestClient("CreateAndPassBuffer", [&](MojoHandle child) { // Read a pipe from the parent and forward it to our child. MojoHandle pipe; std::string message = ReadMessageWithHandles(parent, &pipe, 1); @@ -174,12 +175,13 @@ EXPECT_EQ("quit", ReadMessage(parent)); WriteMessage(child, "quit"); - END_CHILD() + }); } -DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReceiveAndEditBufferParent, SharedBufferTest, +DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReceiveAndEditBufferParent, + SharedBufferTest, parent) { - RUN_CHILD_ON_PIPE(ReceiveAndEditBuffer, child) + RunTestClient("ReceiveAndEditBuffer", [&](MojoHandle child) { // Read a pipe from the parent and forward it to our child. MojoHandle pipe; std::string message = ReadMessageWithHandles(parent, &pipe, 1); @@ -187,7 +189,7 @@ EXPECT_EQ("quit", ReadMessage(parent)); WriteMessage(child, "quit"); - END_CHILD() + }); } #if defined(OS_ANDROID) || defined(OS_MACOSX) @@ -206,8 +208,8 @@ // Spawn two children who will each spawn their own child. Make sure the // grandchildren (cousins to each other) can pass platform handles. MojoHandle b; - RUN_CHILD_ON_PIPE(CreateAndPassBufferParent, child1) - RUN_CHILD_ON_PIPE(ReceiveAndEditBufferParent, child2) + RunTestClient("CreateAndPassBufferParent", [&](MojoHandle child1) { + RunTestClient("ReceiveAndEditBufferParent", [&](MojoHandle child2) { MojoHandle pipe[2]; CreateMessagePipe(&pipe[0], &pipe[1]); @@ -218,16 +220,17 @@ ReadMessageWithHandles(child1, &b, 1); WriteMessage(child2, "quit"); - END_CHILD() + }); WriteMessage(child1, "quit"); - END_CHILD() + }); // The second grandchild should have written this message. ExpectBufferContents(b, 0, message); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReadAndMapWriteSharedBuffer, - SharedBufferTest, h) { + SharedBufferTest, + h) { // Receive the shared buffer. MojoHandle b; EXPECT_EQ("hello", ReadMessageWithHandles(h, &b, 1)); @@ -255,7 +258,7 @@ #define MAYBE_CreateAndPassReadOnlyBuffer CreateAndPassReadOnlyBuffer #endif TEST_F(SharedBufferTest, MAYBE_CreateAndPassReadOnlyBuffer) { - RUN_CHILD_ON_PIPE(ReadAndMapWriteSharedBuffer, h) + RunTestClient("ReadAndMapWriteSharedBuffer", [&](MojoHandle h) { // Create a new shared buffer. MojoHandle b = CreateBuffer(1234); WriteToBuffer(b, 0, "hello"); @@ -266,11 +269,12 @@ WriteMessage(h, "quit"); EXPECT_EQ("ok", ReadMessage(h)); - END_CHILD() + }); } DEFINE_TEST_CLIENT_TEST_WITH_PIPE(CreateAndPassReadOnlyBuffer, - SharedBufferTest, h) { + SharedBufferTest, + h) { // Create a new shared buffer. MojoHandle b = CreateBuffer(1234); WriteToBuffer(b, 0, "hello"); @@ -286,13 +290,13 @@ #if defined(OS_ANDROID) // Android multi-process tests are not executing the new process. This is flaky. #define MAYBE_CreateAndPassFromChildReadOnlyBuffer \ - DISABLED_CreateAndPassFromChildReadOnlyBuffer + DISABLED_CreateAndPassFromChildReadOnlyBuffer #else #define MAYBE_CreateAndPassFromChildReadOnlyBuffer \ - CreateAndPassFromChildReadOnlyBuffer + CreateAndPassFromChildReadOnlyBuffer #endif TEST_F(SharedBufferTest, MAYBE_CreateAndPassFromChildReadOnlyBuffer) { - RUN_CHILD_ON_PIPE(CreateAndPassReadOnlyBuffer, h) + RunTestClient("CreateAndPassReadOnlyBuffer", [&](MojoHandle h) { MojoHandle b; EXPECT_EQ("", ReadMessageWithHandles(h, &b, 1)); ExpectBufferContents(b, 0, "hello"); @@ -308,7 +312,7 @@ WriteMessage(h, "quit"); EXPECT_EQ("ok", ReadMessage(h)); - END_CHILD() + }); } #endif // !defined(OS_IOS)
diff --git a/mojo/edk/test/mojo_test_base.h b/mojo/edk/test/mojo_test_base.h index 35e2c2b1..e928d82 100644 --- a/mojo/edk/test/mojo_test_base.h +++ b/mojo/edk/test/mojo_test_base.h
@@ -67,12 +67,16 @@ ClientController& StartClient(const std::string& client_name); template <typename HandlerFunc> - void StartClientWithHandler(const std::string& client_name, - HandlerFunc handler) { - int expected_exit_code = 0; + void RunTestClient(const std::string& client_name, HandlerFunc handler) { + EXPECT_EQ(0, RunTestClientAndGetExitCode(client_name, handler)); + } + + template <typename HandlerFunc> + int RunTestClientAndGetExitCode(const std::string& client_name, + HandlerFunc handler) { ClientController& c = StartClient(client_name); - handler(c.pipe(), &expected_exit_code); - EXPECT_EQ(expected_exit_code, c.WaitForShutdown()); + handler(c.pipe()); + return c.WaitForShutdown(); } // Closes a handle and expects success. @@ -85,9 +89,9 @@ // Writes a string to the pipe, transferring handles in the process. static void WriteMessageWithHandles(MojoHandle mp, - const std::string& message, - const MojoHandle* handles, - uint32_t num_handles); + const std::string& message, + const MojoHandle* handles, + uint32_t num_handles); // Writes a string to the pipe with no handles. static void WriteMessage(MojoHandle mp, const std::string& message); @@ -95,13 +99,13 @@ // Reads a string from the pipe, expecting to read an exact number of handles // in the process. Returns the read string. static std::string ReadMessageWithHandles(MojoHandle mp, - MojoHandle* handles, - uint32_t expected_num_handles); + MojoHandle* handles, + uint32_t expected_num_handles); // Reads a string from the pipe, expecting either zero or one handles. // If no handle is read, |handle| will be reset. static std::string ReadMessageWithOptionalHandle(MojoHandle mp, - MojoHandle* handle); + MojoHandle* handle); // Reads a string from the pipe, expecting to read no handles. // Returns the string. @@ -172,52 +176,34 @@ DISALLOW_COPY_AND_ASSIGN(MojoTestBase); }; -// Launches a new child process running the test client |client_name| connected -// to a new message pipe bound to |pipe_name|. |pipe_name| is automatically -// closed on test teardown. -#define RUN_CHILD_ON_PIPE(client_name, pipe_name) \ - StartClientWithHandler( \ - #client_name, \ - [&](MojoHandle pipe_name, int *expected_exit_code) { { - -// Waits for the client to terminate and expects a return code of zero. -#define END_CHILD() \ - } \ - *expected_exit_code = 0; \ - }); - -// Wait for the client to terminate with a specific return code. -#define END_CHILD_AND_EXPECT_EXIT_CODE(code) \ - } \ - *expected_exit_code = code; \ - }); - // Use this to declare the child process's "main()" function for tests using // MojoTestBase and MultiprocessTestHelper. It returns an |int|, which will // will be the process's exit code (but see the comment about // WaitForChildShutdown()). // // The function is defined as a subclass of |test_base| to facilitate shared -// code between test clients and to allow clients to spawn children themselves. +// code between test clients and to allow clients to spawn children +// themselves. // // |pipe_name| will be bound to the MojoHandle of a message pipe connected -// to the parent process (see RUN_CHILD_ON_PIPE above.) This pipe handle is +// to the test process (see RunTestClient* above.) This pipe handle is // automatically closed on test client teardown. #if !defined(OS_IOS) -#define DEFINE_TEST_CLIENT_WITH_PIPE(client_name, test_base, pipe_name) \ - class client_name##_MainFixture : public test_base { \ - void TestBody() override {} \ - public: \ - int Main(MojoHandle); \ - }; \ - MULTIPROCESS_TEST_MAIN_WITH_SETUP( \ - client_name##TestChildMain, \ - ::mojo::edk::test::MultiprocessTestHelper::ChildSetup) { \ - client_name##_MainFixture test; \ - return ::mojo::edk::test::MultiprocessTestHelper::RunClientMain( \ - base::Bind(&client_name##_MainFixture::Main, \ - base::Unretained(&test))); \ - } \ +#define DEFINE_TEST_CLIENT_WITH_PIPE(client_name, test_base, pipe_name) \ + class client_name##_MainFixture : public test_base { \ + void TestBody() override {} \ + \ + public: \ + int Main(MojoHandle); \ + }; \ + MULTIPROCESS_TEST_MAIN_WITH_SETUP( \ + client_name##TestChildMain, \ + ::mojo::edk::test::MultiprocessTestHelper::ChildSetup) { \ + client_name##_MainFixture test; \ + return ::mojo::edk::test::MultiprocessTestHelper::RunClientMain( \ + base::Bind(&client_name##_MainFixture::Main, \ + base::Unretained(&test))); \ + } \ int client_name##_MainFixture::Main(MojoHandle pipe_name) // This is a version of DEFINE_TEST_CLIENT_WITH_PIPE which can be used with @@ -225,6 +211,7 @@ #define DEFINE_TEST_CLIENT_TEST_WITH_PIPE(client_name, test_base, pipe_name) \ class client_name##_MainFixture : public test_base { \ void TestBody() override {} \ + \ public: \ void Main(MojoHandle); \ }; \
diff --git a/mojo/edk/test/multiprocess_test_helper.cc b/mojo/edk/test/multiprocess_test_helper.cc index 049dc6e6..ed96e1d 100644 --- a/mojo/edk/test/multiprocess_test_helper.cc +++ b/mojo/edk/test/multiprocess_test_helper.cc
@@ -101,7 +101,7 @@ // multiprocess client name and mojo message pipe handle; this allows test // clients to spawn other test clients. for (const auto& entry : - base::CommandLine::ForCurrentProcess()->GetSwitches()) { + base::CommandLine::ForCurrentProcess()->GetSwitches()) { if (uninherited_args.find(entry.first) == uninherited_args.end()) command_line.AppendSwitchNative(entry.first, entry.second); } @@ -260,7 +260,7 @@ ? 1 : 0; }, - true /* close_pipe_on_exit */); + true /* pass_pipe_ownership_to_main */); } // static
diff --git a/mojo/public/c/system/platform_handle.h b/mojo/public/c/system/platform_handle.h index 7449c2e..8ecff2b9 100644 --- a/mojo/public/c/system/platform_handle.h +++ b/mojo/public/c/system/platform_handle.h
@@ -65,6 +65,13 @@ MOJO_STATIC_ASSERT(sizeof(MojoPlatformHandle) == 16, "MojoPlatformHandle has wrong size"); +// |MojoSharedBufferGuid|: A GUID used to identify the buffer backing a shared +// buffer handle. +struct MOJO_ALIGNAS(8) MojoSharedBufferGuid { + uint64_t high; + uint64_t low; +}; + // |MojoPlatformSharedBufferHandleFlags|: Flags relevant to wrapped platform // shared buffers. // @@ -76,16 +83,16 @@ #ifdef __cplusplus const MojoPlatformSharedBufferHandleFlags -MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE = 0; + MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE = 0; const MojoPlatformSharedBufferHandleFlags -MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_READ_ONLY = 1 << 0; + MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_READ_ONLY = 1 << 0; #else #define MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE \ - ((MojoPlatformSharedBufferHandleFlags)0) + ((MojoPlatformSharedBufferHandleFlags)0) #define MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_READ_ONLY \ - ((MojoPlatformSharedBufferHandleFlags)1 << 0) + ((MojoPlatformSharedBufferHandleFlags)1 << 0) #endif // Wraps a native platform handle as a Mojo handle which can be transferred @@ -148,10 +155,10 @@ // |*mojo_handle| contains a Mojo shared buffer handle. // |MOJO_RESULT_INVALID_ARGUMENT| if |platform_handle| was not a valid // platform shared buffer handle. -MOJO_SYSTEM_EXPORT MojoResult -MojoWrapPlatformSharedBufferHandle( +MOJO_SYSTEM_EXPORT MojoResult MojoWrapPlatformSharedBufferHandle( const struct MojoPlatformHandle* platform_handle, size_t num_bytes, + const struct MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags flags, MojoHandle* mojo_handle); // Out @@ -177,11 +184,11 @@ // Flags which may be set in |*flags| upon success: // |MOJO_PLATFORM_SHARED_BUFFER_FLAG_READ_ONLY| is set iff the unwrapped // shared buffer handle may only be mapped as read-only. -MOJO_SYSTEM_EXPORT MojoResult -MojoUnwrapPlatformSharedBufferHandle( +MOJO_SYSTEM_EXPORT MojoResult MojoUnwrapPlatformSharedBufferHandle( MojoHandle mojo_handle, struct MojoPlatformHandle* platform_handle, size_t* num_bytes, + struct MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags* flags); #ifdef __cplusplus
diff --git a/mojo/public/c/system/thunks.cc b/mojo/public/c/system/thunks.cc index 7118bd4..8a549dc7 100644 --- a/mojo/public/c/system/thunks.cc +++ b/mojo/public/c/system/thunks.cc
@@ -224,21 +224,23 @@ MojoResult MojoWrapPlatformSharedBufferHandle( const struct MojoPlatformHandle* platform_handle, size_t num_bytes, + const struct MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags flags, MojoHandle* mojo_handle) { assert(g_thunks.WrapPlatformSharedBufferHandle); return g_thunks.WrapPlatformSharedBufferHandle(platform_handle, num_bytes, - flags, mojo_handle); + guid, flags, mojo_handle); } MojoResult MojoUnwrapPlatformSharedBufferHandle( MojoHandle mojo_handle, struct MojoPlatformHandle* platform_handle, size_t* num_bytes, + struct MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags* flags) { assert(g_thunks.UnwrapPlatformSharedBufferHandle); return g_thunks.UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle, - num_bytes, flags); + num_bytes, guid, flags); } MojoResult MojoNotifyBadMessage(MojoMessageHandle message,
diff --git a/mojo/public/c/system/thunks.h b/mojo/public/c/system/thunks.h index c634888..1e4a8dd 100644 --- a/mojo/public/c/system/thunks.h +++ b/mojo/public/c/system/thunks.h
@@ -108,12 +108,14 @@ MojoResult (*WrapPlatformSharedBufferHandle)( const struct MojoPlatformHandle* platform_handle, size_t num_bytes, + const struct MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags flags, MojoHandle* mojo_handle); MojoResult (*UnwrapPlatformSharedBufferHandle)( MojoHandle mojo_handle, struct MojoPlatformHandle* platform_handle, size_t* num_bytes, + struct MojoSharedBufferGuid* guid, MojoPlatformSharedBufferHandleFlags* flags); MojoResult (*NotifyBadMessage)(MojoMessageHandle message, const char* error, @@ -134,7 +136,7 @@ // A function for setting up the embedder's own system thunks. This should only // be called by Mojo embedder code. -MOJO_SYSTEM_EXPORT size_t MojoEmbedderSetSystemThunks( - const struct MojoSystemThunks* system_thunks); +MOJO_SYSTEM_EXPORT size_t +MojoEmbedderSetSystemThunks(const struct MojoSystemThunks* system_thunks); #endif // MOJO_PUBLIC_C_SYSTEM_THUNKS_H_
diff --git a/mojo/public/cpp/bindings/tests/e2e_perftest.cc b/mojo/public/cpp/bindings/tests/e2e_perftest.cc index 2734cc7..6b20241 100644 --- a/mojo/public/cpp/bindings/tests/e2e_perftest.cc +++ b/mojo/public/cpp/bindings/tests/e2e_perftest.cc
@@ -122,8 +122,9 @@ } else { base::RunLoop run_loop; runner->PostTaskAndReply( - FROM_HERE, base::Bind(&MojoE2EPerftest::RunTests, - base::Unretained(this), client_mp, test_name), + FROM_HERE, + base::Bind(&MojoE2EPerftest::RunTests, base::Unretained(this), + client_mp, test_name), run_loop.QuitClosure()); run_loop.Run(); } @@ -181,23 +182,23 @@ } TEST_F(MojoE2EPerftest, MultiProcessEchoMainThread) { - RUN_CHILD_ON_PIPE(PingService, mp) + RunTestClient("PingService", [&](MojoHandle mp) { MojoHandle client_mp, service_mp; CreateMessagePipe(&client_mp, &service_mp); WriteMessageWithHandles(mp, "hello", &service_mp, 1); RunTestOnTaskRunner(message_loop_.task_runner().get(), client_mp, "MultiProcessEchoMainThread"); - END_CHILD() + }); } TEST_F(MojoE2EPerftest, MultiProcessEchoIoThread) { - RUN_CHILD_ON_PIPE(PingService, mp) + RunTestClient("PingService", [&](MojoHandle mp) { MojoHandle client_mp, service_mp; CreateMessagePipe(&client_mp, &service_mp); WriteMessageWithHandles(mp, "hello", &service_mp, 1); RunTestOnTaskRunner(edk::GetIOTaskRunner().get(), client_mp, "MultiProcessEchoIoThread"); - END_CHILD() + }); } } // namespace
diff --git a/mojo/public/cpp/system/platform_handle.cc b/mojo/public/cpp/system/platform_handle.cc index 8c7f0ee..405f5f0 100644 --- a/mojo/public/cpp/system/platform_handle.cc +++ b/mojo/public/cpp/system/platform_handle.cc
@@ -47,8 +47,8 @@ MojoResult UnwrapPlatformFile(ScopedHandle handle, base::PlatformFile* file) { MojoPlatformHandle platform_handle; platform_handle.struct_size = sizeof(MojoPlatformHandle); - MojoResult result = MojoUnwrapPlatformHandle(handle.release().value(), - &platform_handle); + MojoResult result = + MojoUnwrapPlatformHandle(handle.release().value(), &platform_handle); if (result != MOJO_RESULT_OK) return result; @@ -84,9 +84,12 @@ if (read_only) flags |= MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_READ_ONLY; + MojoSharedBufferGuid guid; + guid.high = memory_handle.GetGUID().GetHighForSerialization(); + guid.low = memory_handle.GetGUID().GetLowForSerialization(); MojoHandle mojo_handle; MojoResult result = MojoWrapPlatformSharedBufferHandle( - &platform_handle, size, flags, &mojo_handle); + &platform_handle, size, &guid, flags, &mojo_handle); CHECK_EQ(result, MOJO_RESULT_OK); return ScopedSharedBufferHandle(SharedBufferHandle(mojo_handle)); @@ -103,8 +106,10 @@ MojoPlatformSharedBufferHandleFlags flags; size_t num_bytes; + MojoSharedBufferGuid mojo_guid; MojoResult result = MojoUnwrapPlatformSharedBufferHandle( - handle.release().value(), &platform_handle, &num_bytes, &flags); + handle.release().value(), &platform_handle, &num_bytes, &mojo_guid, + &flags); if (result != MOJO_RESULT_OK) return result; @@ -114,8 +119,8 @@ if (read_only) *read_only = flags & MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_READ_ONLY; - // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763. - base::UnguessableToken guid = base::UnguessableToken::Create(); + base::UnguessableToken guid = + base::UnguessableToken::Deserialize(mojo_guid.high, mojo_guid.low); #if defined(OS_MACOSX) && !defined(OS_IOS) CHECK_EQ(platform_handle.type, MOJO_PLATFORM_HANDLE_TYPE_MACH_PORT); *memory_handle = base::SharedMemoryHandle(
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc index 020e2bd4..29d040c8 100644 --- a/net/http/http_cache_transaction.cc +++ b/net/http/http_cache_transaction.cc
@@ -1836,7 +1836,7 @@ } int HttpCache::Transaction::DoFinishHeaders(int result) { - if (!entry_ || result != OK) { + if (!cache_.get() || !entry_ || result != OK) { TransitionToState(STATE_NONE); return result; }
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index e101fe1..a647919 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -3077,15 +3077,6 @@ "test": "components_unittests" }, { - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "content_browsertests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ @@ -3611,15 +3602,6 @@ "test": "media_unittests" }, { - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "net_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ @@ -3899,15 +3881,6 @@ "test": "ui_touch_selection_unittests" }, { - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "unit_tests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ @@ -3982,18 +3955,6 @@ "test": "vr_common_unittests" }, { - "args": [ - "--gs-results-bucket=chromium-result-details" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "chrome_public_test_apk" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ @@ -4114,18 +4075,6 @@ "test": "chrome_sync_shell_test_apk" }, { - "args": [ - "--gs-results-bucket=chromium-result-details" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "content_shell_test_apk" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ @@ -4159,18 +4108,6 @@ "test": "content_shell_test_apk" }, { - "args": [ - "--gs-results-bucket=chromium-result-details" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", - "webview_instrumentation_test_apk" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index d1d194c..11b9391c 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -16173,25 +16173,6 @@ }, { "args": [ - "--test-launcher-batch-limit=400", - "--deqp-egl-display-type=angle-d3d11" - ], - "name": "angle_deqp_gles3_d3d11_tests", - "swarming": { - "can_use_on_swarming_builders": false, - "dimension_sets": [ - { - "gpu": "1002:6613", - "os": "Windows-2008ServerR2-SP1" - } - ], - "shards": 12 - }, - "test": "angle_deqp_gles3_tests", - "use_xvfb": false - }, - { - "args": [ "--use-gpu-in-tests", "--test-launcher-retry-limit=0" ], @@ -16791,25 +16772,6 @@ }, { "args": [ - "--test-launcher-batch-limit=400", - "--deqp-egl-display-type=angle-d3d11" - ], - "name": "angle_deqp_gles3_d3d11_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "1002:6613", - "os": "Windows-2008ServerR2-SP1" - } - ], - "shards": 12 - }, - "test": "angle_deqp_gles3_tests", - "use_xvfb": false - }, - { - "args": [ "--use-gpu-in-tests", "--test-launcher-retry-limit=0" ],
diff --git a/testing/buildbot/filters/ash_unittests_mus.filter b/testing/buildbot/filters/ash_unittests_mus.filter index 9cb4f59..3bc4e719 100644 --- a/testing/buildbot/filters/ash_unittests_mus.filter +++ b/testing/buildbot/filters/ash_unittests_mus.filter
@@ -1,14 +1,13 @@ +# TODO: fix these. They fail because wm::CursorManager isn't created. +# http://crbug.com/734806. +# The following fail as they use wm::CursorManager: -AshNativeCursorManagerTest.FractionalScale -AshNativeCursorManagerTest.LockCursor -AshNativeCursorManagerTest.SetCursor -AshNativeCursorManagerTest.SetCursorSet -AshNativeCursorManagerTest.SetDeviceScaleFactorAndRotation -AshNativeCursorManagerTest.UIScaleShouldNotChangeCursor --CursorWindowControllerTest.DSF --CursorWindowControllerTest.MoveToDifferentDisplay -CursorWindowControllerTest.VisibilityTest --DisplayManagerTest.SoftwareMirroringWithCompositingCursor --DisplayManagerTest.UpdateMouseCursorAfterRotateZoom -DragDropControllerTest.CaptureLostCancelsDragDrop -DragDropControllerTest.DragCancelAcrossDisplays -DragDropControllerTest.DragCancelOnDisplayDisconnect @@ -26,67 +25,17 @@ -DragDropControllerTest.WindowDestroyedDuringDragDrop -DragWindowResizerTest.CursorDeviceScaleFactor -ExtendedDesktopTest.TestCursor --ImmersiveFullscreenControllerTest.EndRevealViaGesture --LaserPointerControllerTest.LaserPointerPrediction --LaserPointerControllerTest.LaserPointerRenderer -LockStateControllerTest.LegacyLockAndShutDown -LockStateControllerTest.RequestShutdownFromLockScreen -LockStateControllerTest.RequestShutdownFromLoginScreen -LockStateControllerTest.ShutdownWithoutButton --MagnificationControllerTest.PanWindowToLeft --MagnificationControllerTest.PanWindowToRight --MaximizeModeControllerTest.CloseLidWhileInMaximizeMode --MaximizeModeControllerTest.ForceTouchViewModeTest --MaximizeModeControllerTest.HingeAligned --MaximizeModeControllerTest.InitializedWhileTabletModeSwitchOn --MaximizeModeControllerTest.MaximizeModeAfterExitingDockedMode --MaximizeModeControllerTest.MaximizeModeTest --MaximizeModeControllerTest.NoMaximizeModeWithDisabledInternalDisplay --MaximizeModeControllerTest.StableHingeAnglesWithLidOpened --MaximizeModeControllerTest.TabletModeTransition --MaximizeModeControllerTest.TabletModeTransitionNoKeyboardAccelerometer --MaximizeModeControllerTest.UnstableHingeAnglesWhenLidRecentlyOpened --MaximizeModeControllerTest.UnstableHingeAnglesWithLidOpened --MaximizeModeControllerTest.VerticalHingeTest --MaximizeModeControllerTest.VerticalHingeUnstableAnglesTest --MirrorWindowControllerTest.MirrorCursorBasic --MirrorWindowControllerTest.MirrorCursorLocations --MirrorWindowControllerTest.MirrorCursorMoveOnEnter --MirrorWindowControllerTest.MirrorCursorRotate -MouseCursorEventFilterTest.CursorDeviceScaleFactor -PartialScreenshotControllerTest.LargeCursor -PartialScreenshotControllerTest.VisibilityTest --PointerMetricsRecorderTest.DownEventPerDestination --PointerMetricsRecorderTest.DownEventPerFormFactor --PointerMetricsRecorderTest.DownEventPerInput -ResizeShadowAndCursorTest.MaximizeRestore -ResizeShadowAndCursorTest.MouseDrag -ResizeShadowAndCursorTest.MouseHover --ScreenRotationAnimatorSmoothAnimationTest.OverviewButtonTrayHideAnimationAlwaysCompletes --ScreenRotationAnimatorSmoothAnimationTest.RemoveExternalPrimaryDisplayBeforeSecondCopyCallback --ScreenRotationAnimatorSmoothAnimationTest.RemoveExternalPrimaryDisplayDuringAnimationChangedRootWindow --ScreenRotationAnimatorSmoothAnimationTest.RemoveExternalSecondaryDisplayBeforeSecondCopyCallback --ScreenRotationAnimatorSmoothAnimationTest.RotatesToDifferentRotationWithCopyCallback --ScreenRotationAnimatorSmoothAnimationTest.ShouldRotateAfterRecreateLayers --ShellTest2.DontCrashWhenWindowDeleted --ToastManagerTest.NullMessageHasNoDismissButton --ToastManagerTest.QueueMessage --ToastManagerTest.ShowAndCloseManuallyDuringAnimation -TooltipControllerTest.HideTooltipWhenCursorHidden --ToplevelWindowEventHandlerTest.GestureDragCaptureLoss --TrayIMETest.HidesOnA11yEnabled --TrayIMETest.PerformActionOnDetailedView --UnifiedMouseWarpControllerTest.WarpMouse --VirtualKeyboardControllerAlwaysEnabledTest.DoesNotSuppressKeyboard --VirtualKeyboardControllerAutoTest.DisabledIfInternalKeyboardPresent --VirtualKeyboardControllerAutoTest.DisabledIfNoTouchScreen --VirtualKeyboardControllerAutoTest.EnabledDuringMaximizeMode --VirtualKeyboardControllerAutoTest.HandleMultipleKeyboardsPresent --VirtualKeyboardControllerAutoTest.SuppressedIfExternalKeyboardPresent --VirtualKeyboardControllerAutoTest.SuppressedInMaximizedMode --VirtualKeyboardControllerTest.EnabledDuringMaximizeMode --VirtualKeyboardControllerTest.RestoreKeyboardDevices --WindowManagerTest.MouseEventCursors -WindowManagerTest.TestCursorClientObserver -WindowManagerTest.UpdateCursorVisibility -WindowManagerTest.UpdateCursorVisibilityAccelerator @@ -95,3 +44,47 @@ -WindowTreeHostManagerTest.UpdateMouseLocationAfterDisplayChange_PrimaryDisconnected -WindowTreeHostManagerTest.UpdateMouseLocationAfterDisplayChange_SwapPrimary -WorkspaceWindowResizerTest.MouseMoveWithTouchDrag + +# TODO: fix these. They fail because CursorWindowController isn't created. +# http://crbug.com/734807. +-CursorWindowControllerTest.DSF +-CursorWindowControllerTest.MoveToDifferentDisplay +-DisplayManagerTest.SoftwareMirroringWithCompositingCursor +-MirrorWindowControllerTest.MirrorCursorBasic +-MirrorWindowControllerTest.MirrorCursorLocations +-MirrorWindowControllerTest.MirrorCursorMoveOnEnter +-MirrorWindowControllerTest.MirrorCursorRotate + +# TODO: fix these. They fail because ShellPortMash::IsMouseEventsEnabled() isn't +# implemented. http://crbug.com/734808. +-ImmersiveFullscreenControllerTest.EndRevealViaGesture + +# TODO: fix these. They fail because AshNativeCursorManager isn't created +# http://crbug.com/734809. +-MagnificationControllerTest.PanWindowToLeft +-MagnificationControllerTest.PanWindowToRight +-WindowManagerTest.MouseEventCursors + +# TODO: fix these. They all timeout. http://crbug.com/734811. +-ScreenRotationAnimatorSmoothAnimationTest.OverviewButtonTrayHideAnimationAlwaysCompletes +-ScreenRotationAnimatorSmoothAnimationTest.RemoveExternalPrimaryDisplayBeforeSecondCopyCallback +-ScreenRotationAnimatorSmoothAnimationTest.RemoveExternalPrimaryDisplayDuringAnimationChangedRootWindow +-ScreenRotationAnimatorSmoothAnimationTest.RemoveExternalSecondaryDisplayBeforeSecondCopyCallback +-ScreenRotationAnimatorSmoothAnimationTest.RotatesToDifferentRotationWithCopyCallback +-ScreenRotationAnimatorSmoothAnimationTest.ShouldRotateAfterRecreateLayers + +# TODO: fix these. They fail because DeviceDataManager isn't created. +# http://crbug.com/734812. +-TrayIMETest.HidesOnA11yEnabled +-TrayIMETest.PerformActionOnDetailedView +-VirtualKeyboardControllerAlwaysEnabledTest.DoesNotSuppressKeyboard +-VirtualKeyboardControllerAutoTest.DisabledIfInternalKeyboardPresent +-VirtualKeyboardControllerAutoTest.DisabledIfNoTouchScreen +-VirtualKeyboardControllerAutoTest.EnabledDuringMaximizeMode +-VirtualKeyboardControllerAutoTest.HandleMultipleKeyboardsPresent +-VirtualKeyboardControllerAutoTest.SuppressedIfExternalKeyboardPresent +-VirtualKeyboardControllerAutoTest.SuppressedInMaximizedMode +-VirtualKeyboardControllerTest.RestoreKeyboardDevices + +# When adding new exclusions be sure to file bug with reason. Group with the +# above if applicable.
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG index 8445a132..09751c64 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -535,9 +535,12 @@ crbug.com/591099 canvas/image-with-foreignobject-taint-canvas.html [ Crash ] crbug.com/591099 canvas/philip/tests/2d.drawImage.image.incomplete.empty.html [ Crash Pass ] crbug.com/591099 canvas/philip/tests/2d.drawImage.image.incomplete.omitted.html [ Crash Pass ] +crbug.com/591099 canvas/philip/tests/2d.gradient.object.current.html [ Crash Pass ] crbug.com/591099 canvas/philip/tests/2d.pattern.image.incomplete.empty.html [ Crash Pass ] crbug.com/591099 canvas/philip/tests/2d.pattern.image.incomplete.omitted.html [ Crash Pass ] -crbug.com/591099 compositing/3d-corners.html [ Failure ] +crbug.com/591099 canvas/philip/tests/2d.text.draw.baseline.ideographic.html [ Crash Pass ] +crbug.com/591099 canvas/philip/tests/2d.text.draw.fontface.notinpage.html [ Crash Pass ] +crbug.com/591099 compositing/3d-corners.html [ Crash Failure ] crbug.com/591099 compositing/absolute-inside-out-of-view-fixed.html [ Failure Pass ] crbug.com/591099 compositing/animation/busy-indicator.html [ Failure ] crbug.com/591099 compositing/animation/hidden-composited.html [ Failure ] @@ -557,6 +560,7 @@ crbug.com/591099 compositing/composite-scrollable-fixed-position-when-descendants-composite.html [ Failure ] crbug.com/591099 compositing/composited-negative-zindex-child.html [ Failure ] crbug.com/591099 compositing/compositing-visible-descendant.html [ Failure ] +crbug.com/591099 compositing/content-changed-chicken-egg.html [ Failure Pass ] crbug.com/591099 compositing/contents-opaque/background-clip.html [ Failure Pass ] crbug.com/591099 compositing/contents-opaque/background-color.html [ Failure Pass ] crbug.com/591099 compositing/contents-opaque/body-background-painted.html [ Failure ] @@ -580,6 +584,7 @@ crbug.com/591099 compositing/fixed-position-changed-to-absolute.html [ Failure ] crbug.com/591099 compositing/fixed-position-container.html [ Failure Pass ] crbug.com/591099 compositing/fixed-position-scroll-offset-history-restore.html [ Failure ] +crbug.com/591099 compositing/flat-with-transformed-child.html [ Crash Pass ] crbug.com/591099 compositing/force-compositing-mode/overflow-iframe-enter-compositing.html [ Failure Pass ] crbug.com/591099 compositing/force-compositing-mode/overflow-iframe-layer.html [ Failure Pass ] crbug.com/591099 compositing/framesets/composited-frame-alignment.html [ Failure ] @@ -1300,14 +1305,14 @@ crbug.com/591099 css2.1/t040105-import-01-b.html [ Failure Pass ] crbug.com/591099 css2.1/t040105-import-10-b.html [ Failure Pass ] crbug.com/591099 css2.1/t040109-c17-comments-00-b.html [ Failure Pass ] -crbug.com/591099 css2.1/t040109-c17-comments-01-b.html [ Failure Pass ] +crbug.com/591099 css2.1/t040109-c17-comments-01-b.html [ Crash Failure Pass ] crbug.com/591099 css2.1/t0402-c71-fwd-parsing-00-f.html [ Failure Pass ] crbug.com/591099 css2.1/t0402-c71-fwd-parsing-01-f.html [ Failure ] crbug.com/591099 css2.1/t0402-c71-fwd-parsing-02-f.html [ Crash Failure ] crbug.com/591099 css2.1/t0402-c71-fwd-parsing-03-f.html [ Failure Pass ] crbug.com/591099 css2.1/t0402-c71-fwd-parsing-04-f.html [ Failure ] crbug.com/591099 css2.1/t0402-syntax-01-f.html [ Failure Pass ] -crbug.com/591099 css2.1/t0402-syntax-02-f.html [ Failure Pass ] +crbug.com/591099 css2.1/t0402-syntax-02-f.html [ Crash Failure Pass ] crbug.com/591099 css2.1/t0402-syntax-03-f.html [ Failure Pass ] crbug.com/591099 css2.1/t0402-syntax-04-f.html [ Failure Pass ] crbug.com/591099 css2.1/t0402-syntax-05-f.html [ Failure Pass ] @@ -1773,7 +1778,12 @@ crbug.com/591099 css3/blending/mix-blend-mode-simple-text.html [ Failure ] crbug.com/591099 css3/blending/mix-blend-mode-simple.html [ Failure ] crbug.com/591099 css3/blending/mix-blend-mode-with-masking.html [ Failure Pass ] +crbug.com/591099 css3/blending/svg-blend-color.html [ Failure ] +crbug.com/591099 css3/blending/svg-blend-hue.html [ Failure ] +crbug.com/591099 css3/blending/svg-blend-luminosity.html [ Failure ] crbug.com/591099 css3/blending/svg-blend-multiply-alpha.html [ Failure ] +crbug.com/591099 css3/blending/svg-blend-saturation.html [ Failure ] +crbug.com/591099 css3/blending/svg-isolation-simple.html [ Crash Pass ] crbug.com/591099 css3/calc/border.html [ Failure ] crbug.com/591099 css3/calc/catch-divide-by-0.html [ Failure ] crbug.com/591099 css3/calc/color-hsl.html [ Failure ] @@ -1872,7 +1882,7 @@ crbug.com/591099 css3/filters/huge-region-composited.html [ Failure ] crbug.com/591099 css3/filters/huge-region.html [ Failure ] crbug.com/591099 css3/filters/multiple-references-id-mutate-crash-2.html [ Crash ] -crbug.com/591099 css3/filters/nested-filter.html [ Failure ] +crbug.com/591099 css3/filters/nested-filter.html [ Crash Failure ] crbug.com/591099 css3/filters/nested-filters.html [ Failure Pass ] crbug.com/591099 css3/filters/offscreen-filters-memory-usage.html [ Failure ] crbug.com/591099 css3/filters/regions-expanding.html [ Crash Failure ] @@ -1932,6 +1942,7 @@ crbug.com/591099 css3/flexbox/min-size-auto.html [ Crash ] crbug.com/591099 css3/flexbox/multiline-align-self.html [ Failure ] crbug.com/591099 css3/flexbox/multiline-reverse-wrap-baseline.html [ Failure ] +crbug.com/591099 css3/flexbox/multiline-shrink-to-fit.html [ Crash Pass ] crbug.com/591099 css3/flexbox/negative-flex-rounding-assert.html [ Failure ] crbug.com/591099 css3/flexbox/nested-stretch.html [ Failure ] crbug.com/591099 css3/flexbox/overflow-auto-dynamic-changes-abspos.html [ Failure ] @@ -1970,6 +1981,7 @@ crbug.com/591099 css3/masking/clip-path-restore.html [ Failure Pass ] crbug.com/591099 css3/masking/mask-luminance-png.html [ Failure ] crbug.com/591099 css3/masking/mask-luminance-svg.html [ Failure ] +crbug.com/591099 css3/masking/mask-repeat-one-copy.html [ Crash Pass ] crbug.com/591099 css3/masking/mask-repeat-round-content.html [ Failure ] crbug.com/591099 css3/masking/mask-repeat-round-one-tile-crash.html [ Failure ] crbug.com/591099 css3/masking/mask-repeat-space-border.html [ Failure ] @@ -3210,12 +3222,16 @@ crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLIFrameElement09.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLIFrameElement10.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLIFrameElement11.xhtml [ Crash ] -crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement01.xhtml [ Crash ] +crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement01.xhtml [ Crash Pass ] +crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement02.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement03.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement04.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement05.xhtml [ Crash ] +crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement07.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement08.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement09.xhtml [ Crash Pass ] +crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement10.xhtml [ Crash Pass ] +crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement11.xhtml [ Crash Pass ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLImageElement12.xhtml [ Crash ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLObjectElement01.xhtml [ Crash ] crbug.com/591099 dom/legacy_dom_conformance/xhtml/level2/html/HTMLObjectElement02.xhtml [ Crash ] @@ -3629,6 +3645,7 @@ crbug.com/591099 editing/inserting/insert-text-into-font.html [ Failure ] crbug.com/591099 editing/inserting/insert-text-with-newlines.html [ Crash ] crbug.com/591099 editing/inserting/insert-thai-characters-001.html [ Failure ] +crbug.com/591099 editing/inserting/insert-without-enclosing-block.html [ Crash Pass ] crbug.com/591099 editing/inserting/insert-without-inheriting-style.html [ Crash ] crbug.com/591099 editing/inserting/insert_after_delete.html [ Failure ] crbug.com/591099 editing/inserting/insert_div_with_style.html [ Failure ] @@ -3791,6 +3808,7 @@ crbug.com/591099 editing/pasteboard/smart-drag-drop.html [ Failure ] crbug.com/591099 editing/pasteboard/smart-paste-003-trailing-whitespace.html [ Crash Failure ] crbug.com/591099 editing/pasteboard/smart-paste-008.html [ Failure ] +crbug.com/591099 editing/pasteboard/smart-paste-in-text-control.html [ Failure ] crbug.com/591099 editing/pasteboard/smart_paste.html [ Failure ] crbug.com/591099 editing/pasteboard/styled-element-markup.html [ Failure ] crbug.com/591099 editing/pasteboard/subframe-dragndrop-1.html [ Crash ] @@ -4008,6 +4026,7 @@ crbug.com/591099 editing/selection/programmatic-selection-on-mac-is-directionless.html [ Crash Timeout ] crbug.com/591099 editing/selection/range-between-block-and-inline.html [ Failure ] crbug.com/591099 editing/selection/rangeCount.html [ Failure ] +crbug.com/591099 editing/selection/readonly-disabled-hittest.html [ Failure ] crbug.com/591099 editing/selection/readonly-disabled-text-selection.html [ Crash Failure ] crbug.com/591099 editing/selection/regional-indicators.html [ Failure ] crbug.com/591099 editing/selection/removeAllRanges.html [ Failure ] @@ -4102,7 +4121,7 @@ crbug.com/591099 editing/shadow/contenteditable-propagation-to-distributed-node.html [ Failure ] crbug.com/591099 editing/shadow/delete-characters-in-distributed-node-crash.html [ Failure ] crbug.com/591099 editing/shadow/delete-list-in-shadow.html [ Crash Failure ] -crbug.com/591099 editing/shadow/doubleclick-on-meter-in-shadow-crash.html [ Failure ] +crbug.com/591099 editing/shadow/doubleclick-on-meter-in-shadow-crash.html [ Crash Failure ] crbug.com/591099 editing/shadow/execcommand-indent-in-shadow.html [ Failure ] crbug.com/591099 editing/shadow/insertorderedlist-crash.html [ Crash Failure ] crbug.com/591099 editing/shadow/pressing-enter-on-list.html [ Crash Failure ] @@ -4115,6 +4134,7 @@ crbug.com/591099 editing/spelling/cold_mode_type_idle.html [ Failure ] crbug.com/591099 editing/spelling/context_click_on_selected_misspelling.html [ Timeout ] crbug.com/591099 editing/spelling/context_click_select_misspelling.html [ Crash Failure ] +crbug.com/591099 editing/spelling/grammar-edit-word.html [ Failure Pass ] crbug.com/591099 editing/spelling/grammar-paste.html [ Failure ] crbug.com/591099 editing/spelling/mixed_paste.html [ Failure ] crbug.com/591099 editing/spelling/no_marker_in_blurred_input.html [ Crash ] @@ -4219,7 +4239,7 @@ crbug.com/591099 editing/unsupported-content/table-type-before.html [ Failure ] crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html [ Crash ] crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html [ Crash ] -crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html [ Crash ] +crbug.com/591099 external/wpt/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html [ Crash Pass ] crbug.com/591099 external/wpt/2dcontext/drawing-paths-to-the-canvas/canvas_focus_drawCustomFocusRing_001.html [ Crash ] crbug.com/591099 external/wpt/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html [ Crash ] crbug.com/591099 external/wpt/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html [ Crash ] @@ -4311,8 +4331,11 @@ crbug.com/591099 external/wpt/content-security-policy/svg/svg-policy-with-resource.html [ Crash ] crbug.com/591099 external/wpt/cors/remote-origin.htm [ Crash ] crbug.com/591099 external/wpt/css/CSS2/abspos/abspos-containing-block-initial-001.xht [ Failure ] -crbug.com/591099 external/wpt/css/CSS2/abspos/abspos-containing-block-initial-007.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/abspos/abspos-containing-block-initial-007.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/abspos/abspos-containing-block-initial-009a.xht [ Failure ] +crbug.com/591099 external/wpt/css/CSS2/abspos/abspos-containing-block-initial-009f.xht [ Crash Pass ] +crbug.com/591099 external/wpt/css/CSS2/floats-clear/adjacent-floats-001.xht [ Crash Pass ] +crbug.com/591099 external/wpt/css/CSS2/floats-clear/clear-003.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/clear-applies-to-001.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/clear-applies-to-002.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/clear-applies-to-003.xht [ Failure ] @@ -4340,6 +4363,7 @@ crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-113.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-114.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-132.xht [ Failure ] +crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-133.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-138.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-141.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/floats-clear/floats-143.xht [ Failure ] @@ -4423,13 +4447,15 @@ crbug.com/591099 external/wpt/css/CSS2/linebox/line-height-129.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/linebox/line-height-bleed-001.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/linebox/line-height-bleed-002.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/linebox/vertical-align-078.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/linebox/vertical-align-121.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/linebox/vertical-align-baseline-004a.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/linebox/vertical-align-baseline-005a.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-formatting-context-height-001.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-formatting-context-height-002.xht [ Failure ] -crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-formatting-contexts-015.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-formatting-contexts-015.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001a.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001c.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-003.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-004.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-007.xht [ Failure Pass ] @@ -4442,9 +4468,11 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-margins-002a.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-margins-002b.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-percents-001.xht [ Failure ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-002.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-non-replaced-height-005.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-non-replaced-width-007.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-replaced-width-006.xht [ Failure ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/blocks-012.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/blocks-013.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/blocks-025.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/blocks-026.xht [ Failure Pass ] @@ -4486,6 +4514,7 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/height-093.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/height-114.xht [ Crash Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/height-percentage-005.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/inline-block-height-001.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/inline-block-non-replaced-height-002.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/inline-block-valign-001.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/inline-block-valign-002.xht [ Failure ] @@ -4505,6 +4534,7 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-026.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-027.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-035.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-036.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-037.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-038.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-046.xht [ Failure Pass ] @@ -4548,7 +4578,7 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-049.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-056.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-057.xht [ Failure Pass ] -crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-059.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-059.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-060.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-067.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-068.xht [ Failure Pass ] @@ -4567,8 +4597,11 @@ crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-102.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-104.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-height-106.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/min-width-095.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/root-box-001.xht [ Crash Failure ] crbug.com/591099 external/wpt/css/CSS2/normal-flow/table-in-inline-001.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/width-016.xht [ Crash Pass ] +crbug.com/591099 external/wpt/css/CSS2/normal-flow/width-057.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/absolute-non-replaced-width-019.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/positioning/absolute-non-replaced-width-020.xht [ Failure Pass ] @@ -4611,6 +4644,7 @@ crbug.com/591099 external/wpt/css/CSS2/positioning/abspos-containing-block-001.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/abspos-containing-block-002.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/abspos-containing-block-007.xht [ Crash Failure ] +crbug.com/591099 external/wpt/css/CSS2/positioning/left-044.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/positioning/left-offset-003.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/left-offset-percentage-001.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/position-relative-027.xht [ Failure ] @@ -4621,6 +4655,8 @@ crbug.com/591099 external/wpt/css/CSS2/positioning/positioning-float-002.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/relpos-calcs-004.xht [ Failure ] crbug.com/591099 external/wpt/css/CSS2/positioning/relpos-calcs-005.xht [ Crash Failure ] +crbug.com/591099 external/wpt/css/CSS2/positioning/right-079.xht [ Crash Pass ] +crbug.com/591099 external/wpt/css/CSS2/positioning/right-applies-to-002.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/CSS2/positioning/top-019.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/positioning/top-020.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/CSS2/positioning/top-031.xht [ Crash Failure ] @@ -4640,13 +4676,20 @@ crbug.com/591099 external/wpt/css/CSS2/positioning/top-113.xht [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/css-align-3/distribution-values/space-evenly-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-flex-002-inline.html [ Crash Failure ] +crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-list-001-inline.html [ Failure ] +crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-list-001-none.html [ Failure ] crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-multicol-001-inline.html [ Failure ] crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-multicol-001-none.html [ Failure ] crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-table-001-inline.html [ Crash ] +crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-table-002-inline.html [ Crash Pass ] +crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-table-002-none.html [ Crash Pass ] +crbug.com/591099 external/wpt/css/css-display-3/display-contents-list-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-display-3/display-contents-multicol-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-display-3/display-contents-replaced-001.html [ Crash Pass ] +crbug.com/591099 external/wpt/css/css-display-3/display-contents-table-002.html [ Crash Pass ] crbug.com/591099 external/wpt/css/css-display-3/display-flow-root-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/Flexible-order.html [ Crash Failure Pass ] +crbug.com/591099 external/wpt/css/css-flexbox-1/align-content-003.htm [ Crash Pass ] crbug.com/591099 external/wpt/css/css-flexbox-1/css-flexbox-row-reverse-wrap-reverse.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/css-flexbox-row-reverse-wrap.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/css-flexbox-row-wrap-reverse.html [ Failure ] @@ -4668,6 +4711,7 @@ crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_align-items-baseline.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_align-items-stretch-2.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_align-items-stretch.html [ Failure ] +crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_align-self-auto.html [ Crash Pass ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_box-clear.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_columns-flexitems-2.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_columns-flexitems.html [ Failure ] @@ -4757,10 +4801,10 @@ crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-0.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-N-shrink.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-N.html [ Failure ] -crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-Npercent-shrink.html [ Failure ] +crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-Npercent-shrink.html [ Crash Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-Npercent.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-auto-shrink.html [ Failure ] -crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-auto.html [ Failure ] +crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N-auto.html [ Crash Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-N-N.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-auto.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox-1/flexbox_flex-basis-shrink.html [ Failure ] @@ -4918,6 +4962,8 @@ crbug.com/591099 external/wpt/css/css-rhythm-1/line-height-step-dynamic-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-rhythm-1/line-height-step-valign-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-rhythm-1/line-height-step-writing-mode-vrl-001.html [ Failure ] +crbug.com/591099 external/wpt/css/css-rhythm-1/line-height-step-writing-mode-vrl-ruby-001.html [ Failure ] +crbug.com/591099 external/wpt/css/css-scoping-1/css-scoping-shadow-host-namespace.html [ Failure Pass ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/shape-box/shape-outside-box-002.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/shape-box/shape-outside-box-003.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/shape-box/shape-outside-box-004.html [ Failure ] @@ -4963,6 +5009,7 @@ crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-024.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-025.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-026.html [ Failure ] +crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-027.html [ Crash Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-028.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-029.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-030.html [ Failure ] @@ -5018,6 +5065,10 @@ crbug.com/591099 external/wpt/css/css-shapes-1/spec-examples/shape-outside-017.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/spec-examples/shape-outside-018.html [ Failure ] crbug.com/591099 external/wpt/css/css-shapes-1/spec-examples/shape-outside-019.html [ Failure ] +crbug.com/591099 external/wpt/css/css-text-3/i18n/css3-text-line-break-jazh-102.html [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-text-3/i18n/css3-text-line-break-jazh-422.html [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-text-3/i18n/css3-text-line-break-opclns-039.html [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-text-3/i18n/css3-text-line-break-opclns-161.html [ Failure Pass ] crbug.com/591099 external/wpt/css/css-text-3/overflow-wrap/overflow-wrap-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-text-3/overflow-wrap/overflow-wrap-002.html [ Failure ] crbug.com/591099 external/wpt/css/css-text-3/overflow-wrap/overflow-wrap-break-word-001.html [ Failure ] @@ -5360,9 +5411,11 @@ crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001g.html [ Crash ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001h.html [ Crash ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001i.html [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001j.html [ Crash Pass ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001k.html [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001l.html [ Crash Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001m.html [ Crash Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001n.html [ Crash Pass ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001o.html [ Crash Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001p.html [ Crash Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001q.html [ Failure ] @@ -5378,6 +5431,12 @@ crbug.com/591099 external/wpt/css/css-writing-modes-3/outline-inline-vrl-006.html [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-ltr-left-right-vlr-005.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-ltr-left-right-vrl-004.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-ltr-top-bottom-vlr-003.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-ltr-top-bottom-vrl-002.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-left-right-vlr-009.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-left-right-vrl-008.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vlr-007.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vrl-006.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/padding-vlr-005.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes-3/padding-vrl-004.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/percent-margin-vlr-003.xht [ Failure ] @@ -5398,6 +5457,7 @@ crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vlr-019.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vlr-021.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vrl-003.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vrl-006.xht [ Crash Pass ] crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vrl-007.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vrl-009.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes-3/sizing-orthog-htb-in-vrl-015.xht [ Failure ] @@ -5464,6 +5524,7 @@ crbug.com/591099 external/wpt/css/css-writing-modes-3/writing-mode-vertical-rl-003.htm [ Failure ] crbug.com/591099 external/wpt/css/geometry-1/interfaces.html [ Timeout ] crbug.com/591099 external/wpt/css/selectors4/focus-display-none-001.html [ Crash ] +crbug.com/591099 external/wpt/css/selectors4/focus-within-006.html [ Crash Pass ] crbug.com/591099 external/wpt/css/selectors4/focus-within-009.html [ Crash ] crbug.com/591099 external/wpt/css/selectors4/focus-within-display-none-001.html [ Crash ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml [ Crash Failure ] @@ -5472,6 +5533,7 @@ crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-horiz-002.xhtml [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-horiz-004.xhtml [ Crash Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-horiz-005.xhtml [ Failure ] +crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-stretch-vert-002.html [ Crash Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-vert-002.xhtml [ Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-vert-003.xhtml [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-vert-004.xhtml [ Failure ] @@ -5483,6 +5545,7 @@ crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-multi-line-vert-002.html [ Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-single-item-001a.html [ Crash Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-single-item-001b.html [ Crash Failure ] +crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-basic-block-vert-001.xhtml [ Crash Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-basic-textarea-horiz-001.xhtml [ Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-flex-wrap-horiz-002.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-002.xhtml [ Failure ] @@ -5492,6 +5555,7 @@ crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-vert-004.xhtml [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-margin-auto-horiz-001.xhtml [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-margin-auto-horiz-002.xhtml [ Failure ] +crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-001-rtl.xhtml [ Crash Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-002a.xhtml [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-002b.xhtml [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-height-auto-003.html [ Failure ] @@ -5508,15 +5572,18 @@ crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/variables/variable-declaration-16.html [ Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/variables/variable-declaration-17.html [ Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/variables/variable-declaration-18.html [ Failure Pass ] +crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/variables/variable-reference-07.html [ Crash Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/dynamic-offset-vrl-002.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/dynamic-offset-vrl-rtl-002.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-break-inside-001.html [ Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-001.html [ Crash Failure ] +crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-002.html [ Crash Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-003.html [ Crash Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-004.html [ Crash Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-005.html [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-005a.html [ Crash Failure ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-006.html [ Crash Failure ] +crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-006a.html [ Crash Failure Pass ] crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-007.html [ Crash Failure Pass ] crbug.com/591099 external/wpt/cssom-view/HTMLBody-ScrollArea_quirksmode.html [ Failure ] crbug.com/591099 external/wpt/cssom-view/elementFromPoint.html [ Crash ] @@ -5611,6 +5678,8 @@ crbug.com/591099 external/wpt/encoding/api-invalid-label.html [ Pass Timeout ] crbug.com/591099 external/wpt/encoding/textdecoder-fatal-single-byte.html [ Timeout ] crbug.com/591099 external/wpt/eventsource/eventsource-onmessage-realm.htm [ Crash ] +crbug.com/591099 external/wpt/fetch/api/redirect/redirect-location-worker.html [ Pass Timeout ] +crbug.com/591099 external/wpt/fetch/api/redirect/redirect-location.html [ Pass Timeout ] crbug.com/591099 external/wpt/fetch/api/request/multi-globals/url-parsing.html [ Crash ] crbug.com/591099 external/wpt/fetch/api/response/multi-globals/url-parsing.html [ Crash ] crbug.com/591099 external/wpt/fetch/dangling-markup-mitigation.tentative.html [ Crash ] @@ -5641,6 +5710,8 @@ crbug.com/591099 external/wpt/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub.html [ Crash ] crbug.com/591099 external/wpt/html/browsers/origin/origin-of-data-document.html [ Crash ] crbug.com/591099 external/wpt/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html [ Crash ] +crbug.com/591099 external/wpt/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html [ Crash ] +crbug.com/591099 external/wpt/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_srcdoc.html [ Crash ] crbug.com/591099 external/wpt/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_3.html [ Crash ] crbug.com/591099 external/wpt/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_4.html [ Crash ] crbug.com/591099 external/wpt/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-cross-origin-domain.sub.html [ Crash ] @@ -5702,6 +5773,7 @@ crbug.com/591099 external/wpt/html/editing/focus/focus-management/focus-event-targets-simple.html [ Crash ] crbug.com/591099 external/wpt/html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html [ Crash ] crbug.com/591099 external/wpt/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html [ Crash ] +crbug.com/591099 external/wpt/html/editing/the-hidden-attribute/hidden-1g.html [ Failure Pass ] crbug.com/591099 external/wpt/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html [ Crash ] crbug.com/591099 external/wpt/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html [ Crash ] crbug.com/591099 external/wpt/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html [ Crash ] @@ -5712,12 +5784,15 @@ crbug.com/591099 external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/utf-8.html [ Crash ] crbug.com/591099 external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html [ Crash ] crbug.com/591099 external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252.html [ Crash ] +crbug.com/591099 external/wpt/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-loop.html [ Crash Pass ] +crbug.com/591099 external/wpt/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount.html [ Crash Pass ] +crbug.com/591099 external/wpt/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrolldelay.html [ Crash Pass ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/flow-content-0/dialog.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/flow-content-0/div-align.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-s.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width.html [ Failure ] -crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html [ Failure ] -crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html [ Failure ] +crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html [ Crash Failure ] +crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html [ Failure Pass ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html [ Failure Pass ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/align.html [ Failure ] crbug.com/591099 external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/setting-overflow-visible.html [ Failure ] @@ -5807,7 +5882,7 @@ crbug.com/591099 external/wpt/html/semantics/forms/the-select-element/selected-index.html [ Crash ] crbug.com/591099 external/wpt/html/semantics/forms/the-textarea-element/textarea-newline-bidi.html [ Crash Pass ] crbug.com/591099 external/wpt/html/semantics/forms/the-textarea-element/textarea-type.html [ Crash ] -crbug.com/591099 external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1a.html [ Crash Pass ] +crbug.com/591099 external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1a.html [ Crash Failure Pass ] crbug.com/591099 external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1b.html [ Crash Pass ] crbug.com/591099 external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001.html [ Crash Failure Pass ] crbug.com/591099 external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item.html [ Crash Pass ] @@ -5973,15 +6048,17 @@ crbug.com/591099 external/wpt/pointerevents/pointerevent_attributes_hoverable_pointers-manual.html [ Crash Pass Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_attributes_nohover_pointers-manual.html [ Crash Pass Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_capture_mouse-manual.html [ Crash Timeout ] -crbug.com/591099 external/wpt/pointerevents/pointerevent_capture_suppressing_mouse-manual.html [ Crash ] +crbug.com/591099 external/wpt/pointerevents/pointerevent_capture_suppressing_mouse-manual.html [ Crash Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_change-touch-action-onpointerdown_touch-manual.html [ Pass Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_click_during_capture-manual.html [ Crash Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_disabled_form_control-manual.html [ Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_lostpointercapture_for_disconnected_node-manual.html [ Crash Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html [ Crash Timeout ] +crbug.com/591099 external/wpt/pointerevents/pointerevent_pointercancel_touch-manual.html [ Pass Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html [ Failure Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_releasepointercapture_onpointerup_mouse-manual.html [ Crash ] crbug.com/591099 external/wpt/pointerevents/pointerevent_setpointercapture_relatedtarget-manual.html [ Crash Timeout ] +crbug.com/591099 external/wpt/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-manual.html [ Pass Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_touch-action-auto-css_touch-manual.html [ Crash Pass Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_touch-action-button-test_touch-manual.html [ Crash Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html [ Crash Timeout ] @@ -6005,6 +6082,7 @@ crbug.com/591099 external/wpt/pointerevents/pointerevent_touch-action-svg-test_touch-manual.html [ Crash Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_touch-action-table-test_touch-manual.html [ Crash Timeout ] crbug.com/591099 external/wpt/quirks-mode/blocks-ignore-line-height.html [ Failure ] +crbug.com/591099 external/wpt/quirks-mode/hashless-hex-color.html [ Timeout ] crbug.com/591099 external/wpt/quirks-mode/line-height-calculation.html [ Crash ] crbug.com/591099 external/wpt/quirks-mode/table-cell-width-calculation.html [ Crash ] crbug.com/591099 external/wpt/referrer-policy/css-integration/external-import-stylesheet.html [ Crash ] @@ -6724,6 +6802,7 @@ crbug.com/591099 external/wpt/service-workers/service-worker/clients-matchall-order.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/clients-matchall.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/extendable-event-async-waituntil.https.html [ Crash ] +crbug.com/591099 external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/fetch-canvas-tainting.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/fetch-cors-xhr.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/fetch-csp.https.html [ Crash Pass ] @@ -6746,9 +6825,11 @@ crbug.com/591099 external/wpt/service-workers/service-worker/navigation-redirect.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/ready.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/register-closed-window.https.html [ Crash ] +crbug.com/591099 external/wpt/service-workers/service-worker/register-link-element.https.html [ Pass Timeout ] crbug.com/591099 external/wpt/service-workers/service-worker/register-link-header.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/register-same-scope-different-script-url.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/registration-iframe.https.html [ Crash ] +crbug.com/591099 external/wpt/service-workers/service-worker/registration.https.html [ Pass Timeout ] crbug.com/591099 external/wpt/service-workers/service-worker/unregister-controller.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/unregister-then-register-new-script.https.html [ Crash ] crbug.com/591099 external/wpt/service-workers/service-worker/unregister-then-register.https.html [ Crash ] @@ -6937,6 +7018,7 @@ crbug.com/591099 fast/block/basic/text-indent-rtl.html [ Failure ] crbug.com/591099 fast/block/basic/truncation-rtl.html [ Failure ] crbug.com/591099 fast/block/basic/white-space-pre-wraps.html [ Failure ] +crbug.com/591099 fast/block/block-add-child-crash.html [ Crash Pass ] crbug.com/591099 fast/block/block-not-removed-from-parent-lineboxes-crash.html [ Crash ] crbug.com/591099 fast/block/block-parent-with-zero-width-child.html [ Failure ] crbug.com/591099 fast/block/block-remove-child-delete-line-box-crash.html [ Failure ] @@ -6951,6 +7033,7 @@ crbug.com/591099 fast/block/float/002.html [ Crash Failure ] crbug.com/591099 fast/block/float/003.html [ Failure ] crbug.com/591099 fast/block/float/008.html [ Failure ] +crbug.com/591099 fast/block/float/009.html [ Crash Pass ] crbug.com/591099 fast/block/float/010.html [ Failure ] crbug.com/591099 fast/block/float/012.html [ Failure ] crbug.com/591099 fast/block/float/013.html [ Failure ] @@ -6995,7 +7078,7 @@ crbug.com/591099 fast/block/float/checkbox-and-radio-avoid-floats.html [ Failure ] crbug.com/591099 fast/block/float/clear-element-too-wide-for-containing-block.html [ Failure ] crbug.com/591099 fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html [ Crash Failure ] -crbug.com/591099 fast/block/float/clear-to-fit.html [ Failure ] +crbug.com/591099 fast/block/float/clear-to-fit.html [ Crash Failure ] crbug.com/591099 fast/block/float/containing-block-change-compositing.html [ Failure ] crbug.com/591099 fast/block/float/crash-on-absolute-positioning.html [ Failure ] crbug.com/591099 fast/block/float/crash-replaced-display-block.html [ Failure ] @@ -7148,6 +7231,8 @@ crbug.com/591099 fast/block/percent-top-respects-max-height.html [ Failure ] crbug.com/591099 fast/block/percent-top-respects-min-height.html [ Failure ] crbug.com/591099 fast/block/positioned-movement-assert.html [ Failure ] +crbug.com/591099 fast/block/positioning/008.html [ Crash Pass ] +crbug.com/591099 fast/block/positioning/027.html [ Crash Pass ] crbug.com/591099 fast/block/positioning/047.html [ Failure ] crbug.com/591099 fast/block/positioning/051.html [ Failure ] crbug.com/591099 fast/block/positioning/055.html [ Failure ] @@ -7195,9 +7280,11 @@ crbug.com/591099 fast/block/positioning/auto/vertical-rl/005.html [ Failure ] crbug.com/591099 fast/block/positioning/auto/vertical-rl/006.html [ Failure ] crbug.com/591099 fast/block/positioning/auto/vertical-rl/007.html [ Failure ] +crbug.com/591099 fast/block/positioning/border-change-relayout-test.html [ Crash Pass ] crbug.com/591099 fast/block/positioning/child-of-absolute-with-auto-height.html [ Failure ] crbug.com/591099 fast/block/positioning/child-of-fixed-pos-after-movement.html [ Failure ] crbug.com/591099 fast/block/positioning/complex-percentage-height.html [ Crash Failure ] +crbug.com/591099 fast/block/positioning/fixed-position-transform-related-container.html [ Crash Pass ] crbug.com/591099 fast/block/positioning/fixed-positioning-scrollbar-bug.html [ Failure ] crbug.com/591099 fast/block/positioning/flex-positioned-movement-layout-of-content-when-height-changes.html [ Failure ] crbug.com/591099 fast/block/positioning/height-change.html [ Failure ] @@ -7250,7 +7337,7 @@ crbug.com/591099 fast/body-propagation/background-color/003-declarative.xhtml [ Failure Pass ] crbug.com/591099 fast/body-propagation/background-color/003-xhtml.xhtml [ Failure Pass ] crbug.com/591099 fast/body-propagation/background-color/003.html [ Failure Pass ] -crbug.com/591099 fast/body-propagation/background-color/004-declarative.xhtml [ Failure Pass ] +crbug.com/591099 fast/body-propagation/background-color/004-declarative.xhtml [ Crash Failure Pass ] crbug.com/591099 fast/body-propagation/background-color/004-xhtml.xhtml [ Failure Pass ] crbug.com/591099 fast/body-propagation/background-color/004.html [ Failure Pass ] crbug.com/591099 fast/body-propagation/background-color/005-declarative.xhtml [ Failure Pass ] @@ -7289,7 +7376,7 @@ crbug.com/591099 fast/body-propagation/background-image/009.html [ Failure ] crbug.com/591099 fast/body-propagation/background-image/010-xhtml.xhtml [ Failure ] crbug.com/591099 fast/body-propagation/background-image/010.html [ Failure ] -crbug.com/591099 fast/body-propagation/overflow/001-xhtml.xhtml [ Failure ] +crbug.com/591099 fast/body-propagation/overflow/001-xhtml.xhtml [ Crash Failure ] crbug.com/591099 fast/body-propagation/overflow/001.html [ Failure ] crbug.com/591099 fast/body-propagation/overflow/002-xhtml.xhtml [ Failure ] crbug.com/591099 fast/body-propagation/overflow/002.html [ Failure ] @@ -7353,6 +7440,7 @@ crbug.com/591099 fast/borders/border-styles-split.html [ Failure ] crbug.com/591099 fast/borders/border-width-percent.html [ Failure ] crbug.com/591099 fast/borders/borderRadiusAllStylesAllCorners.html [ Failure ] +crbug.com/591099 fast/borders/borderRadiusDouble02.html [ Crash Pass ] crbug.com/591099 fast/borders/different-color-borders.html [ Failure ] crbug.com/591099 fast/borders/fieldsetBorderRadius.html [ Crash Failure ] crbug.com/591099 fast/borders/inline-mask-overlay-image-outset-vertical-rl.html [ Failure ] @@ -7637,6 +7725,7 @@ crbug.com/591099 fast/css-generated-content/details-before-after-content.html [ Crash Failure ] crbug.com/591099 fast/css-generated-content/drag-state.html [ Failure ] crbug.com/591099 fast/css-generated-content/empty-content-with-float-crash.html [ Failure ] +crbug.com/591099 fast/css-generated-content/empty-first-letter-with-columns-crash.html [ Crash Pass ] crbug.com/591099 fast/css-generated-content/first-letter-in-nested-before-table.html [ Failure Pass ] crbug.com/591099 fast/css-generated-content/first-letter-in-nested-before.html [ Failure ] crbug.com/591099 fast/css-generated-content/hit-test-generated-content.html [ Failure ] @@ -7936,23 +8025,31 @@ crbug.com/591099 fast/css-grid-layout/setting-node-properties-to-null-during-layout-should-not-crash.html [ Failure ] crbug.com/591099 fast/css-grid-layout/should-not-collapse-anonymous-blocks.html [ Failure ] crbug.com/591099 fast/css-grid-layout/tracks-wider-min-track-breadth-crash.html [ Failure ] +crbug.com/591099 fast/css-intrinsic-dimensions/css-tables.html [ Crash Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/fill-available-with-zero-width.html [ Crash Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/fillavailable-minmax-content-inlinesize-contribution-nonreplaced-blocks.html [ Crash Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/fit-content-container-with-replaced-child.html [ Crash Failure Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/fitcontent-minmax-content-inlinesize-contribution-nonreplaced-blocks.html [ Crash Failure ] +crbug.com/591099 fast/css-intrinsic-dimensions/fixed-height-stf-img-block-child-percent-height.html [ Failure ] +crbug.com/591099 fast/css-intrinsic-dimensions/fixed-height-stf-img-inline-child-percent-height.html [ Crash ] crbug.com/591099 fast/css-intrinsic-dimensions/height-css-tables.html [ Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/height-flexbox.html [ Failure Pass ] +crbug.com/591099 fast/css-intrinsic-dimensions/height-positioned-replaced.html [ Crash Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/height-positioned.html [ Crash Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/height-property-value.html [ Failure ] +crbug.com/591099 fast/css-intrinsic-dimensions/height-tables-collapsed.html [ Failure Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/height.html [ Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/indefinite-percent-minmax-content-inlinesize-contribution-nonreplaced-blocks.html [ Failure ] +crbug.com/591099 fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html [ Crash Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/intrinsic-sized-blocks.html [ Crash Failure Pass ] +crbug.com/591099 fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html [ Crash Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/max-width-constrained.html [ Crash Failure Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/max-width-unconstrained.html [ Crash Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/maxcontent-minmax-content-inlinesize-contribution-nonreplaced-blocks.html [ Crash Failure Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/min-width.html [ Crash Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/mincontent-minmax-content-inlinesize-contribution-nonreplaced-blocks.html [ Crash Failure Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/resize-inside-percent-width-overflow-hidden.html [ Failure ] +crbug.com/591099 fast/css-intrinsic-dimensions/tables.html [ Crash Pass ] crbug.com/591099 fast/css-intrinsic-dimensions/width-avoid-floats.html [ Crash Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/width-property-value.html [ Failure ] crbug.com/591099 fast/css-intrinsic-dimensions/width-shrinks-avoid-floats.html [ Crash Failure ] @@ -8186,7 +8283,7 @@ crbug.com/591099 fast/css/focus-ring-continuations.html [ Failure ] crbug.com/591099 fast/css/focus-ring-detached.html [ Failure ] crbug.com/591099 fast/css/focus-ring-multiline-writingmode-vertical.html [ Failure ] -crbug.com/591099 fast/css/focus-ring-multiline.html [ Failure ] +crbug.com/591099 fast/css/focus-ring-multiline.html [ Crash Failure ] crbug.com/591099 fast/css/focus-ring-outline-color.html [ Crash Failure ] crbug.com/591099 fast/css/focus-ring-outline-offset.html [ Failure ] crbug.com/591099 fast/css/focus-ring-outline-width.html [ Failure ] @@ -8462,7 +8559,7 @@ crbug.com/591099 fast/css/live-cssrules.html [ Failure Pass ] crbug.com/591099 fast/css/margin-bottom-form-element-quirk.html [ Failure ] crbug.com/591099 fast/css/margin-bottom-form-element-strict.html [ Failure Pass ] -crbug.com/591099 fast/css/margin-collapse-013-reduction.html [ Failure ] +crbug.com/591099 fast/css/margin-collapse-013-reduction.html [ Crash Failure ] crbug.com/591099 fast/css/margin-collapse-top-margin-clearance-with-sibling.html [ Failure ] crbug.com/591099 fast/css/margin-collapse-top-margin-clearance.html [ Failure ] crbug.com/591099 fast/css/margin-start-end.html [ Failure ] @@ -8670,6 +8767,7 @@ crbug.com/591099 fast/css/shorthands-four-values.html [ Failure ] crbug.com/591099 fast/css/sibling-selectors.html [ Failure ] crbug.com/591099 fast/css/simple-selector-chain-parsing.html [ Failure Pass ] +crbug.com/591099 fast/css/small-caps-crash.html [ Crash Pass ] crbug.com/591099 fast/css/square-button-appearance.html [ Failure Pass ] crbug.com/591099 fast/css/stale-style-selector-crash-1.html [ Failure ] crbug.com/591099 fast/css/stale-style-selector-crash-2.html [ Failure ] @@ -8704,6 +8802,7 @@ crbug.com/591099 fast/css/stylesheet-enable-second-alternate-on-load-link.html [ Failure ] crbug.com/591099 fast/css/stylesheet-enable-second-alternate-on-load-sheet.html [ Failure ] crbug.com/591099 fast/css/table-border-spacing.html [ Failure ] +crbug.com/591099 fast/css/table-rules-attribute.html [ Failure Pass ] crbug.com/591099 fast/css/table-text-align-quirk.html [ Failure ] crbug.com/591099 fast/css/table-text-align-strict.html [ Failure Pass ] crbug.com/591099 fast/css/target-fragment-match.html [ Failure ] @@ -8779,6 +8878,7 @@ crbug.com/591099 fast/css/zoom-in-length-round-trip.html [ Failure ] crbug.com/591099 fast/css/zoom-on-nested-scroll-crash.html [ Failure ] crbug.com/591099 fast/css/zoom-property-parsing.html [ Failure ] +crbug.com/591099 fast/css/zoomed-intrinsic-width.html [ Crash Pass ] crbug.com/591099 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html [ Failure ] crbug.com/591099 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html [ Failure ] crbug.com/591099 fast/css3-text/css3-text-align-last/text-align-last.html [ Failure ] @@ -8795,6 +8895,7 @@ crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-first-line-decoration.html [ Crash Failure ] crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-auto.html [ Failure ] crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk.html [ Crash Failure ] +crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-mixed-fonts.html [ Crash Pass ] crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-out-of-flow.html [ Failure ] crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vertical.html [ Failure Pass ] crbug.com/591099 fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under.html [ Failure ] @@ -8826,7 +8927,7 @@ crbug.com/591099 fast/deprecated-flexbox/011.html [ Failure ] crbug.com/591099 fast/deprecated-flexbox/012.html [ Failure ] crbug.com/591099 fast/deprecated-flexbox/013.html [ Failure ] -crbug.com/591099 fast/deprecated-flexbox/014.html [ Failure ] +crbug.com/591099 fast/deprecated-flexbox/014.html [ Crash Failure ] crbug.com/591099 fast/deprecated-flexbox/015.html [ Failure ] crbug.com/591099 fast/deprecated-flexbox/017.html [ Failure ] crbug.com/591099 fast/deprecated-flexbox/018.html [ Failure ] @@ -8854,6 +8955,7 @@ crbug.com/591099 fast/deprecated-flexbox/vertical-box-form-controls.html [ Failure ] crbug.com/591099 fast/dnd/dropEffect-for-file.html [ Crash ] crbug.com/591099 fast/dnd/dropEffect-for-image.html [ Timeout ] +crbug.com/591099 fast/dnd/event-mouse-coordinates.html [ Pass Timeout ] crbug.com/591099 fast/dnd/link-dragging-draggable-div-with-dragged-link.html [ Timeout ] crbug.com/591099 fast/dnd/link-dragging-draggable-div-with-link.html [ Timeout ] crbug.com/591099 fast/dnd/link-dragging-draggable-link.html [ Timeout ] @@ -8918,6 +9020,7 @@ crbug.com/591099 fast/dom/Document/title-property-creates-title-element.html [ Failure ] crbug.com/591099 fast/dom/Document/title-property-set-multiple-times.html [ Failure ] crbug.com/591099 fast/dom/Document/title-with-multiple-children.html [ Failure ] +crbug.com/591099 fast/dom/Document/xml-document-focus.xml [ Failure Pass ] crbug.com/591099 fast/dom/DocumentFragment/document-fragment-constructor.html [ Failure ] crbug.com/591099 fast/dom/DocumentFragment/get-element-by-id.html [ Failure ] crbug.com/591099 fast/dom/DocumentFragment/parent-node-interface.html [ Failure ] @@ -9828,8 +9931,10 @@ crbug.com/591099 fast/dom/shadow/hostcontext-first-child.html [ Failure ] crbug.com/591099 fast/dom/shadow/hostcontext-pseudo-class.html [ Failure ] crbug.com/591099 fast/dom/shadow/iframe-shadow.html [ Failure ] +crbug.com/591099 fast/dom/shadow/import-rule-in-shadow-tree-needs-document-style-recalc.html [ Failure Pass ] crbug.com/591099 fast/dom/shadow/inner-scope-important-wins.html [ Failure ] crbug.com/591099 fast/dom/shadow/input-shadow-nochange.html [ Failure ] +crbug.com/591099 fast/dom/shadow/make-marquee-bold-by-exec-command-crash.html [ Crash Pass ] crbug.com/591099 fast/dom/shadow/move-style-scoped-to-another-shadowroot-crash.html [ Failure ] crbug.com/591099 fast/dom/shadow/multiple-host-pseudos-in-compound.html [ Failure ] crbug.com/591099 fast/dom/shadow/multiple-shadowroot-adopt.html [ Failure ] @@ -10005,6 +10110,7 @@ crbug.com/591099 fast/dynamic/positioned-movement-with-positioned-children.html [ Failure ] crbug.com/591099 fast/dynamic/recursive-layout.html [ Failure ] crbug.com/591099 fast/dynamic/selection-highlight-adjust.html [ Failure ] +crbug.com/591099 fast/dynamic/static-to-relative-with-absolute-child.html [ Crash Pass ] crbug.com/591099 fast/dynamic/staticY-marking-parents-regression.html [ Failure ] crbug.com/591099 fast/dynamic/staticY.html [ Failure Pass ] crbug.com/591099 fast/dynamic/subtree-boundary-percent-height.html [ Failure ] @@ -10147,7 +10253,11 @@ crbug.com/591099 fast/events/clear-drag-state.html [ Failure ] crbug.com/591099 fast/events/clear-edit-drag-state.html [ Failure ] crbug.com/591099 fast/events/click-after-mousedown-cancel.html [ Failure ] +crbug.com/591099 fast/events/click-anchor-refocus-window.html [ Failure Pass ] +crbug.com/591099 fast/events/click-checkbox-blur-refocus-window.html [ Failure Pass ] +crbug.com/591099 fast/events/click-checkbox-refocus-window.html [ Failure Pass ] crbug.com/591099 fast/events/click-focus-anchor.html [ Failure ] +crbug.com/591099 fast/events/click-focus-keydown-no-ring.html [ Failure Pass ] crbug.com/591099 fast/events/click-focus-svganchor-has-ring.html [ Failure ] crbug.com/591099 fast/events/click-over-descendant-elements.html [ Crash ] crbug.com/591099 fast/events/click-range-slider.html [ Failure ] @@ -10348,6 +10458,7 @@ crbug.com/591099 fast/events/keyevent-iframe-removed-crash.html [ Failure ] crbug.com/591099 fast/events/keypress-focus-change.html [ Failure ] crbug.com/591099 fast/events/keypress-removed-node.html [ Crash ] +crbug.com/591099 fast/events/label-focus.html [ Failure Pass ] crbug.com/591099 fast/events/main-world-does-not-override-keystate.html [ Failure ] crbug.com/591099 fast/events/max-tabindex-focus.html [ Crash ] crbug.com/591099 fast/events/media-element-focus-tab.html [ Failure ] @@ -10438,6 +10549,7 @@ crbug.com/591099 fast/events/node-event-anchor-lock.html [ Failure Pass ] crbug.com/591099 fast/events/offsetX-offsetY-svg.html [ Crash ] crbug.com/591099 fast/events/offsetX-offsetY.html [ Failure ] +crbug.com/591099 fast/events/onbeforeunload-focused-iframe.html [ Failure ] crbug.com/591099 fast/events/onblur-remove.html [ Crash ] crbug.com/591099 fast/events/onchange-passwordfield.html [ Failure ] crbug.com/591099 fast/events/onchange-range-slider.html [ Failure ] @@ -10674,6 +10786,7 @@ crbug.com/591099 fast/events/touch/multi-touch-inside-nested-iframes.html [ Failure ] crbug.com/591099 fast/events/touch/multi-touch-partial-sequence.html [ Failure ] crbug.com/591099 fast/events/touch/page-scaled-touch-gesture-click.html [ Failure ] +crbug.com/591099 fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html [ Failure Pass ] crbug.com/591099 fast/events/touch/send-oncancel-event.html [ Failure ] crbug.com/591099 fast/events/touch/tap-highlight-color.html [ Failure ] crbug.com/591099 fast/events/touch/touch-action-range-input-crash.html [ Crash ] @@ -10933,6 +11046,7 @@ crbug.com/591099 fast/forms/checkValidity.html [ Crash Pass ] crbug.com/591099 fast/forms/checkbox/checkbox-appearance-basic.html [ Failure ] crbug.com/591099 fast/forms/checkbox/checkbox-click-indeterminate.html [ Failure ] +crbug.com/591099 fast/forms/checkbox/checkbox-focus-by-mouse.html [ Failure Pass ] crbug.com/591099 fast/forms/checkbox/checkbox-nested-click-event-on-label.html [ Failure ] crbug.com/591099 fast/forms/checkbox/checkbox-onchange.html [ Failure ] crbug.com/591099 fast/forms/clone-input-with-dirty-value.html [ Crash Failure ] @@ -11071,6 +11185,8 @@ crbug.com/591099 fast/forms/fieldset/inline-ignored-on-legend.html [ Failure ] crbug.com/591099 fast/forms/fieldset/legend-absolute-position-auto-width.html [ Failure ] crbug.com/591099 fast/forms/fieldset/legend-access-key.html [ Crash Failure ] +crbug.com/591099 fast/forms/fieldset/legend-after-margin-horizontal-writing-mode.html [ Failure ] +crbug.com/591099 fast/forms/fieldset/legend-after-margin-vertical-writing-mode.html [ Failure ] crbug.com/591099 fast/forms/fieldset/legend-after-margin-with-before-border-horizontal-mode.html [ Failure ] crbug.com/591099 fast/forms/fieldset/legend-display-none.html [ Failure ] crbug.com/591099 fast/forms/fieldset/legend-form.html [ Failure ] @@ -11305,6 +11421,7 @@ crbug.com/591099 fast/forms/number/number-input-changeevent.html [ Crash ] crbug.com/591099 fast/forms/number/number-interactive-validation-required.html [ Crash Failure ] crbug.com/591099 fast/forms/number/number-keyoperation.html [ Crash Failure ] +crbug.com/591099 fast/forms/number/number-losing-renderer-on-click.html [ Crash ] crbug.com/591099 fast/forms/number/number-outofrange.html [ Crash ] crbug.com/591099 fast/forms/number/number-setrangetext.html [ Failure ] crbug.com/591099 fast/forms/number/number-size.html [ Failure Timeout ] @@ -11452,22 +11569,29 @@ crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-fractional-width.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-long.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-many.html [ Failure ] +crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-minimum-font.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-rtl-default.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-rtl.html [ Failure ] +crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-single-option.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-styled.html [ Failure ] +crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-texttransform.html [ Failure ] +crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-transform.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-zoom.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-zoom090.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-zoom110.html [ Failure ] +crbug.com/591099 fast/forms/select-popup/popup-menu-appearance.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-ax.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-crash-on-cancel.html [ Crash ] crbug.com/591099 fast/forms/select-popup/popup-menu-crash-on-close.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-crash-on-select.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-crash-on-style-update.html [ Crash ] +crbug.com/591099 fast/forms/select-popup/popup-menu-key-operations.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-mouse-operations.html [ Failure ] crbug.com/591099 fast/forms/select-popup/popup-menu-nested-style.html [ Failure ] +crbug.com/591099 fast/forms/select-popup/popup-menu-open-partially-visible.html [ Pass Timeout ] crbug.com/591099 fast/forms/select-popup/popup-menu-touch-operations.html [ Failure Timeout ] crbug.com/591099 fast/forms/select-popup/popup-menu-update-from-element.html [ Failure ] -crbug.com/591099 fast/forms/select/003.html [ Failure ] +crbug.com/591099 fast/forms/select/003.html [ Crash Failure ] crbug.com/591099 fast/forms/select/004.html [ Failure ] crbug.com/591099 fast/forms/select/HTMLOptionElement_label01.html [ Failure ] crbug.com/591099 fast/forms/select/HTMLOptionElement_label02.html [ Failure ] @@ -11488,7 +11612,7 @@ crbug.com/591099 fast/forms/select/disabled-select-change-index.html [ Failure ] crbug.com/591099 fast/forms/select/exceptions.html [ Failure ] crbug.com/591099 fast/forms/select/hidden-listbox.html [ Failure ] -crbug.com/591099 fast/forms/select/input-select-after-resize.html [ Crash Failure Timeout ] +crbug.com/591099 fast/forms/select/input-select-after-resize.html [ Crash Failure Pass Timeout ] crbug.com/591099 fast/forms/select/listbox-appearance-basic.html [ Failure ] crbug.com/591099 fast/forms/select/listbox-appearance-separator.html [ Failure ] crbug.com/591099 fast/forms/select/listbox-bidi-align.html [ Failure ] @@ -11820,6 +11944,7 @@ crbug.com/591099 fast/forms/text/text-window-lost-focus-change-event.html [ Failure Timeout ] crbug.com/591099 fast/forms/text/textfield-focus-out.html [ Crash ] crbug.com/591099 fast/forms/text/textfield-focus-ring.html [ Failure ] +crbug.com/591099 fast/forms/text/textfield-onchange-deletion.html [ Crash ] crbug.com/591099 fast/forms/text/textfield-outline.html [ Crash Failure ] crbug.com/591099 fast/forms/text/textfield-overflow-by-value-update.html [ Crash Failure ] crbug.com/591099 fast/forms/text/textfield-overflow.html [ Failure ] @@ -12057,6 +12182,7 @@ crbug.com/591099 fast/frames/iframe-set-same-location.html [ Failure ] crbug.com/591099 fast/frames/iframe-set-same-src.html [ Failure ] crbug.com/591099 fast/frames/iframe-text-contents.html [ Failure ] +crbug.com/591099 fast/frames/iframe-window-focus.html [ Failure Pass ] crbug.com/591099 fast/frames/iframe-with-frameborder.html [ Failure ] crbug.com/591099 fast/frames/inline-object-inside-frameset.html [ Failure ] crbug.com/591099 fast/frames/invalid.html [ Failure ] @@ -12215,6 +12341,7 @@ crbug.com/591099 fast/history/redirect-via-iframe.html [ Failure ] crbug.com/591099 fast/history/same-document-iframes-changing-fragment.html [ Crash ] crbug.com/591099 fast/history/same-document-iframes-changing-pushstate.html [ Crash ] +crbug.com/591099 fast/history/saves-state-after-frame-nav.html [ Failure ] crbug.com/591099 fast/history/scroll-restoration/scroll-restoration-fragment-navigation-crossdoc.html [ Crash ] crbug.com/591099 fast/history/scroll-restoration/scroll-restoration-navigation.html [ Crash ] crbug.com/591099 fast/history/scroll-restoration/scroll-restoration-push-replace.html [ Failure Pass ] @@ -12301,9 +12428,11 @@ crbug.com/591099 fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html [ Failure ] crbug.com/591099 fast/inline/fixed-pos-moves-with-abspos-parent.html [ Failure ] crbug.com/591099 fast/inline/fixed-pos-with-transform-container-moves-with-abspos-parent.html [ Failure ] +crbug.com/591099 fast/inline/inline-body-crash.html [ Crash Pass ] crbug.com/591099 fast/inline/inline-body-with-inline-child.html [ Failure ] crbug.com/591099 fast/inline/inline-borders-with-bidi-override.html [ Failure ] crbug.com/591099 fast/inline/inline-box-adjust-position-crash.html [ Crash ] +crbug.com/591099 fast/inline/inline-box-append-child-crash.html [ Crash Pass ] crbug.com/591099 fast/inline/inline-box-background-long-image.html [ Failure ] crbug.com/591099 fast/inline/inline-box-background-repeat-x.html [ Failure ] crbug.com/591099 fast/inline/inline-box-background-repeat-y.html [ Failure ] @@ -12640,6 +12769,7 @@ crbug.com/591099 fast/layers/layer-visibility.html [ Failure ] crbug.com/591099 fast/layers/negative-scroll-positions.html [ Failure ] crbug.com/591099 fast/layers/nested-layers-1.html [ Failure Pass ] +crbug.com/591099 fast/layers/no-clipping-overflow-hidden-added-after-transform.html [ Failure Pass ] crbug.com/591099 fast/layers/normal-flow-hit-test.html [ Failure ] crbug.com/591099 fast/layers/opacity-change-stacking-context.html [ Failure ] crbug.com/591099 fast/layers/opacity-outline.html [ Failure ] @@ -12653,7 +12783,7 @@ crbug.com/591099 fast/layers/remove-only-this-layer-update.html [ Failure ] crbug.com/591099 fast/layers/removed-by-scroll-handler.html [ Failure Timeout ] crbug.com/591099 fast/layers/resize-layer-deletion-crash.html [ Failure ] -crbug.com/591099 fast/layers/scroll-no-visible-content-but-visible-descendant.html [ Failure Pass ] +crbug.com/591099 fast/layers/scroll-no-visible-content-but-visible-descendant.html [ Crash Failure Pass ] crbug.com/591099 fast/layers/scroll-rect-to-visible.html [ Failure ] crbug.com/591099 fast/layers/scroll-with-transform-composited-layer.html [ Failure Pass ] crbug.com/591099 fast/layers/scroll-with-transform-layer.html [ Failure Pass ] @@ -12835,6 +12965,7 @@ crbug.com/591099 fast/masking/parsing-mask.html [ Failure ] crbug.com/591099 fast/media/lifetime.html [ Crash Failure ] crbug.com/591099 fast/media/matchmedium-query-api.html [ Failure ] +crbug.com/591099 fast/media/media-feature-monochrome.html [ Crash Pass ] crbug.com/591099 fast/media/media-query-list-01.html [ Failure ] crbug.com/591099 fast/media/media-query-list-callback.html [ Failure ] crbug.com/591099 fast/media/media-query-list-dom-events.html [ Failure ] @@ -12847,6 +12978,7 @@ crbug.com/591099 fast/media/mq-color-gamut-picture.html [ Crash Failure ] crbug.com/591099 fast/media/mq-display-mode-fullscreen.html [ Failure ] crbug.com/591099 fast/media/mq-display-mode.html [ Failure ] +crbug.com/591099 fast/media/mq-grid-02.html [ Crash Pass ] crbug.com/591099 fast/media/mq-hover.html [ Failure ] crbug.com/591099 fast/media/mq-pixel-ratio-print.html [ Failure ] crbug.com/591099 fast/media/mq-pointer.html [ Failure ] @@ -12875,6 +13007,7 @@ crbug.com/591099 fast/mediastream/no-interface-object.html [ Failure ] crbug.com/591099 fast/multicol/5-levels-of-nesting-crash.html [ Failure ] crbug.com/591099 fast/multicol/abspos-after-break-after.html [ Failure ] +crbug.com/591099 fast/multicol/anonymous-block-split-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/auto-height-forced-break-complex-margin-collapsing.html [ Failure ] crbug.com/591099 fast/multicol/balance-break-inside-avoid.html [ Failure ] crbug.com/591099 fast/multicol/balance-breakafter-before-nested-block.html [ Failure ] @@ -12905,6 +13038,7 @@ crbug.com/591099 fast/multicol/client-rects-rtl.html [ Failure ] crbug.com/591099 fast/multicol/client-rects-sole-empty-block.html [ Failure ] crbug.com/591099 fast/multicol/client-rects.html [ Failure ] +crbug.com/591099 fast/multicol/clone-block-children-inline-mismatch-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/column-break-with-balancing.html [ Failure ] crbug.com/591099 fast/multicol/column-count-with-rules.html [ Failure ] crbug.com/591099 fast/multicol/column-rules.html [ Failure ] @@ -12931,6 +13065,8 @@ crbug.com/591099 fast/multicol/dynamic/change-block-with-inline-to-multicol-assert.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/change-second-row-height.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/change-spanner-display.html [ Crash Failure ] +crbug.com/591099 fast/multicol/dynamic/change-spanner-parent-display.html [ Crash Pass ] +crbug.com/591099 fast/multicol/dynamic/former-spanner-in-float-in-continuation-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/dynamic/insert-before-sole-abspos.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/insert-block-among-text-in-anonymous-wrapper.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/insert-block-before-spanner-before-content.html [ Failure ] @@ -12952,6 +13088,8 @@ crbug.com/591099 fast/multicol/dynamic/insert-spanner-pseudo-before.html [ Crash Failure ] crbug.com/591099 fast/multicol/dynamic/invalid-spanner-container-becomes-valid.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/multicol-with-abspos-svg-with-foreignobject-with-multicol-crash.html [ Failure ] +crbug.com/591099 fast/multicol/dynamic/relpos-becomes-static-has-abspos.html [ Crash Pass ] +crbug.com/591099 fast/multicol/dynamic/remove-abspos-next-to-spanner.html [ Crash Pass ] crbug.com/591099 fast/multicol/dynamic/remove-content-before-inner-multicol-with-spanner-crash.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/remove-content-from-scrollable.html [ Failure ] crbug.com/591099 fast/multicol/dynamic/remove-inline-and-spanner-after-spanner-foreignObject.html [ Failure ] @@ -13001,6 +13139,7 @@ crbug.com/591099 fast/multicol/float-with-margin-moved-by-child-line-and-unbreakable.html [ Failure ] crbug.com/591099 fast/multicol/float-with-margin-moved-by-child-line.html [ Failure ] crbug.com/591099 fast/multicol/float-with-margin-moved-unbreakable.html [ Failure ] +crbug.com/591099 fast/multicol/flowthread-with-floats-destroyed-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/forced-break-after-block-with-spanner.html [ Crash Failure ] crbug.com/591099 fast/multicol/forced-break-after-last-block-before-spanner.html [ Failure ] crbug.com/591099 fast/multicol/forced-break-before-complex-margin-collapsing.html [ Failure ] @@ -13014,12 +13153,15 @@ crbug.com/591099 fast/multicol/hit-test-gap-between-pages.html [ Crash Failure ] crbug.com/591099 fast/multicol/image-inside-nested-blocks-with-border.html [ Failure ] crbug.com/591099 fast/multicol/image-loaded-before-layout-assert.html [ Failure ] +crbug.com/591099 fast/multicol/infinite-height-causing-fractional-row-height-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/infinitely-tall-content-in-outer-crash.html [ Failure ] crbug.com/591099 fast/multicol/inline-children-crash.html [ Failure ] crbug.com/591099 fast/multicol/inner-multicol-moved-into-continuation.html [ Failure ] crbug.com/591099 fast/multicol/input-as-multicol.html [ Crash Failure Pass ] crbug.com/591099 fast/multicol/input-type-number.html [ Crash Pass ] +crbug.com/591099 fast/multicol/large-padding-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/layers-split-across-columns.html [ Failure ] +crbug.com/591099 fast/multicol/less-than-one-pixel-tall-layer-at-column-top.html [ Crash Pass ] crbug.com/591099 fast/multicol/line-pushed-down-by-float.html [ Failure ] crbug.com/591099 fast/multicol/many-lines-overflow-in-single-row-inner.html [ Failure ] crbug.com/591099 fast/multicol/margin-bottom-and-break-after.html [ Failure ] @@ -13053,6 +13195,7 @@ crbug.com/591099 fast/multicol/nested-with-composited-and-multicol-crash.html [ Failure ] crbug.com/591099 fast/multicol/nested-with-forced-breaks-in-eariler-rows.html [ Failure ] crbug.com/591099 fast/multicol/nested-with-line-taller-than-outer.html [ Failure ] +crbug.com/591099 fast/multicol/nested-with-spanner-inside-margins-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/newmulticol/balance-images.html [ Failure ] crbug.com/591099 fast/multicol/newmulticol/balance-maxheight1.html [ Failure ] crbug.com/591099 fast/multicol/newmulticol/balance-maxheight2.html [ Failure ] @@ -13092,6 +13235,7 @@ crbug.com/591099 fast/multicol/pageLogicalOffset-vertical.html [ Failure ] crbug.com/591099 fast/multicol/paged-becomes-multicol-auto-height.html [ Crash Failure Pass ] crbug.com/591099 fast/multicol/paged-becomes-multicol-fixed-height.html [ Crash Pass ] +crbug.com/591099 fast/multicol/paged-becomes-multicol-with-spanner.html [ Failure ] crbug.com/591099 fast/multicol/paged-in-multicol-crash.html [ Crash Failure ] crbug.com/591099 fast/multicol/paginated-layer-crash.html [ Failure ] crbug.com/591099 fast/multicol/percent-height.html [ Failure ] @@ -13128,10 +13272,15 @@ crbug.com/591099 fast/multicol/span/button-with-spanner-crash.html [ Failure ] crbug.com/591099 fast/multicol/span/change-spanner-margins.html [ Failure ] crbug.com/591099 fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html [ Crash Failure ] +crbug.com/591099 fast/multicol/span/clone-before-after-content-crash.html [ Crash Pass ] +crbug.com/591099 fast/multicol/span/empty-anonymous-block-split-crash.html [ Crash Pass ] +crbug.com/591099 fast/multicol/span/empty-block-between-spanners.html [ Crash Pass ] +crbug.com/591099 fast/multicol/span/empty-block-with-bottom-margin-between-spanners.html [ Crash Pass ] crbug.com/591099 fast/multicol/span/fill-after-spanner-exact-fit.html [ Failure ] crbug.com/591099 fast/multicol/span/fill-after-spanner-extra-height.html [ Failure ] crbug.com/591099 fast/multicol/span/float.html [ Failure ] crbug.com/591099 fast/multicol/span/foreignObject.html [ Failure ] +crbug.com/591099 fast/multicol/span/generated-child-split-flow-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/span/in-nested-multicol-with-hard-breaks.html [ Failure ] crbug.com/591099 fast/multicol/span/in-nested-multicol-with-list-item.html [ Failure ] crbug.com/591099 fast/multicol/span/in-nested-multicol-with-soft-breaks-inside.html [ Failure ] @@ -13142,6 +13291,7 @@ crbug.com/591099 fast/multicol/span/inside-overflow-hidden-crash.html [ Failure ] crbug.com/591099 fast/multicol/span/invalid-span-1.html [ Failure ] crbug.com/591099 fast/multicol/span/margin-on-multicol.html [ Failure ] +crbug.com/591099 fast/multicol/span/multicol-with-spanner-becomes-regular-block.html [ Crash Pass ] crbug.com/591099 fast/multicol/span/nested-multicol.html [ Failure ] crbug.com/591099 fast/multicol/span/offset-properties.html [ Failure ] crbug.com/591099 fast/multicol/span/outer-column-break-after-inner-spanner-2.html [ Crash Failure ] @@ -13162,6 +13312,7 @@ crbug.com/591099 fast/multicol/span/relpos-in-block.html [ Crash Failure ] crbug.com/591099 fast/multicol/span/relpos-spanner-with-abspos-child.html [ Failure ] crbug.com/591099 fast/multicol/span/remaining-space-in-last-column.html [ Failure Pass ] +crbug.com/591099 fast/multicol/span/runin-continuation-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/span/simple-margins.html [ Failure ] crbug.com/591099 fast/multicol/span/sole-spanner-inside-div.html [ Failure ] crbug.com/591099 fast/multicol/span/sole-svg-spanner-with-foreignObject-crash.html [ Failure ] @@ -13169,10 +13320,12 @@ crbug.com/591099 fast/multicol/span/spanner-img.html [ Crash Failure ] crbug.com/591099 fast/multicol/span/spanner-in-flexbox-in-multicol-in-flexbox-crash.html [ Failure ] crbug.com/591099 fast/multicol/span/spanner-inline-block.html [ Failure ] +crbug.com/591099 fast/multicol/span/spanner-table.html [ Crash Pass ] crbug.com/591099 fast/multicol/span/spanner-with-margin.html [ Crash Failure ] crbug.com/591099 fast/multicol/span/summary-split.html [ Failure ] crbug.com/591099 fast/multicol/span/two-rows-then-spanner-then-two-rows.html [ Failure ] crbug.com/591099 fast/multicol/span/underflow-after-spanner.html [ Crash Failure ] +crbug.com/591099 fast/multicol/span/update-after-content-before-child-crash.html [ Crash Pass ] crbug.com/591099 fast/multicol/span/vertical-lr.html [ Failure ] crbug.com/591099 fast/multicol/span/vertical-rl.html [ Failure ] crbug.com/591099 fast/multicol/table-caption-and-cells-fixed-width.html [ Failure ] @@ -13213,7 +13366,7 @@ crbug.com/591099 fast/multicol/vertical-lr/float-truncation.html [ Failure ] crbug.com/591099 fast/multicol/vertical-lr/gap-non-negative.html [ Failure ] crbug.com/591099 fast/multicol/vertical-lr/image-inside-nested-blocks-with-border.html [ Failure ] -crbug.com/591099 fast/multicol/vertical-lr/nested-columns.html [ Failure ] +crbug.com/591099 fast/multicol/vertical-lr/nested-columns.html [ Crash Failure ] crbug.com/591099 fast/multicol/vertical-lr/unsplittable-inline-block.html [ Failure ] crbug.com/591099 fast/multicol/vertical-rl/abspos-auto-position-on-line.html [ Failure ] crbug.com/591099 fast/multicol/vertical-rl/balancing/balance-short-trailing-empty-block.html [ Failure ] @@ -13297,6 +13450,7 @@ crbug.com/591099 fast/overflow/resize-inherit.html [ Failure ] crbug.com/591099 fast/overflow/scroll-div-hide-show.html [ Failure ] crbug.com/591099 fast/overflow/scroll-html-hidden-body.html [ Failure Pass ] +crbug.com/591099 fast/overflow/scroll-html-paged-body.html [ Crash Pass ] crbug.com/591099 fast/overflow/scroll-nested-positioned-layer-in-overflow.html [ Failure ] crbug.com/591099 fast/overflow/scroll-vertical-not-horizontal.html [ Failure ] crbug.com/591099 fast/overflow/scrollRevealButton.html [ Failure ] @@ -13309,6 +13463,7 @@ crbug.com/591099 fast/overflow/trailing-float-linebox.html [ Failure ] crbug.com/591099 fast/overflow/unreachable-overflow-rtl-bug.html [ Failure ] crbug.com/591099 fast/pagination/auto-height-with-break.html [ Crash Failure ] +crbug.com/591099 fast/pagination/auto-height.html [ Crash Failure ] crbug.com/591099 fast/pagination/body-make-unpaginated.html [ Failure ] crbug.com/591099 fast/pagination/break-in-paged-overflow.html [ Crash Failure ] crbug.com/591099 fast/pagination/caret-range-outside-paged-x-rtl-vertical-rl.html [ Crash Failure ] @@ -13318,6 +13473,7 @@ crbug.com/591099 fast/pagination/caret-range-outside-paged-y-rtl-vertical-rl.html [ Crash Failure ] crbug.com/591099 fast/pagination/caret-range-outside-paged-y-rtl.html [ Crash Failure ] crbug.com/591099 fast/pagination/caret-range-outside-paged-y.html [ Crash Failure ] +crbug.com/591099 fast/pagination/div-make-paginated.html [ Crash Pass ] crbug.com/591099 fast/pagination/div-x-horizontal-tb-ltr.html [ Crash Failure ] crbug.com/591099 fast/pagination/div-x-horizontal-tb-rtl.html [ Crash Failure ] crbug.com/591099 fast/pagination/div-x-vertical-lr-ltr.html [ Crash Failure ] @@ -13547,7 +13703,7 @@ crbug.com/591099 fast/replaced/replaced-element-with-percentage-height-anonymous-block-parent.html [ Failure ] crbug.com/591099 fast/replaced/replaced-last-line-layout.html [ Crash Pass ] crbug.com/591099 fast/replaced/selection-rect-in-table-cell.html [ Failure ] -crbug.com/591099 fast/replaced/selection-rect-transform.html [ Failure ] +crbug.com/591099 fast/replaced/selection-rect-transform.html [ Crash Failure ] crbug.com/591099 fast/replaced/selection-rect.html [ Failure ] crbug.com/591099 fast/replaced/table-percent-height-text-controls.html [ Failure ] crbug.com/591099 fast/replaced/table-percent-height.html [ Failure ] @@ -13566,9 +13722,12 @@ crbug.com/591099 fast/ruby/add-text-to-block-ruby-with-after-pseudo-crash.html [ Crash Pass ] crbug.com/591099 fast/ruby/after-doesnt-crash.html [ Crash Failure ] crbug.com/591099 fast/ruby/base-shorter-than-text.html [ Crash Failure ] +crbug.com/591099 fast/ruby/before-block-doesnt-crash.html [ Crash Pass ] crbug.com/591099 fast/ruby/before-doesnt-crash.html [ Crash Failure ] +crbug.com/591099 fast/ruby/before-table-doesnt-crash.html [ Crash Pass ] crbug.com/591099 fast/ruby/float-overhang-from-ruby-text.html [ Crash Failure ] crbug.com/591099 fast/ruby/floating-ruby-text.html [ Crash Failure ] +crbug.com/591099 fast/ruby/generated-before-counter-doesnt-crash.html [ Crash Failure ] crbug.com/591099 fast/ruby/line-break-ruby.html [ Crash ] crbug.com/591099 fast/ruby/list-item-marker-in-block-ruby.html [ Crash Failure ] crbug.com/591099 fast/ruby/merge-adjacent-anonymous-blocks-inside-ruby-run.html [ Crash Failure ] @@ -13686,7 +13845,7 @@ crbug.com/591099 fast/scrolling/hover-during-scroll.html [ Failure Timeout ] crbug.com/591099 fast/scrolling/html-element-client-rect-excludes-scrollbars.html [ Failure ] crbug.com/591099 fast/scrolling/jquery-rtl-scroll-type.html [ Failure Pass ] -crbug.com/591099 fast/scrolling/keyboard-scroll-page-scale.html [ Failure ] +crbug.com/591099 fast/scrolling/keyboard-scroll-page-scale.html [ Failure Timeout ] crbug.com/591099 fast/scrolling/non-composited-scrolling-repaint-to-ancestor-backing.html [ Failure Pass ] crbug.com/591099 fast/scrolling/overflow-auto-ltr.html [ Failure ] crbug.com/591099 fast/scrolling/overflow-scrollability.html [ Failure ] @@ -13806,6 +13965,7 @@ crbug.com/591099 fast/selectors/querySelector-leftmost-selector-matches-ancestor.html [ Failure ] crbug.com/591099 fast/selectors/querySelector-leftmost-selector-matches-rootNode.html [ Failure ] crbug.com/591099 fast/selectors/querySelector-scope.html [ Crash Failure ] +crbug.com/591099 fast/selectors/shadow-host-div-with-span.html [ Crash Pass ] crbug.com/591099 fast/selectors/specificity-overflow.html [ Failure ] crbug.com/591099 fast/selectors/style-sharing-adjacent-selector.html [ Failure ] crbug.com/591099 fast/selectors/style-sharing-attribute-selector.html [ Failure ] @@ -13978,6 +14138,7 @@ crbug.com/591099 fast/table/backgr_border-table-quirks-collapsed-border.html [ Failure ] crbug.com/591099 fast/table/backgr_border-table-quirks.html [ Failure ] crbug.com/591099 fast/table/backgr_image-crash.html [ Failure ] +crbug.com/591099 fast/table/backgr_layers-opacity-collapsed-border.html [ Crash Pass ] crbug.com/591099 fast/table/bad-replaced-sizing-preferred-logical-widths.html [ Failure ] crbug.com/591099 fast/table/baseline-align-rowspan.html [ Failure ] crbug.com/591099 fast/table/border-changes.html [ Failure ] @@ -13987,6 +14148,7 @@ crbug.com/591099 fast/table/border-collapsing/004-vertical.html [ Crash Failure ] crbug.com/591099 fast/table/border-collapsing/border-collapsing-head-foot-vertical.html [ Failure ] crbug.com/591099 fast/table/border-collapsing/border-collapsing-head-foot.html [ Failure ] +crbug.com/591099 fast/table/border-collapsing/bug14274.html [ Crash Pass ] crbug.com/591099 fast/table/border-collapsing/dynamic-border-width-change.html [ Failure ] crbug.com/591099 fast/table/border-collapsing/equal-precedence-resolution-vertical.html [ Crash Failure ] crbug.com/591099 fast/table/border-collapsing/rtl-border-collapsing-vertical.html [ Failure ] @@ -14012,6 +14174,7 @@ crbug.com/591099 fast/table/colspan-with-empty-cells-needing-extra-width.html [ Failure ] crbug.com/591099 fast/table/column-in-inline.html [ Failure ] crbug.com/591099 fast/table/columngroup-inside-columngroup.html [ Failure ] +crbug.com/591099 fast/table/computeLogicalWidth-table-needsSectionRecalc.html [ Crash Pass ] crbug.com/591099 fast/table/containment-crash.html [ Failure ] crbug.com/591099 fast/table/containment.html [ Failure ] crbug.com/591099 fast/table/convert-inline-anonoymous-wrapper-to-block.html [ Failure Pass ] @@ -14140,7 +14303,9 @@ crbug.com/591099 fast/table/table-rowspan-row-height-less-than-content-height.html [ Failure ] crbug.com/591099 fast/table/table-rowspan-table-height-and-row-precent-height-too-large.html [ Failure ] crbug.com/591099 fast/table/table-rowspan-wrong-height-with-only-spanning-cells.html [ Failure ] +crbug.com/591099 fast/table/table-section-split-with-after-content.html [ Failure Pass ] crbug.com/591099 fast/table/table-sections-border-spacing.html [ Failure ] +crbug.com/591099 fast/table/table-split.html [ Crash Pass ] crbug.com/591099 fast/table/table-toggle-paragraph-padding.html [ Failure ] crbug.com/591099 fast/table/table-with-borderattr-null.html [ Failure ] crbug.com/591099 fast/table/table-with-borderattr-set-to-null.html [ Failure ] @@ -14451,6 +14616,7 @@ crbug.com/591099 fast/text/text-combine-shrink-to-fit.html [ Failure ] crbug.com/591099 fast/text/text-combine-width-after-style-change.html [ Crash Pass ] crbug.com/591099 fast/text/text-container-bounding-rect.html [ Crash Failure ] +crbug.com/591099 fast/text/text-fragment-first-letter-update-crash.html [ Crash Pass ] crbug.com/591099 fast/text/text-iterator-crash.html [ Crash ] crbug.com/591099 fast/text/text-large-negative-letter-spacing-with-opacity.html [ Failure ] crbug.com/591099 fast/text/text-letter-spacing.html [ Failure ] @@ -14533,7 +14699,7 @@ crbug.com/591099 fast/tokenizer/ignore-tags-in-iframe.html [ Failure ] crbug.com/591099 fast/tokenizer/image-empty-crash.html [ Failure ] crbug.com/591099 fast/tokenizer/lessthan-terminates-tags-and-attrs.html [ Failure ] -crbug.com/591099 fast/tokenizer/missing-style-end-tag-1.html [ Failure ] +crbug.com/591099 fast/tokenizer/missing-style-end-tag-1.html [ Crash Failure ] crbug.com/591099 fast/tokenizer/missing-style-end-tag-2.html [ Failure ] crbug.com/591099 fast/tokenizer/nested-cached-scripts-and-stylesheet.html [ Crash Failure ] crbug.com/591099 fast/tokenizer/nested-cached-scripts.html [ Failure ] @@ -14640,6 +14806,7 @@ crbug.com/591099 fast/workers/worker-timeout.html [ Failure ] crbug.com/591099 fast/workers/wrapper-map-gc.html [ Failure ] crbug.com/591099 fast/writing-mode/Kusa-Makura-background-canvas.html [ Crash Failure ] +crbug.com/591099 fast/writing-mode/absolute-overconstrained-direction.html [ Crash Pass ] crbug.com/591099 fast/writing-mode/auto-margins-across-boundaries.html [ Failure ] crbug.com/591099 fast/writing-mode/auto-sizing-orthogonal-flows.html [ Failure ] crbug.com/591099 fast/writing-mode/background-vertical-lr.html [ Failure ] @@ -14671,9 +14838,9 @@ crbug.com/591099 fast/writing-mode/floats-in-block-layout.html [ Failure ] crbug.com/591099 fast/writing-mode/html-and-body-direction-propagation.html [ Failure Pass ] crbug.com/591099 fast/writing-mode/html-and-body-writing-mode-propagation.html [ Crash Failure Pass ] -crbug.com/591099 fast/writing-mode/html-direction-propagation.html [ Failure Pass ] +crbug.com/591099 fast/writing-mode/html-direction-propagation.html [ Crash Failure Pass ] crbug.com/591099 fast/writing-mode/html-writing-mode-propagation.html [ Failure Pass ] -crbug.com/591099 fast/writing-mode/inline-direction-positioning.html [ Failure ] +crbug.com/591099 fast/writing-mode/inline-direction-positioning.html [ Crash Failure ] crbug.com/591099 fast/writing-mode/japanese-lr-selection.html [ Failure ] crbug.com/591099 fast/writing-mode/japanese-lr-text.html [ Failure ] crbug.com/591099 fast/writing-mode/japanese-rl-selection.html [ Failure ] @@ -14686,11 +14853,14 @@ crbug.com/591099 fast/writing-mode/margins.html [ Failure ] crbug.com/591099 fast/writing-mode/orthogonal-writing-modes-available-width-absolute-crash.html [ Failure ] crbug.com/591099 fast/writing-mode/orthogonal-writing-modes-floats-crash-3.html [ Crash ] +crbug.com/591099 fast/writing-mode/orthogonal-writing-modes-floats-crash.html [ Crash Pass ] +crbug.com/591099 fast/writing-mode/orthogonal-writing-modes-in-layoutview-with-floats.html [ Crash Pass ] crbug.com/591099 fast/writing-mode/orthogonal-writing-modes-scrollbarpart-crash.html [ Failure ] crbug.com/591099 fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html [ Failure ] crbug.com/591099 fast/writing-mode/percentage-height-orthogonal-writing-modes.html [ Failure ] crbug.com/591099 fast/writing-mode/percentage-margins-absolute-replaced.html [ Failure ] crbug.com/591099 fast/writing-mode/percentage-margins-absolute.html [ Failure ] +crbug.com/591099 fast/writing-mode/root-lr-basic.html [ Crash Pass ] crbug.com/591099 fast/writing-mode/ruby-text-logical-left.html [ Crash Pass ] crbug.com/591099 fast/writing-mode/table-hit-test.html [ Failure ] crbug.com/591099 fast/writing-mode/table-percent-width-quirk.html [ Crash Failure ] @@ -14797,6 +14967,7 @@ crbug.com/591099 fonts/sans-serif.html [ Failure ] crbug.com/591099 fonts/serif.html [ Failure ] crbug.com/591099 fragmentation/abspos-after-forced-break.html [ Failure ] +crbug.com/591099 fragmentation/abspos-table-in-nested-multicol-crash.html [ Crash Pass ] crbug.com/591099 fragmentation/auto-scrollbar-shrink-to-fit.html [ Failure ] crbug.com/591099 fragmentation/avoid-break-inside-first-child-nested.html [ Failure ] crbug.com/591099 fragmentation/avoid-break-inside-first-child.html [ Failure ] @@ -14847,9 +15018,11 @@ crbug.com/591099 fragmentation/single-cells-multiple-tables-no-repeating-thead.html [ Failure ] crbug.com/591099 fragmentation/single-line-cells-in-multiple-table-sections.html [ Failure ] crbug.com/591099 fragmentation/single-line-cells-nested-repeating-thead-3.html [ Failure ] +crbug.com/591099 fragmentation/single-line-cells-paginated-with-text.html [ Crash Pass ] crbug.com/591099 fragmentation/single-line-cells-paginated.html [ Failure ] crbug.com/591099 fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2.html [ Failure Pass ] crbug.com/591099 fragmentation/single-line-cells-repeating-thead-with-border-spacing-at-top-of-row.html [ Failure ] +crbug.com/591099 fragmentation/single-line-cells-self-painting-thead-break-inside-on-thead-only.html [ Crash Pass ] crbug.com/591099 fragmentation/single-line-cells.html [ Failure ] crbug.com/591099 fragmentation/table-disable-fragmentation.html [ Failure ] crbug.com/591099 fragmentation/table-in-subpixel-fragmentainer.html [ Failure ] @@ -14859,7 +15032,6 @@ crbug.com/591099 fragmentation/unbreakable-tall-float-before-block.html [ Failure ] crbug.com/591099 fragmentation/unbreakable-tall-float-before-line.html [ Failure Pass ] crbug.com/591099 fullscreen/anonymous-block-merge-crash.html [ Crash ] -crbug.com/591099 fullscreen/api/element-request-fullscreen-and-remove-iframe.html [ Crash ] crbug.com/591099 fullscreen/compositor-touch-hit-rects-fullscreen-video-controls.html [ Failure ] crbug.com/591099 fullscreen/enter-exit-full-screen-hover.html [ Crash Pass ] crbug.com/591099 fullscreen/exit-full-screen-iframe.html [ Crash Failure ] @@ -14877,7 +15049,6 @@ crbug.com/591099 fullscreen/full-screen-no-style-sharing.html [ Failure ] crbug.com/591099 fullscreen/full-screen-placeholder.html [ Failure ] crbug.com/591099 fullscreen/full-screen-prefixed-and-unprefixed.html [ Crash Pass ] -crbug.com/591099 fullscreen/full-screen-remove-ancestor-during-transition.html [ Crash ] crbug.com/591099 fullscreen/full-screen-request-removed.html [ Failure ] crbug.com/591099 fullscreen/full-screen-table-section.html [ Failure ] crbug.com/591099 fullscreen/full-screen-unprefixed-and-prefixed.html [ Crash Pass ] @@ -15074,10 +15245,13 @@ crbug.com/591099 html/grouping_content/figure-element.html [ Failure ] crbug.com/591099 html/grouping_content/listing.html [ Failure ] crbug.com/591099 html/grouping_content/main-element.html [ Failure ] +crbug.com/591099 html/marquee/marquee-direction-attribute-should-be-case-insensitive.html [ Crash Pass ] crbug.com/591099 html/marquee/marquee-element.html [ Crash Failure ] crbug.com/591099 html/marquee/marquee-scroll.html [ Crash Failure ] crbug.com/591099 html/marquee/marquee-scrollamount.html [ Crash Failure ] crbug.com/591099 html/marquee/marquee-shadow-root-no-access.html [ Crash ] +crbug.com/591099 html/marquee/marquee-should-not-wrap.html [ Crash Pass ] +crbug.com/591099 html/marquee/marquee-vspace-hspace.html [ Crash Pass ] crbug.com/591099 html/sections/article-element.html [ Failure ] crbug.com/591099 html/sections/aside-element.html [ Failure ] crbug.com/591099 html/sections/body-quirk-client-size.html [ Failure ] @@ -15206,6 +15380,7 @@ crbug.com/591099 http/tests/css/shape-image-file.html [ Failure ] crbug.com/591099 http/tests/css/shared-stylesheet-mutation-preconstruct.html [ Failure ] crbug.com/591099 http/tests/css/shared-stylesheet-mutation.html [ Failure ] +crbug.com/591099 http/tests/csspaint/border-color.html [ Failure ] crbug.com/591099 http/tests/csspaint/geometry-background-image-tiled.html [ Failure ] crbug.com/591099 http/tests/csspaint/geometry-background-image.html [ Failure ] crbug.com/591099 http/tests/csspaint/geometry-border-image.html [ Failure ] @@ -15359,14 +15534,16 @@ crbug.com/591099 http/tests/inspector-protocol/cookies-protocol-test.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector-protocol/network-data-length.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector-protocol/network-fetch-content-with-error-status-code.html [ Failure Timeout ] -crbug.com/591099 http/tests/inspector-protocol/network/disable-interception-midway.html [ Failure ] +crbug.com/591099 http/tests/inspector-protocol/network/disable-interception-midway.html [ Failure Timeout ] +crbug.com/591099 http/tests/inspector-protocol/network/interception-auth-cancel.html [ Failure ] +crbug.com/591099 http/tests/inspector-protocol/network/interception-auth-provide-credentials.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector-protocol/network/navigation-interception.html [ Failure ] crbug.com/591099 http/tests/inspector-protocol/network/redirect-interception-blocked.html [ Failure ] crbug.com/591099 http/tests/inspector-protocol/network/redirect-interception-mocked.html [ Failure ] crbug.com/591099 http/tests/inspector-protocol/network/redirect-interception-modified.html [ Failure ] crbug.com/591099 http/tests/inspector-protocol/network/redirect-interception.html [ Failure ] -crbug.com/591099 http/tests/inspector-protocol/network/request-interception-mock302.html [ Failure ] -crbug.com/591099 http/tests/inspector-protocol/network/request-interception-mock404.html [ Failure ] +crbug.com/591099 http/tests/inspector-protocol/network/request-interception-mock302.html [ Failure Timeout ] +crbug.com/591099 http/tests/inspector-protocol/network/request-interception-mock404.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector-protocol/network/request-interception-modify-get-to-post.html [ Failure ] crbug.com/591099 http/tests/inspector-protocol/network/request-interception.html [ Failure ] crbug.com/591099 http/tests/inspector-protocol/network/xhr-interception-auth-fail.html [ Failure ] @@ -15391,28 +15568,29 @@ crbug.com/591099 http/tests/inspector/appcache/appcache-swap.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/application-panel/resources-panel-on-navigation.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/application-panel/resources-panel-selection-on-reload.html [ Failure Timeout ] -crbug.com/591099 http/tests/inspector/bindings/bindings-frame-attach-detach.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/application-panel/storage-view-reports-quota.html [ Timeout ] +crbug.com/591099 http/tests/inspector/bindings/bindings-frame-attach-detach.html [ Crash Failure Timeout ] crbug.com/591099 http/tests/inspector/bindings/bindings-frame-navigate.html [ Failure ] crbug.com/591099 http/tests/inspector/bindings/bindings-main-frame-navigated.html [ Failure ] crbug.com/591099 http/tests/inspector/bindings/bindings-multiple-frames.html [ Crash ] crbug.com/591099 http/tests/inspector/bindings/contentscripts-bindings-multiple-frames.html [ Crash ] crbug.com/591099 http/tests/inspector/bindings/contentscripts-navigator-multiple-frames.html [ Crash ] crbug.com/591099 http/tests/inspector/bindings/dynamic-bindings-frame-attach-detach.html [ Failure ] -crbug.com/591099 http/tests/inspector/bindings/dynamic-navigator-frame-attach-detach.html [ Failure ] +crbug.com/591099 http/tests/inspector/bindings/dynamic-navigator-frame-attach-detach.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/bindings/livelocation-main-frame-navigated.html [ Failure ] crbug.com/591099 http/tests/inspector/bindings/navigator-frame-attach-detach.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/bindings/navigator-frame-navigate.html [ Failure ] crbug.com/591099 http/tests/inspector/bindings/navigator-main-frame-navigated.html [ Failure ] crbug.com/591099 http/tests/inspector/bindings/navigator-multiple-frames.html [ Crash Timeout ] crbug.com/591099 http/tests/inspector/bindings/shadowdom-bindings.html [ Failure ] -crbug.com/591099 http/tests/inspector/bindings/shadowdom-navigator.html [ Failure ] +crbug.com/591099 http/tests/inspector/bindings/shadowdom-navigator.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/bindings/sourcemap-bindings-multiple-frames.html [ Crash ] crbug.com/591099 http/tests/inspector/bindings/sourcemap-navigator-multiple-frames.html [ Crash Timeout ] crbug.com/591099 http/tests/inspector/bindings/suspendtarget-bindings.html [ Crash ] crbug.com/591099 http/tests/inspector/bindings/suspendtarget-navigator.html [ Crash ] crbug.com/591099 http/tests/inspector/cache-storage/cache-data.html [ Failure ] crbug.com/591099 http/tests/inspector/cache-storage/cache-deletion.html [ Failure ] -crbug.com/591099 http/tests/inspector/cache-storage/cache-entry-deletion.html [ Failure ] +crbug.com/591099 http/tests/inspector/cache-storage/cache-entry-deletion.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/cache-storage/cache-names.html [ Failure ] crbug.com/591099 http/tests/inspector/change-iframe-src.html [ Crash ] crbug.com/591099 http/tests/inspector/command-line-api-inspect.html [ Crash Failure ] @@ -15449,6 +15627,20 @@ crbug.com/591099 http/tests/inspector/extensions-ignore-cache.html [ Crash Failure ] crbug.com/591099 http/tests/inspector/extensions-network-redirect.html [ Crash Failure ] crbug.com/591099 http/tests/inspector/extensions-useragent.html [ Crash ] +crbug.com/591099 http/tests/inspector/extensions/extensions-api.html [ Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-audits-api.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-audits-content-script.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-audits.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-eval-content-script.html [ Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-eval.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-events.html [ Crash ] +crbug.com/591099 http/tests/inspector/extensions/extensions-network.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-panel.html [ Crash ] +crbug.com/591099 http/tests/inspector/extensions/extensions-reload.html [ Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-resources.html [ Crash Failure ] +crbug.com/591099 http/tests/inspector/extensions/extensions-sidebar.html [ Crash ] +crbug.com/591099 http/tests/inspector/extensions/extensions-timeline-api.html [ Crash ] +crbug.com/591099 http/tests/inspector/extensions/multiple-extensions.html [ Failure ] crbug.com/591099 http/tests/inspector/forced-layout-in-microtask.html [ Crash ] crbug.com/591099 http/tests/inspector/fragment.html [ Crash Failure ] crbug.com/591099 http/tests/inspector/indexeddb/database-data.html [ Failure ] @@ -15546,7 +15738,7 @@ crbug.com/591099 http/tests/inspector/persistence/persistence-sourceframe-messages.html [ Failure ] crbug.com/591099 http/tests/inspector/persistence/persistence-switch-editor-tab.html [ Failure ] crbug.com/591099 http/tests/inspector/persistence/persistence-sync-content-nodejs.html [ Failure ] -crbug.com/591099 http/tests/inspector/persistence/persistence-sync-content.html [ Failure ] +crbug.com/591099 http/tests/inspector/persistence/persistence-sync-content.html [ Failure Timeout ] crbug.com/591099 http/tests/inspector/persistence/persistence-tabbed-editor-keeps-selected-tab.html [ Failure ] crbug.com/591099 http/tests/inspector/persistence/persistence-tabbed-editor-opens-filesystem-uisourcecode.html [ Crash Failure ] crbug.com/591099 http/tests/inspector/persistence/persistence-tabbed-editor-tabs-order.html [ Failure Timeout ] @@ -15763,6 +15955,7 @@ crbug.com/591099 http/tests/media/video-controls-download-button-not-displayed-mse.html [ Crash ] crbug.com/591099 http/tests/media/video-cookie.html [ Crash ] crbug.com/591099 http/tests/media/video-error-abort.html [ Crash ] +crbug.com/591099 http/tests/media/video-in-iframe-crash.html [ Crash ] crbug.com/591099 http/tests/media/video-load-metadata-decode-error.html [ Crash ] crbug.com/591099 http/tests/media/video-load-suspend.html [ Crash ] crbug.com/591099 http/tests/media/video-load-with-userpass.html [ Crash ] @@ -15916,6 +16109,9 @@ crbug.com/591099 http/tests/navigation/navigation-with-detached-origin-document.html [ Crash Pass ] crbug.com/591099 http/tests/navigation/no-referrer-reset.html [ Failure Timeout ] crbug.com/591099 http/tests/navigation/onload-navigation-iframe-2.html [ Failure ] +crbug.com/591099 http/tests/navigation/ping-cookie.html [ Crash Pass ] +crbug.com/591099 http/tests/navigation/ping-cross-origin-from-https.html [ Crash Pass ] +crbug.com/591099 http/tests/navigation/ping-cross-origin.html [ Crash Pass ] crbug.com/591099 http/tests/navigation/post-301-response.html [ Crash Pass ] crbug.com/591099 http/tests/navigation/post-302-response.html [ Crash Pass ] crbug.com/591099 http/tests/navigation/post-303-response.html [ Crash Pass ] @@ -15926,7 +16122,10 @@ crbug.com/591099 http/tests/navigation/post-goback-same-url.html [ Crash Failure ] crbug.com/591099 http/tests/navigation/post-goback1.html [ Crash Failure ] crbug.com/591099 http/tests/navigation/post-goback2.html [ Crash Failure ] +crbug.com/591099 http/tests/navigation/postredirect-basic.html [ Failure ] crbug.com/591099 http/tests/navigation/postredirect-frames-goback1.html [ Crash Failure ] +crbug.com/591099 http/tests/navigation/postredirect-frames.html [ Failure ] +crbug.com/591099 http/tests/navigation/postredirect-goback1.html [ Failure ] crbug.com/591099 http/tests/navigation/postredirect-goback2.html [ Crash Failure ] crbug.com/591099 http/tests/navigation/redirect-load-no-form-restoration.html [ Crash Pass ] crbug.com/591099 http/tests/navigation/redirect302-basic.html [ Crash Failure ] @@ -16049,6 +16248,7 @@ crbug.com/591099 http/tests/security/contentSecurityPolicy/redirect-does-not-match-paths.html [ Crash ] crbug.com/591099 http/tests/security/contentSecurityPolicy/redirect-with-delay.html [ Crash ] crbug.com/591099 http/tests/security/contentSecurityPolicy/register-bypassing-scheme-partial.html [ Crash Failure ] +crbug.com/591099 http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html [ Crash Pass ] crbug.com/591099 http/tests/security/contentSecurityPolicy/report-and-enforce.php [ Crash Pass ] crbug.com/591099 http/tests/security/contentSecurityPolicy/report-blocked-data-uri.php [ Crash Pass ] crbug.com/591099 http/tests/security/contentSecurityPolicy/report-blocked-file-uri.php [ Crash Pass ] @@ -16489,6 +16689,7 @@ crbug.com/591099 http/tests/uri/resolve-encoding-relative.html [ Failure ] crbug.com/591099 http/tests/uri/utf8-path.html [ Failure ] crbug.com/591099 http/tests/w3c/webperf/approved/navigation-timing/html/test_performance_attributes_exist_in_object.html [ Crash ] +crbug.com/591099 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_ignore_failures.html [ Crash Pass ] crbug.com/591099 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_redirect.html [ Crash ] crbug.com/591099 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_redirect_chain.html [ Crash ] crbug.com/591099 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_redirect_chain_allow_timing.html [ Crash ] @@ -17289,7 +17490,7 @@ crbug.com/591099 inspector/console/console-log-before-inspector-open.html [ Failure ] crbug.com/591099 inspector/console/console-log-custom-elements.html [ Failure ] crbug.com/591099 inspector/console/console-log-document-proto.html [ Failure ] -crbug.com/591099 inspector/console/console-log-eval-syntax-error.html [ Failure ] +crbug.com/591099 inspector/console/console-log-eval-syntax-error.html [ Crash Failure ] crbug.com/591099 inspector/console/console-log-in-xhtml.xhtml [ Failure ] crbug.com/591099 inspector/console/console-log-linkify-links.html [ Failure ] crbug.com/591099 inspector/console/console-log-linkify-stack-in-errors.html [ Failure ] @@ -17600,20 +17801,6 @@ crbug.com/591099 inspector/elements/styles/url-multiple-collapsing.html [ Crash ] crbug.com/591099 inspector/elements/user-properties.html [ Crash ] crbug.com/591099 inspector/evaluate-in-page.html [ Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-api.html [ Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-audits-api.html [ Crash Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-audits-content-script.html [ Crash Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-audits.html [ Crash Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-eval-content-script.html [ Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-eval.html [ Crash Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-events.html [ Crash ] -crbug.com/591099 http/tests/inspector/extensions/extensions-network.html [ Crash Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-panel.html [ Crash ] -crbug.com/591099 http/tests/inspector/extensions/extensions-reload.html [ Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-resources.html [ Crash Failure ] -crbug.com/591099 http/tests/inspector/extensions/extensions-sidebar.html [ Crash ] -crbug.com/591099 http/tests/inspector/extensions/extensions-timeline-api.html [ Crash ] -crbug.com/591099 http/tests/inspector/extensions/multiple-extensions.html [ Failure ] crbug.com/591099 inspector/file-reader-with-network-panel.html [ Failure ] crbug.com/591099 inspector/file-system-mapping.html [ Failure ] crbug.com/591099 inspector/file-system-project.html [ Failure ] @@ -17696,7 +17883,7 @@ crbug.com/591099 inspector/runtime/runtime-getProperties-isOwnProperty.html [ Failure ] crbug.com/591099 inspector/runtime/runtime-getProperties.html [ Failure ] crbug.com/591099 inspector/runtime/runtime-localStorage-getProperties.html [ Failure ] -crbug.com/591099 inspector/runtime/runtime-setPropertyValue.html [ Failure ] +crbug.com/591099 inspector/runtime/runtime-setPropertyValue.html [ Crash Failure ] crbug.com/591099 inspector/sass/test-ast-css-1.html [ Crash ] crbug.com/591099 inspector/sass/test-ast-css-2.html [ Crash ] crbug.com/591099 inspector/sass/test-ast-css-3.html [ Crash ] @@ -17776,6 +17963,7 @@ crbug.com/591099 inspector/sources/debugger-console/debugger-command-line-api.html [ Crash Failure ] crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-blackbox-by-source-code.html [ Crash Failure ] crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-blackbox-patterns.html [ Crash Failure ] +crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints.html [ Crash Failure Timeout ] crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-jquery.html [ Crash Failure ] crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-skip-break-program.html [ Crash Failure ] crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-skip-exceptions.html [ Crash Failure ] @@ -17869,6 +18057,7 @@ crbug.com/591099 inspector/sources/debugger/debugger-compile-and-run.html [ Failure ] crbug.com/591099 inspector/sources/debugger/debugger-completions-on-call-frame.html [ Failure ] crbug.com/591099 inspector/sources/debugger/debugger-cyclic-reference.html [ Failure ] +crbug.com/591099 inspector/sources/debugger/debugger-disable-enable.html [ Failure ] crbug.com/591099 inspector/sources/debugger/debugger-es6-harmony-scopes.html [ Failure ] crbug.com/591099 inspector/sources/debugger/debugger-minified-variables-evalution.html [ Failure ] crbug.com/591099 inspector/sources/debugger/debugger-proto-property.html [ Crash Failure ] @@ -17888,6 +18077,7 @@ crbug.com/591099 inspector/sources/debugger/live-edit-breakpoints.html [ Failure ] crbug.com/591099 inspector/sources/debugger/live-edit-no-reveal.html [ Failure ] crbug.com/591099 inspector/sources/debugger/live-edit-original-content.html [ Failure ] +crbug.com/591099 inspector/sources/debugger/live-edit.html [ Failure ] crbug.com/591099 inspector/sources/debugger/mutation-observer-suspend-while-paused.html [ Failure ] crbug.com/591099 inspector/sources/debugger/navigator-view.html [ Failure Timeout ] crbug.com/591099 inspector/sources/debugger/network-uisourcecode-provider.html [ Failure ] @@ -17904,7 +18094,7 @@ crbug.com/591099 inspector/sources/formatter-js.html [ Failure ] crbug.com/591099 inspector/sources/inspect-function.html [ Failure ] crbug.com/591099 inspector/sources/javascript-outline-dialog.html [ Crash Failure ] -crbug.com/591099 inspector/sources/outline-javascript-1.html [ Failure ] +crbug.com/591099 inspector/sources/outline-javascript-1.html [ Crash Failure ] crbug.com/591099 inspector/sources/outline-javascript-2.html [ Failure ] crbug.com/591099 inspector/sources/outline-javascript-3.html [ Failure ] crbug.com/591099 inspector/sources/outline-javascript-4.html [ Failure ] @@ -18500,8 +18690,10 @@ crbug.com/591099 media/viewport-in-standalone-media-document.html [ Crash ] crbug.com/591099 mhtml/data-uri-font.mht [ Failure ] crbug.com/591099 mhtml/image_document.mht [ Failure ] +crbug.com/591099 mhtml/invalid-bad-boundary.mht [ Crash Pass ] crbug.com/591099 mhtml/invalid-bad-boundary2.mht [ Failure ] crbug.com/591099 mhtml/malformed_mhtml_no_footer.mht [ Failure ] +crbug.com/591099 mhtml/relative_url.mht [ Crash Pass ] crbug.com/591099 netinfo/basic-operation.html [ Failure ] crbug.com/591099 netinfo/connection-types.html [ Failure ] crbug.com/591099 netinfo/estimate-basic-operation.html [ Failure ] @@ -18520,6 +18712,9 @@ crbug.com/591099 overflow/overflow-basic-005.html [ Failure Pass ] crbug.com/591099 overflow/overflow-basic-006.html [ Failure Pass ] crbug.com/591099 overflow/overflow-bug-chrome-ng-001.html [ Failure ] +crbug.com/591099 overflow/overflow-position-001.html [ Failure ] +crbug.com/591099 overflow/overflow-position-002.html [ Failure ] +crbug.com/591099 overflow/overflow-position-003.html [ Failure ] crbug.com/591099 overflow/overflow-transform-001.html [ Failure Pass ] crbug.com/591099 paint/background/background-and-shadow.html [ Failure ] crbug.com/591099 paint/background/fieldset-legend-background-shadow-border-radius.html [ Failure ] @@ -18527,11 +18722,11 @@ crbug.com/591099 paint/clipath/clip-path-with-background-and-box-behind.html [ Failure Pass ] crbug.com/591099 paint/frames/frameset-with-stacking-context-and-not-stacking-context-children.html [ Failure ] crbug.com/591099 paint/frames/frameset-with-stacking-contexts.html [ Failure ] -crbug.com/591099 paint/high-contrast-mode/image-filter-all/gradient-invert.html [ Failure ] -crbug.com/591099 paint/high-contrast-mode/image-filter-all/image-invert.html [ Failure ] +crbug.com/591099 paint/high-contrast-mode/image-filter-all/gradient-invert.html [ Failure Pass ] +crbug.com/591099 paint/high-contrast-mode/image-filter-all/image-invert.html [ Failure Pass ] crbug.com/591099 paint/high-contrast-mode/image-filter-all/text-on-backgrounds.html [ Failure ] -crbug.com/591099 paint/high-contrast-mode/image-filter-none/gradient-noinvert.html [ Failure ] -crbug.com/591099 paint/high-contrast-mode/image-filter-none/image-noinvert.html [ Failure ] +crbug.com/591099 paint/high-contrast-mode/image-filter-none/gradient-noinvert.html [ Failure Pass ] +crbug.com/591099 paint/high-contrast-mode/image-filter-none/image-noinvert.html [ Failure Pass ] crbug.com/591099 paint/images/animated-gif-last-frame-crash.html [ Crash ] crbug.com/591099 paint/inline/floating-inline.html [ Failure ] crbug.com/591099 paint/inline/focus-ring-under-absolute-with-relative-continuation.html [ Failure ] @@ -18787,7 +18982,7 @@ crbug.com/591099 paint/invalidation/float-overflow.html [ Failure ] crbug.com/591099 paint/invalidation/focus-continuations.html [ Crash Failure ] crbug.com/591099 paint/invalidation/focus-enable-continuations.html [ Failure ] -crbug.com/591099 paint/invalidation/focus-layers.html [ Failure ] +crbug.com/591099 paint/invalidation/focus-layers.html [ Crash Failure ] crbug.com/591099 paint/invalidation/focus-ring-on-child-move.html [ Failure ] crbug.com/591099 paint/invalidation/focus-ring-on-continuation-move.html [ Failure ] crbug.com/591099 paint/invalidation/focus-ring-on-inline-continuation-move.html [ Failure ] @@ -19198,6 +19393,7 @@ crbug.com/591099 paint/tables/composited-collapsed-table-borders.html [ Failure Pass ] crbug.com/591099 paint/tables/huge-table-composited-scroll.html [ Failure Pass ] crbug.com/591099 paint/tables/self-painting-row-background-vertical-clipped.html [ Failure ] +crbug.com/591099 paint/tables/stacking-context-row-background-clipped-with-offset.html [ Failure ] crbug.com/591099 paint/tables/tbody-transformed.html [ Failure Pass ] crbug.com/591099 paint/text/selection-no-clip-text.html [ Failure ] crbug.com/591099 paint/text/text-match-highlights-big-line-height.html [ Failure ] @@ -19242,6 +19438,7 @@ crbug.com/591099 plugins/override-node-method.html [ Failure ] crbug.com/591099 plugins/page-scale-does-not-affect-plugin-height.html [ Crash ] crbug.com/591099 plugins/plugin-destroyed-enumerate.html [ Crash ] +crbug.com/591099 plugins/plugin-document-back-forward.html [ Pass Timeout ] crbug.com/591099 plugins/plugin-initiate-popup-window.html [ Timeout ] crbug.com/591099 plugins/plugin-javascript-access.html [ Failure ] crbug.com/591099 plugins/plugin-paint-test.html [ Failure ] @@ -19353,10 +19550,14 @@ crbug.com/591099 scrollbars/basic-scrollbar.html [ Failure ] crbug.com/591099 scrollbars/border-box-rect-clips-scrollbars.html [ Failure ] crbug.com/591099 scrollbars/custom-scrollbar-appearance-property.html [ Failure Pass ] +crbug.com/591099 scrollbars/custom-scrollbar-changing-style-relayout-body-scrollablearea.html [ Crash Pass ] +crbug.com/591099 scrollbars/custom-scrollbar-changing-style-relayout-div-body-scrollablearea.html [ Crash Pass ] crbug.com/591099 scrollbars/custom-scrollbar-display.html [ Failure Pass ] crbug.com/591099 scrollbars/custom-scrollbar-enable-changes-thickness-with-iframe.html [ Failure Pass ] +crbug.com/591099 scrollbars/custom-scrollbar-inactive-only-on-windowinactive-selector.html [ Failure Pass ] crbug.com/591099 scrollbars/custom-scrollbar-not-inherited-by-iframe.html [ Crash ] crbug.com/591099 scrollbars/custom-scrollbar-reconstruction-document-write.html [ Crash ] +crbug.com/591099 scrollbars/custom-scrollbar-thumb-focus-iframe-inactive-pseudo.html [ Failure Pass ] crbug.com/591099 scrollbars/custom-scrollbar-with-incomplete-style.html [ Failure ] crbug.com/591099 scrollbars/disabled-composited-scrollbar.html [ Failure Pass ] crbug.com/591099 scrollbars/disabled-scrollbar.html [ Failure ] @@ -19376,6 +19577,7 @@ crbug.com/591099 scrollbars/scrollbar-click-does-not-blur-content.html [ Crash ] crbug.com/591099 scrollbars/scrollbar-content-crash.html [ Failure ] crbug.com/591099 scrollbars/scrollbar-crash-on-refresh.html [ Failure ] +crbug.com/591099 scrollbars/scrollbar-large-overflow-rectangle.html [ Crash Pass ] crbug.com/591099 scrollbars/scrollbar-miss-mousemove-disabled.html [ Failure ] crbug.com/591099 scrollbars/scrollbar-miss-mousemove.html [ Failure ] crbug.com/591099 scrollbars/scrollbar-orientation.html [ Failure ] @@ -19401,6 +19603,7 @@ crbug.com/591099 shadow-dom/css-cascade-inner-scope-important.html [ Failure ] crbug.com/591099 shadow-dom/css-cascade-outer-scope.html [ Failure ] crbug.com/591099 shadow-dom/css-cascade-slot-distributed.html [ Failure ] +crbug.com/591099 shadow-dom/css-focus-pseudo-match-shadow-host1.html [ Failure Pass ] crbug.com/591099 shadow-dom/css-focus-pseudo-match-shadow-host2.html [ Crash ] crbug.com/591099 shadow-dom/css-focus-pseudo-match-shadow-host5.html [ Crash ] crbug.com/591099 shadow-dom/delegatesFocus-highlight-sibling.html [ Crash ] @@ -19416,6 +19619,7 @@ crbug.com/591099 shadow-dom/focus-navigation.html [ Crash ] crbug.com/591099 shadow-dom/focus-slide-on-shadow-host.html [ Crash ] crbug.com/591099 shadow-dom/focus-with-negative-index.html [ Crash ] +crbug.com/591099 shadow-dom/host-pseudo-elements.html [ Crash Pass ] crbug.com/591099 shadow-dom/nodetree-labels-node-list.html [ Crash ] crbug.com/591099 shadow-dom/nodetree-radio-node-list.html [ Crash ] crbug.com/591099 shadow-dom/pointer-lock-in-shadow.html [ Crash ] @@ -19683,6 +19887,85 @@ crbug.com/591099 storage/websql/null-characters.html [ Failure ] crbug.com/591099 storage/websql/sql-error-codes.html [ Failure Pass ] crbug.com/591099 storage/websql/transaction-removed-context-crash.html [ Crash ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/interact-pointer-03-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/painting-marker-05-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/pservers-grad-17-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/pservers-pattern-03-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/pservers-pattern-04-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/struct-use-14-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/svgdom-over-01-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/text-intro-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/text-tspan-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/types-dom-03-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1-SE/types-dom-05-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-03-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-09-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-13-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-20-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-21-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-34-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-39-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-41-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-44-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-67-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-68-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/animate-elem-84-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/color-prop-03-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/coords-trans-02-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/coords-units-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/filters-example-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/filters-gauss-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/filters-morph-01-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/filters-turb-01-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/fonts-elem-04-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/interact-events-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/linking-a-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/linking-a-04-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/linking-a-05-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/linking-a-07-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/linking-uri-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/masking-mask-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/masking-opacity-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/masking-path-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-fill-01-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-fill-05-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-marker-01-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-marker-03-f.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-stroke-01-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-stroke-02-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/painting-stroke-03-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/paths-data-02-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/paths-data-07-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/paths-data-10-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/paths-data-12-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/paths-data-13-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/pservers-grad-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/pservers-grad-05-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/pservers-grad-14-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/pservers-grad-19-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/render-elems-07-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/script-handle-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/shapes-polyline-01-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-cond-01-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-cond-02-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-dom-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-dom-06-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-frag-01-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-frag-02-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-frag-05-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-group-02-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-image-04-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-image-05-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-image-10-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-symbol-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/struct-use-05-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/styling-css-06-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/text-align-08-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/text-fonts-01-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/text-text-03-b.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/text-text-06-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/text-text-07-t.svg [ Failure Pass ] +crbug.com/591099 svg/W3C-SVG-1.1/text-tspan-01-b.svg [ Failure Pass ] crbug.com/591099 svg/animations/accumulate-use-count.html [ Crash ] crbug.com/591099 svg/animations/accumulate-values-width-animation.html [ Failure ] crbug.com/591099 svg/animations/add-after-load-use-counter.html [ Crash ] @@ -19761,6 +20044,9 @@ crbug.com/591099 svg/animations/animateMotion-fill-remove.html [ Failure ] crbug.com/591099 svg/animations/animateMotion-multiple.html [ Failure ] crbug.com/591099 svg/animations/animateMotion-still.html [ Failure ] +crbug.com/591099 svg/animations/animateTransform-accumulation.svg [ Failure Pass ] +crbug.com/591099 svg/animations/animateTransform-by-scale-1.svg [ Crash Pass ] +crbug.com/591099 svg/animations/animateTransform-by-scale.svg [ Crash Pass ] crbug.com/591099 svg/animations/animateTransform-pattern-transform.html [ Timeout ] crbug.com/591099 svg/animations/animateTransform-translate-attributetype-auto.html [ Timeout ] crbug.com/591099 svg/animations/animateTransform-translate-invalid-attributetype.html [ Timeout ] @@ -19790,9 +20076,13 @@ crbug.com/591099 svg/animations/end-use-counters.html [ Crash ] crbug.com/591099 svg/animations/force-use-shadow-tree-recreation-while-animating.html [ Failure ] crbug.com/591099 svg/animations/img-tag-css-length-animation-crash.html [ Crash ] +crbug.com/591099 svg/animations/multiple-animateTransform-additive-sum.svg [ Crash Pass ] crbug.com/591099 svg/animations/multiple-animations-ending.html [ Failure Timeout ] crbug.com/591099 svg/animations/multiple-animations-fill-freeze.html [ Failure ] crbug.com/591099 svg/animations/multiple-begin-additive-animation.html [ Failure ] +crbug.com/591099 svg/animations/no-attr-pattern-width.svg [ Crash Pass ] +crbug.com/591099 svg/animations/no-attr-radialgradient-fr.svg [ Crash Pass ] +crbug.com/591099 svg/animations/no-attr-radialgradient-fx.svg [ Crash Pass ] crbug.com/591099 svg/animations/non-additive-type-by-animation.html [ Failure ] crbug.com/591099 svg/animations/non-additive-type-from-by-animation.html [ Failure ] crbug.com/591099 svg/animations/pause-setcurrenttime-unpause-before-timeline-start.html [ Crash ] @@ -19941,10 +20231,13 @@ crbug.com/591099 svg/canvas/image-svg-intrinsic-size.html [ Crash ] crbug.com/591099 svg/carto.net/frameless-svg-parse-error.html [ Failure ] crbug.com/591099 svg/clip-path/clip-path-foreign-object-crash.html [ Crash ] +crbug.com/591099 svg/clip-path/clip-path-nonzero-evenodd.svg [ Crash Pass ] +crbug.com/591099 svg/clip-path/clip-path-with-different-unittypes2.svg [ Crash Pass ] crbug.com/591099 svg/css/background-image-svg.html [ Crash Failure Pass ] crbug.com/591099 svg/css/baseline-shift-inherit.html [ Crash ] crbug.com/591099 svg/css/buffered-rendering.html [ Failure ] crbug.com/591099 svg/css/css-box-min-width.html [ Failure ] +crbug.com/591099 svg/css/currentColor-inheritance-about-fill-color.svg [ Crash Pass ] crbug.com/591099 svg/css/display-computed.html [ Crash ] crbug.com/591099 svg/css/getComputedStyle-listing.xhtml [ Failure ] crbug.com/591099 svg/css/getComputedStyle-svg-text-width-height.html [ Crash ] @@ -19971,13 +20264,16 @@ crbug.com/591099 svg/custom/animate-pause-resume.html [ Crash ] crbug.com/591099 svg/custom/animate-svgsvgelement.html [ Crash ] crbug.com/591099 svg/custom/animation-values-parsing-error.html [ Failure ] +crbug.com/591099 svg/custom/attribute-namespace-check.svg [ Crash Pass ] crbug.com/591099 svg/custom/bad-attributeName-crash.html [ Failure ] crbug.com/591099 svg/custom/boundingBox.html [ Failure ] crbug.com/591099 svg/custom/bug45331.svg [ Failure ] crbug.com/591099 svg/custom/bug78807.svg [ Failure ] crbug.com/591099 svg/custom/click-overflowing-element.html [ Failure ] +crbug.com/591099 svg/custom/clip-path-with-transform.svg [ Crash Pass ] crbug.com/591099 svg/custom/clone-element-with-animated-svg-properties.html [ Failure ] crbug.com/591099 svg/custom/clone-node.html [ Failure ] +crbug.com/591099 svg/custom/conditional-processing-outside-switch.svg [ Crash Pass ] crbug.com/591099 svg/custom/crash-textPath-attributes.html [ Failure ] crbug.com/591099 svg/custom/createImageElement2.xhtml [ Failure ] crbug.com/591099 svg/custom/currentColor-on-color.html [ Failure ] @@ -19993,6 +20289,7 @@ crbug.com/591099 svg/custom/filter-css-transform-resolution.html [ Failure Pass ] crbug.com/591099 svg/custom/focus-event-handling-keyboard.xhtml [ Failure ] crbug.com/591099 svg/custom/focus-event-handling.xhtml [ Failure ] +crbug.com/591099 svg/custom/focus-ring-text.svg [ Failure Pass ] crbug.com/591099 svg/custom/foreign-object-skew.svg [ Failure Pass ] crbug.com/591099 svg/custom/fragment-navigation-01.html [ Failure ] crbug.com/591099 svg/custom/fragment-navigation-02.html [ Failure ] @@ -20021,6 +20318,7 @@ crbug.com/591099 svg/custom/image-with-attr-change-after-delete-crash.html [ Crash Pass ] crbug.com/591099 svg/custom/inline-svg-in-xhtml.xml [ Failure ] crbug.com/591099 svg/custom/inline-svg-use-available-width-in-stf.html [ Failure ] +crbug.com/591099 svg/custom/inline-svg-use-available-width.html [ Failure Pass ] crbug.com/591099 svg/custom/invalid-filter-reference-and-opacity-crash.html [ Failure ] crbug.com/591099 svg/custom/invalid-length-units.html [ Failure ] crbug.com/591099 svg/custom/invisible-text-after-scrolling.xhtml [ Failure ] @@ -20035,6 +20333,7 @@ crbug.com/591099 svg/custom/manually-parsed-svg-allowed-in-dashboard.html [ Failure ] crbug.com/591099 svg/custom/marker-orient-auto.html [ Failure ] crbug.com/591099 svg/custom/missing-xlink.svg [ Failure ] +crbug.com/591099 svg/custom/mouse-move-on-svg-container-standalone.svg [ Failure Pass ] crbug.com/591099 svg/custom/mouse-move-on-svg-container.xhtml [ Timeout ] crbug.com/591099 svg/custom/mouse-move-on-svg-root.xhtml [ Timeout ] crbug.com/591099 svg/custom/no-fixed-in-svg-assert.html [ Failure ] @@ -20054,6 +20353,7 @@ crbug.com/591099 svg/custom/pattern-3-step-cycle.html [ Failure ] crbug.com/591099 svg/custom/pattern-content-cycle-w-resourceless-container.html [ Failure ] crbug.com/591099 svg/custom/pattern-content-inheritance-cycle.html [ Failure ] +crbug.com/591099 svg/custom/pattern-skew-transformed.svg [ Crash Pass ] crbug.com/591099 svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml [ Failure ] crbug.com/591099 svg/custom/percentage-of-html-parent.xhtml [ Failure ] crbug.com/591099 svg/custom/pointer-events-on-svg-with-pointer.xhtml [ Failure ] @@ -20061,6 +20361,7 @@ crbug.com/591099 svg/custom/poly-parsing-error.html [ Failure ] crbug.com/591099 svg/custom/removed-from-animation-crash.html [ Crash ] crbug.com/591099 svg/custom/rootmost-svg-xy-attrs.xhtml [ Failure ] +crbug.com/591099 svg/custom/rounded-rects.svg [ Crash Pass ] crbug.com/591099 svg/custom/scroll-to-svg-element-assertion.html [ Failure ] crbug.com/591099 svg/custom/second-inline-text.xhtml [ Failure Pass ] crbug.com/591099 svg/custom/simpleCDF.xml [ Failure Pass ] @@ -20090,6 +20391,7 @@ crbug.com/591099 svg/custom/tref-clone-crash.html [ Crash Pass ] crbug.com/591099 svg/custom/tref-with-progress-tag-setpseudo-assert.html [ Failure ] crbug.com/591099 svg/custom/use-crash-in-non-wellformed-document.svg [ Failure ] +crbug.com/591099 svg/custom/use-css-events.svg [ Failure Pass ] crbug.com/591099 svg/custom/use-event-retargeting.html [ Failure ] crbug.com/591099 svg/custom/use-font-face-crash.svg [ Failure ] crbug.com/591099 svg/custom/use-href-attr-removal-crash.html [ Failure ] @@ -20097,6 +20399,8 @@ crbug.com/591099 svg/custom/use-invalid-pattern.svg [ Failure ] crbug.com/591099 svg/custom/use-invalid-style.svg [ Failure ] crbug.com/591099 svg/custom/use-invalidate-click-crash.xhtml [ Crash ] +crbug.com/591099 svg/custom/use-nested-sibling-symbols.html [ Failure Pass ] +crbug.com/591099 svg/custom/use-nested-transform.svg [ Crash Pass ] crbug.com/591099 svg/custom/use-on-disallowed-foreign-object-1.svg [ Failure Pass ] crbug.com/591099 svg/custom/use-on-disallowed-foreign-object-2.svg [ Failure Pass ] crbug.com/591099 svg/custom/use-on-disallowed-foreign-object-3.svg [ Failure Pass ] @@ -20105,8 +20409,11 @@ crbug.com/591099 svg/custom/use-on-disallowed-foreign-object-6.svg [ Failure Pass ] crbug.com/591099 svg/custom/use-on-non-svg-namespaced-element.svg [ Failure Pass ] crbug.com/591099 svg/custom/use-referencing-style-crash.svg [ Failure ] +crbug.com/591099 svg/custom/use-transfer-width-height-properties-to-symbol.svg [ Crash Pass ] +crbug.com/591099 svg/custom/use-transfer-width-height-properties-to-symbol1.svg [ Failure Pass ] crbug.com/591099 svg/custom/viewport-em.svg [ Failure Pass ] -crbug.com/591099 svg/custom/xhtml-no-svg-renderer.xhtml [ Failure Pass ] +crbug.com/591099 svg/custom/xhtml-no-svg-renderer.xhtml [ Crash Failure Pass ] +crbug.com/591099 svg/custom/xlink-custom-namespace.svg [ Crash Pass ] crbug.com/591099 svg/custom/zoomed-alignment-baseline.html [ Crash ] crbug.com/591099 svg/custom/zoomed-baseline-shift.html [ Crash ] crbug.com/591099 svg/custom/zoomed-ex-em-font-sizes.html [ Crash ] @@ -20515,8 +20822,12 @@ crbug.com/591099 svg/dynamic-updates/SVGUseElement-svgdom-href1-prop.html [ Failure ] crbug.com/591099 svg/dynamic-updates/SVGUseElement-svgdom-href2-prop.html [ Failure ] crbug.com/591099 svg/filters/feBlend-all-modes.html [ Failure Pass ] +crbug.com/591099 svg/filters/feColorMatrix-invalid-animation.svg [ Crash Pass ] +crbug.com/591099 svg/filters/feColorMatrix-values.svg [ Crash Pass ] crbug.com/591099 svg/filters/feComponentTransfer-style-crash.xhtml [ Crash ] crbug.com/591099 svg/filters/feDisplacementMap-crash-test.xhtml [ Crash ] +crbug.com/591099 svg/filters/feDropShadow-negative-deviation.svg [ Crash Pass ] +crbug.com/591099 svg/filters/feFlood-rgba-flood-color.svg [ Crash Pass ] crbug.com/591099 svg/filters/feLight-non-lighting-parent-crash.html [ Failure ] crbug.com/591099 svg/filters/feTurbulence-bad-seeds.html [ Failure ] crbug.com/591099 svg/filters/filter-detach-crash.html [ Crash ] @@ -20525,6 +20836,7 @@ crbug.com/591099 svg/foreignObject/body-background.svg [ Failure Pass ] crbug.com/591099 svg/foreignObject/clip.html [ Failure ] crbug.com/591099 svg/foreignObject/fO-parent-display-changes.svg [ Failure Pass ] +crbug.com/591099 svg/foreignObject/fO-parent-display-none-with-relative-pos-content.svg [ Crash Pass ] crbug.com/591099 svg/foreignObject/fO-percentage-height-style.html [ Failure ] crbug.com/591099 svg/foreignObject/filter.html [ Failure ] crbug.com/591099 svg/foreignObject/mask.html [ Failure ] @@ -20560,6 +20872,7 @@ crbug.com/591099 svg/hittest/zero-length-round-cap-path.xhtml [ Crash ] crbug.com/591099 svg/hittest/zero-length-square-cap-path.xhtml [ Crash ] crbug.com/591099 svg/hixie/data-types/002.xhtml [ Failure Pass ] +crbug.com/591099 svg/hixie/dynamic/004.xml [ Crash Pass ] crbug.com/591099 svg/hixie/error/012.xml [ Failure ] crbug.com/591099 svg/hixie/error/013.xml [ Failure ] crbug.com/591099 svg/hixie/intrinsic/003.html [ Failure Pass ] @@ -20619,7 +20932,9 @@ crbug.com/591099 svg/text/scaling-font-with-geometric-precision.html [ Failure ] crbug.com/591099 svg/text/select-svg-text-with-collapsed-whitespace.html [ Crash ] crbug.com/591099 svg/text/select-text-inside-non-static-position.html [ Failure ] +crbug.com/591099 svg/text/select-textLength-spacingAndGlyphs-stretch-4.svg [ Failure Pass ] crbug.com/591099 svg/text/selection-background-color.xhtml [ Failure Pass ] +crbug.com/591099 svg/text/selection-doubleclick.svg [ Failure Pass ] crbug.com/591099 svg/text/selection-dragging-outside-1.html [ Crash ] crbug.com/591099 svg/text/selection-dragging-outside-2.html [ Crash ] crbug.com/591099 svg/text/selection-dragging-outside-3.html [ Crash ] @@ -20631,7 +20946,11 @@ crbug.com/591099 svg/text/text-bbox-empty.html [ Crash ] crbug.com/591099 svg/text/text-bbox-of-empty-after-change.html [ Crash ] crbug.com/591099 svg/text/text-getSubStringLength.html [ Crash ] +crbug.com/591099 svg/text/text-layout-crash.html [ Failure Pass ] crbug.com/591099 svg/text/text-repaint-rects.xhtml [ Failure ] +crbug.com/591099 svg/text/text-selection-align-04-b.svg [ Failure Pass ] +crbug.com/591099 svg/text/text-selection-spacing-01-b.svg [ Failure Pass ] +crbug.com/591099 svg/text/text-selection-ws-01-t.svg [ Failure Pass ] crbug.com/591099 svg/text/text-style-recalc-crash.html [ Failure Pass ] crbug.com/591099 svg/text/textpath-reference-crash.html [ Crash ] crbug.com/591099 svg/text/textquery-collapsed-whitespace.html [ Crash ] @@ -20649,6 +20968,7 @@ crbug.com/591099 svg/transforms/transform-boxsize-usecounter-no-trigger-1.html [ Crash ] crbug.com/591099 svg/transforms/transform-boxsize-usecounter-no-trigger-2.html [ Crash ] crbug.com/591099 svg/transforms/transform-origin-presentation-attribute.xhtml [ Failure ] +crbug.com/591099 svg/transforms/transformed-text-fill-pattern.html [ Failure Pass ] crbug.com/591099 svg/wicd/rightsizing-grid.html [ Failure ] crbug.com/591099 svg/wicd/test-rightsizing-a.xhtml [ Failure ] crbug.com/591099 svg/wicd/test-rightsizing-b.xhtml [ Failure ] @@ -20950,6 +21270,7 @@ crbug.com/591099 tables/mozilla/marvin/tr_bgcolor_white_rgb.html [ Failure ] crbug.com/591099 tables/mozilla/marvin/tr_bgcolor_yellow.html [ Failure ] crbug.com/591099 tables/mozilla/marvin/tr_bgcolor_yellow_rgb.html [ Failure ] +crbug.com/591099 tables/mozilla/marvin/x_col_width_px.xml [ Crash Pass ] crbug.com/591099 tables/mozilla/marvin/x_table_align_center.xml [ Failure ] crbug.com/591099 tables/mozilla/marvin/x_td_nowrap.xml [ Failure ] crbug.com/591099 tables/mozilla/marvin/x_th_nowrap.xml [ Crash Failure ] @@ -20966,6 +21287,7 @@ crbug.com/591099 tables/mozilla_expected_failures/bugs/bug131020-3.html [ Failure Pass ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug14007-2.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug14489.html [ Crash Failure ] +crbug.com/591099 tables/mozilla_expected_failures/bugs/bug178855.xml [ Failure Pass ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug19526.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug220653.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug2479-5.html [ Failure ] @@ -20993,6 +21315,7 @@ crbug.com/591099 tables/mozilla_expected_failures/bugs/bug85016.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug89315.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/bugs/bug91057.html [ Failure ] +crbug.com/591099 tables/mozilla_expected_failures/collapsing_borders/bug41262-1.html [ Failure Pass ] crbug.com/591099 tables/mozilla_expected_failures/collapsing_borders/bug41262-5.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/collapsing_borders/bug41262-6.html [ Failure ] crbug.com/591099 tables/mozilla_expected_failures/core/captions1.html [ Failure ] @@ -21086,6 +21409,7 @@ crbug.com/591099 transforms/overflow-with-transform.html [ Failure ] crbug.com/591099 transforms/perspective-origin-parsing.html [ Crash ] crbug.com/591099 transforms/rotate-parsing.html [ Crash ] +crbug.com/591099 transforms/rotate-will-change-establishes-stacking-context.html [ Crash Pass ] crbug.com/591099 transforms/rotated-transform-affects-scrolling-1.html [ Failure ] crbug.com/591099 transforms/rotated-transform-affects-scrolling-2.html [ Failure ] crbug.com/591099 transforms/scale-parsing.html [ Crash ] @@ -21094,6 +21418,7 @@ crbug.com/591099 transforms/skew-with-unitless-zero.html [ Failure ] crbug.com/591099 transforms/svg-vs-css.xhtml [ Failure ] crbug.com/591099 transforms/topmost-becomes-bottomost-for-scrolling.html [ Failure ] +crbug.com/591099 transforms/transform-focus-ring.html [ Crash Pass ] crbug.com/591099 transforms/transform-hit-test-flipped.html [ Failure Pass ] crbug.com/591099 transforms/transform-inherit-initial-unprefixed.html [ Failure ] crbug.com/591099 transforms/transform-inside-overflow-scroll.html [ Failure ] @@ -21180,7 +21505,6 @@ crbug.com/591099 vibration/vibration-iframe.html [ Timeout ] crbug.com/591099 vibration/vibration-patterns.html [ Failure ] crbug.com/591099 virtual/android/fullscreen/anonymous-block-merge-crash.html [ Crash ] -crbug.com/591099 virtual/android/fullscreen/api/element-request-fullscreen-and-remove-iframe.html [ Crash ] crbug.com/591099 virtual/android/fullscreen/compositor-touch-hit-rects-fullscreen-video-controls.html [ Failure ] crbug.com/591099 virtual/android/fullscreen/enter-exit-full-screen-hover.html [ Crash Pass ] crbug.com/591099 virtual/android/fullscreen/exit-full-screen-iframe.html [ Crash Failure ] @@ -21197,7 +21521,6 @@ crbug.com/591099 virtual/android/fullscreen/full-screen-line-boxes-crash.html [ Failure Pass ] crbug.com/591099 virtual/android/fullscreen/full-screen-no-style-sharing.html [ Failure ] crbug.com/591099 virtual/android/fullscreen/full-screen-placeholder.html [ Failure ] -crbug.com/591099 virtual/android/fullscreen/full-screen-remove-ancestor-during-transition.html [ Crash ] crbug.com/591099 virtual/android/fullscreen/full-screen-request-removed.html [ Failure ] crbug.com/591099 virtual/android/fullscreen/full-screen-table-section.html [ Failure ] crbug.com/591099 virtual/android/fullscreen/full-screen-with-css-reference-filter.html [ Failure ] @@ -21625,6 +21948,7 @@ crbug.com/591099 virtual/disable-spinvalidation/compositing/visibility/visibility-composited-transforms.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/compositing/visibility/visibility-composited.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/compositing/visibility/visibility-image-layers-dynamic.html [ Failure ] +crbug.com/591099 virtual/disable-spinvalidation/compositing/visibility/visibility-image-layers.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/compositing/visibility/visibility-on-distant-descendant.html [ Failure ] crbug.com/591099 virtual/disable-spinvalidation/compositing/webgl/webgl-background-color.html [ Failure ] crbug.com/591099 virtual/disable-spinvalidation/compositing/webgl/webgl-no-alpha.html [ Failure ] @@ -21643,11 +21967,11 @@ crbug.com/591099 virtual/disable-spinvalidation/paint/clipath/clip-path-with-background-and-box-behind.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/paint/frames/frameset-with-stacking-context-and-not-stacking-context-children.html [ Failure ] crbug.com/591099 virtual/disable-spinvalidation/paint/frames/frameset-with-stacking-contexts.html [ Failure ] -crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-all/gradient-invert.html [ Failure ] -crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-all/image-invert.html [ Failure ] +crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-all/gradient-invert.html [ Failure Pass ] +crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-all/image-invert.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-all/text-on-backgrounds.html [ Failure ] -crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-none/gradient-noinvert.html [ Failure ] -crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-none/image-noinvert.html [ Failure ] +crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-none/gradient-noinvert.html [ Failure Pass ] +crbug.com/591099 virtual/disable-spinvalidation/paint/high-contrast-mode/image-filter-none/image-noinvert.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/paint/images/animated-gif-last-frame-crash.html [ Crash ] crbug.com/591099 virtual/disable-spinvalidation/paint/inline/floating-inline.html [ Failure ] crbug.com/591099 virtual/disable-spinvalidation/paint/inline/focus-ring-under-absolute-with-relative-continuation.html [ Failure ] @@ -22313,6 +22637,7 @@ crbug.com/591099 virtual/disable-spinvalidation/paint/tables/composited-collapsed-table-borders.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/paint/tables/huge-table-composited-scroll.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/paint/tables/self-painting-row-background-vertical-clipped.html [ Failure ] +crbug.com/591099 virtual/disable-spinvalidation/paint/tables/stacking-context-row-background-clipped-with-offset.html [ Failure ] crbug.com/591099 virtual/disable-spinvalidation/paint/tables/tbody-transformed.html [ Failure Pass ] crbug.com/591099 virtual/disable-spinvalidation/paint/text/selection-no-clip-text.html [ Failure ] crbug.com/591099 virtual/disable-spinvalidation/paint/text/text-match-highlights-big-line-height.html [ Failure ] @@ -22519,7 +22844,7 @@ crbug.com/591099 virtual/exotic-color-space/images/alt-text-wrapping.html [ Crash Failure ] crbug.com/591099 virtual/exotic-color-space/images/animated-background-image-crash.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/bad-png.html [ Crash Pass ] -crbug.com/591099 virtual/exotic-color-space/images/busted-oval-does-not-render.html [ Crash ] +crbug.com/591099 virtual/exotic-color-space/images/busted-oval-does-not-render.html [ Crash Pass ] crbug.com/591099 virtual/exotic-color-space/images/color-jpeg-with-color-profile.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/color-profile-background-clip-text.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/color-profile-background-image-cover.html [ Failure ] @@ -22546,8 +22871,11 @@ crbug.com/591099 virtual/exotic-color-space/images/color-profile-layer-filter.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/color-profile-layer.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/color-profile-mask-image-svg.html [ Failure ] +crbug.com/591099 virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb.html [ Failure ] +crbug.com/591099 virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/color-profile-svg-foreign-object.html [ Failure ] -crbug.com/591099 virtual/exotic-color-space/images/content-url-image-with-alt-text-dynamic-2.html [ Crash ] +crbug.com/591099 virtual/exotic-color-space/images/content-url-broken-image-with-alt-text.html [ Crash Pass ] +crbug.com/591099 virtual/exotic-color-space/images/content-url-image-with-alt-text-dynamic-2.html [ Crash Pass ] crbug.com/591099 virtual/exotic-color-space/images/cross-fade-background-size.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/cross-fade-blending.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/cross-fade-invalidation.html [ Failure ] @@ -22558,7 +22886,7 @@ crbug.com/591099 virtual/exotic-color-space/images/cross-fade-svg-size.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/cross-fade-tiled.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/destroyed-image-load-event.html [ Crash ] -crbug.com/591099 virtual/exotic-color-space/images/drag-pdf-as-image.html [ Crash ] +crbug.com/591099 virtual/exotic-color-space/images/drag-pdf-as-image.html [ Crash Pass ] crbug.com/591099 virtual/exotic-color-space/images/drag-svg-image.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/embed-does-not-propagate-dimensions-to-object-ancestor.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/exif-orientation-css.html [ Crash Failure ] @@ -22581,7 +22909,7 @@ crbug.com/591099 virtual/exotic-color-space/images/image-empty-data.html [ Crash Failure ] crbug.com/591099 virtual/exotic-color-space/images/image-hover-display-alt.html [ Crash Failure ] crbug.com/591099 virtual/exotic-color-space/images/image-in-map.html [ Crash Failure ] -crbug.com/591099 virtual/exotic-color-space/images/image-invalid-data.html [ Crash ] +crbug.com/591099 virtual/exotic-color-space/images/image-invalid-data.html [ Crash Failure ] crbug.com/591099 virtual/exotic-color-space/images/image-load-event-in-fragment.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/image-map-anchor-children.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/image-map-multiple-xhtml.xhtml [ Failure ] @@ -22611,6 +22939,7 @@ crbug.com/591099 virtual/exotic-color-space/images/jpeg-yuv-image-decoding.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/jpeg-yuv-progressive-image.html [ Failure ] +crbug.com/591099 virtual/exotic-color-space/images/large-size-image-crash.html [ Crash Pass ] crbug.com/591099 virtual/exotic-color-space/images/link-body-content-imageDimensionChanged-crash.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/load-img-with-empty-src.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/motion-jpeg-single-frame.html [ Failure ] @@ -22621,6 +22950,7 @@ crbug.com/591099 virtual/exotic-color-space/images/percent-height-image.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/pixel-crack-image-background-webkit-transform-scale.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/png-extra-row-crash.html [ Failure ] +crbug.com/591099 virtual/exotic-color-space/images/png-missing-plte-before-trns-crash.html [ Crash Pass ] crbug.com/591099 virtual/exotic-color-space/images/png-suite/test.html [ Crash ] crbug.com/591099 virtual/exotic-color-space/images/png_per_row_alpha_decoding.html [ Failure ] crbug.com/591099 virtual/exotic-color-space/images/rendering-broken-0px-images-quirk.html [ Crash Failure ] @@ -22969,11 +23299,11 @@ crbug.com/591099 virtual/gpu/fast/canvas/webgl/webgl-texture-binding-preserved.html [ Failure ] crbug.com/591099 virtual/gpu/fast/canvas/webgl/webgl-viewport-parameters-preserved.html [ Failure ] crbug.com/591099 virtual/gpu/fast/canvas/zero-size-fill-rect.html [ Crash ] -crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/gradient-invert.html [ Failure ] -crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert.html [ Failure ] +crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/gradient-invert.html [ Failure Pass ] +crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert.html [ Failure Pass ] crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/text-on-backgrounds.html [ Failure ] -crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/gradient-noinvert.html [ Failure ] -crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/image-noinvert.html [ Failure ] +crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/gradient-noinvert.html [ Failure Pass ] +crbug.com/591099 virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/image-noinvert.html [ Failure Pass ] crbug.com/591099 virtual/layout_ng/external/wpt/css/CSS2/floats/floats-wrap-top-below-inline-003r.xht [ Failure Pass ] crbug.com/591099 virtual/layout_ng/external/wpt/css/CSS2/linebox/empty-inline-002.xht [ Crash Failure Pass ] crbug.com/591099 virtual/layout_ng/external/wpt/css/CSS2/normal-flow/height-114.xht [ Crash Failure ] @@ -22995,13 +23325,19 @@ crbug.com/591099 virtual/layout_ng/external/wpt/css/CSS2/positioning/top-104.xht [ Crash Failure ] crbug.com/591099 virtual/layout_ng/external/wpt/css/CSS2/positioning/top-113.xht [ Crash Failure ] crbug.com/591099 virtual/layout_ng/fast/block/basic/fieldset-stretch-to-legend.html [ Crash Failure ] +crbug.com/591099 virtual/layout_ng/fast/block/float/002.html [ Failure ] crbug.com/591099 virtual/layout_ng/fast/block/float/014.html [ Crash Failure ] +crbug.com/591099 virtual/layout_ng/fast/block/float/017.html [ Failure ] crbug.com/591099 virtual/layout_ng/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html [ Crash Failure ] +crbug.com/591099 virtual/layout_ng/fast/block/float/formatting-context-changes.html [ Failure ] crbug.com/591099 virtual/layout_ng/fast/block/float/overhanging-float-add-in-static-position-block.html [ Failure ] crbug.com/591099 virtual/layout_ng/fast/block/float/overhanging-float-add-in-static-position-block2.html [ Failure ] +crbug.com/591099 virtual/layout_ng/fast/block/float/rubybase-children-made-inline-crash.html [ Failure ] crbug.com/591099 virtual/layout_ng/fast/block/float/rubybase-children-moved-crash-2.html [ Crash Failure ] crbug.com/591099 virtual/layout_ng/fast/block/margin-collapse/line-beside-float-complex-margin-collapsing.html [ Failure ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector-protocol/network-data-length.html [ Pass Timeout ] +crbug.com/591099 virtual/mojo-loading/http/tests/inspector-protocol/network/disable-interception-midway.html [ Timeout ] +crbug.com/591099 virtual/mojo-loading/http/tests/inspector-protocol/network/request-interception-mock302.html [ Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector-protocol/override-referrer.html [ Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector-protocol/reload-memory-cache.html [ Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable.html [ Pass Timeout ] @@ -23009,17 +23345,21 @@ crbug.com/591099 virtual/mojo-loading/http/tests/inspector/appcache/appcache-iframe-manifests.html [ Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector/appcache/appcache-manifest-with-non-existing-file.html [ Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector/appcache/appcache-swap.html [ Pass Timeout ] -crbug.com/591099 virtual/mojo-loading/http/tests/inspector/bindings/livelocation-main-frame-navigated.html [ Failure ] +crbug.com/591099 virtual/mojo-loading/http/tests/inspector/bindings/livelocation-main-frame-navigated.html [ Failure Pass Timeout ] +crbug.com/591099 virtual/mojo-loading/http/tests/inspector/network/network-fetch.html [ Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector/network/network-filters.html [ Failure Pass ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector/network/waterfall-images.html [ Failure Pass ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector/persistence/automapping-sourcemap.html [ Failure Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/inspector/persistence/persistence-tabbed-editor-tabs-order.html [ Pass Timeout ] -crbug.com/591099 virtual/mojo-loading/http/tests/inspector/workers-on-navigation.html [ Failure Pass ] +crbug.com/591099 virtual/mojo-loading/http/tests/inspector/workers-on-navigation.html [ Failure Pass Timeout ] +crbug.com/591099 virtual/mojo-loading/http/tests/local/blob/send-data-blob.html [ Crash Pass ] crbug.com/591099 virtual/mojo-loading/http/tests/permissions/chromium/test-request-sharedworker.html [ Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/security/contentSecurityPolicy/directive-parsing-03.html [ Failure Pass ] +crbug.com/591099 virtual/mojo-loading/http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html [ Crash Pass ] crbug.com/591099 virtual/mojo-loading/http/tests/security/contentSecurityPolicy/source-list-parsing-04.html [ Failure Pass ] crbug.com/591099 virtual/mojo-loading/http/tests/security/cors-rfc1918/addressspace-document-csp-appcache.html [ Failure Pass Timeout ] crbug.com/591099 virtual/mojo-loading/http/tests/security/cross-frame-mouse-source-capabilities.html [ Pass Timeout ] +crbug.com/591099 virtual/mojo-loading/http/tests/security/link-crossorigin-preload-anonymous.html [ Failure Pass ] crbug.com/591099 virtual/mojo-loading/http/tests/serviceworker/ServiceWorkerGlobalScope/registration-attribute.html [ Failure Pass ] crbug.com/591099 virtual/mojo-localstorage/external/wpt/webstorage/event_no_duplicates.html [ Crash ] crbug.com/591099 virtual/mojo-localstorage/external/wpt/webstorage/storage_setitem.html [ Pass Timeout ] @@ -23075,6 +23415,7 @@ crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/clients-matchall-order.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/clients-matchall.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/extendable-event-async-waituntil.https.html [ Crash ] +crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-canvas-tainting.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-cors-xhr.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-event-redirect.https.html [ Pass Timeout ] @@ -23083,7 +23424,7 @@ crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-mixed-content-to-inscope.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-mixed-content-to-outscope.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-request-css-images.https.html [ Crash ] -crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-request-fallback.https.html [ Crash ] +crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-request-fallback.https.html [ Crash Pass ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-response-taint.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/foreign-fetch-basics.https.html [ Crash ] @@ -23097,9 +23438,11 @@ crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/navigation-redirect.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/ready.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/register-closed-window.https.html [ Crash ] +crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/register-link-element.https.html [ Pass Timeout ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/register-link-header.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/register-same-scope-different-script-url.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/registration-iframe.https.html [ Crash ] +crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/skip-waiting-using-registration.https.html [ Pass Timeout ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/unregister-controller.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https.html [ Crash ] crbug.com/591099 virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/unregister-then-register.https.html [ Crash ] @@ -23363,6 +23706,8 @@ crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/basic-scrollbar.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-appearance-property.html [ Failure ] +crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-changing-style-relayout-body-scrollablearea.html [ Crash Pass ] +crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-changing-style-relayout-div-body-scrollablearea.html [ Crash Pass ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-enable-changes-thickness-with-iframe.html [ Failure Pass ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-not-inherited-by-iframe.html [ Crash ] @@ -23386,6 +23731,7 @@ crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-click-does-not-blur-content.html [ Crash ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-content-crash.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-crash-on-refresh.html [ Failure ] +crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-large-overflow-rectangle.html [ Crash Pass ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-miss-mousemove-disabled.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-miss-mousemove.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/scrollbars/scrollbar-orientation.html [ Failure ] @@ -23442,6 +23788,8 @@ crbug.com/591099 virtual/rootlayerscrolls/scrollbars/basic-scrollbar.html [ Failure ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars.html [ Failure ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/custom-scrollbar-appearance-property.html [ Failure ] +crbug.com/591099 virtual/rootlayerscrolls/scrollbars/custom-scrollbar-changing-style-relayout-body-scrollablearea.html [ Crash Pass ] +crbug.com/591099 virtual/rootlayerscrolls/scrollbars/custom-scrollbar-changing-style-relayout-div-body-scrollablearea.html [ Crash Pass ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display.html [ Failure ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/custom-scrollbar-enable-changes-thickness-with-iframe.html [ Failure Pass ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/custom-scrollbar-not-inherited-by-iframe.html [ Crash ] @@ -23465,6 +23813,7 @@ crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-click-does-not-blur-content.html [ Crash ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-content-crash.html [ Failure ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-crash-on-refresh.html [ Failure ] +crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-large-overflow-rectangle.html [ Crash Pass ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-miss-mousemove-disabled.html [ Failure ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-miss-mousemove.html [ Failure ] crbug.com/591099 virtual/rootlayerscrolls/scrollbars/scrollbar-orientation.html [ Failure ] @@ -23499,6 +23848,7 @@ crbug.com/591099 virtual/scalefactor200withzoom/fast/hidpi/static/mousewheel-scroll-amount.html [ Failure ] crbug.com/591099 virtual/scalefactor200withzoom/fast/hidpi/static/popup-menu-appearance.html [ Failure ] crbug.com/591099 virtual/scalefactor200withzoom/fast/hidpi/static/popup-menu-with-scrollbar-appearance.html [ Failure ] +crbug.com/591099 virtual/scroll_customization/fast/scrolling/scrollbar-prevent-default.html [ Failure Pass ] crbug.com/591099 virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker.html [ Pass Timeout ] crbug.com/591099 virtual/service-worker-navigation-preload-disabled/webexposed/custom-elements.html [ Failure ] crbug.com/591099 virtual/service-worker-navigation-preload-disabled/webexposed/element-instance-property-listing.html [ Timeout ] @@ -23545,7 +23895,10 @@ crbug.com/591099 virtual/stable/http/tests/navigation/navigation-with-detached-origin-document.html [ Crash Pass ] crbug.com/591099 virtual/stable/http/tests/navigation/no-referrer-reset.html [ Failure Timeout ] crbug.com/591099 virtual/stable/http/tests/navigation/onload-navigation-iframe-2.html [ Failure ] -crbug.com/591099 virtual/stable/http/tests/navigation/ping-same-origin.html [ Crash Timeout ] +crbug.com/591099 virtual/stable/http/tests/navigation/ping-cookie.html [ Crash Pass ] +crbug.com/591099 virtual/stable/http/tests/navigation/ping-cross-origin-from-https.html [ Crash Pass ] +crbug.com/591099 virtual/stable/http/tests/navigation/ping-cross-origin.html [ Crash Pass ] +crbug.com/591099 virtual/stable/http/tests/navigation/ping-same-origin.html [ Crash Pass Timeout ] crbug.com/591099 virtual/stable/http/tests/navigation/post-301-response.html [ Crash Pass ] crbug.com/591099 virtual/stable/http/tests/navigation/post-302-response.html [ Crash Pass ] crbug.com/591099 virtual/stable/http/tests/navigation/post-303-response.html [ Crash Pass ] @@ -23556,7 +23909,10 @@ crbug.com/591099 virtual/stable/http/tests/navigation/post-goback-same-url.html [ Crash Failure ] crbug.com/591099 virtual/stable/http/tests/navigation/post-goback1.html [ Crash Failure ] crbug.com/591099 virtual/stable/http/tests/navigation/post-goback2.html [ Crash Failure ] +crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-basic.html [ Failure ] crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-frames-goback1.html [ Crash Failure ] +crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-frames.html [ Failure ] +crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-goback1.html [ Failure ] crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-goback2.html [ Crash Failure ] crbug.com/591099 virtual/stable/http/tests/navigation/redirect-load-no-form-restoration.html [ Crash Pass ] crbug.com/591099 virtual/stable/http/tests/navigation/redirect302-basic.html [ Crash Failure ] @@ -23636,6 +23992,7 @@ crbug.com/591099 virtual/threaded/animations/empty-keyframes.html [ Failure ] crbug.com/591099 virtual/threaded/animations/img-element-transform.html [ Crash Timeout ] crbug.com/591099 virtual/threaded/animations/import-crash.html [ Failure ] +crbug.com/591099 virtual/threaded/animations/import.html [ Pass Timeout ] crbug.com/591099 virtual/threaded/animations/inline-block-transform.html [ Crash ] crbug.com/591099 virtual/threaded/animations/inline-element-animation-end-hit-test.html [ Failure ] crbug.com/591099 virtual/threaded/animations/interpolation/backdrop-filter-interpolation.html [ Crash ] @@ -23666,6 +24023,7 @@ crbug.com/591099 virtual/threaded/animations/interpolation/font-weight-interpolation.html [ Crash ] crbug.com/591099 virtual/threaded/animations/interpolation/height-interpolation.html [ Crash ] crbug.com/591099 virtual/threaded/animations/interpolation/line-height-interpolation.html [ Crash ] +crbug.com/591099 virtual/threaded/animations/interpolation/list-style-image-interpolation.html [ Pass Timeout ] crbug.com/591099 virtual/threaded/animations/interpolation/margin-interpolation.html [ Crash ] crbug.com/591099 virtual/threaded/animations/interpolation/max-height-interpolation.html [ Crash ] crbug.com/591099 virtual/threaded/animations/interpolation/min-height-interpolation.html [ Crash ] @@ -23892,6 +24250,7 @@ crbug.com/591099 virtual/threaded/animations/svg-presentation-attribute-animation.html [ Crash ] crbug.com/591099 virtual/threaded/animations/svg-responsive-to-timing-updates.html [ Crash ] crbug.com/591099 virtual/threaded/animations/timing-model.html [ Pass Timeout ] +crbug.com/591099 virtual/threaded/animations/unsigned-underflow.html [ Pass Timeout ] crbug.com/591099 virtual/threaded/animations/zero-duration-infinite-iterations.html [ Failure ] crbug.com/591099 virtual/threaded/animations/zero-duration-large-start-delay.html [ Failure ] crbug.com/591099 virtual/threaded/compositing/visibility/compositing-and-visibility-turned-off-together.html [ Failure ] @@ -24201,53 +24560,3 @@ crbug.com/591099 webmidi/send-messages.html [ Failure ] crbug.com/591099 webmidi/send-system-messages.html [ Failure ] crbug.com/591099 xmlviewer/extensions-api.html [ Failure ] -crbug.com/591099 css3/blending/svg-blend-luminosity.html [ Failure ] -crbug.com/591099 css3/blending/svg-blend-color.html [ Failure ] -crbug.com/591099 css3/blending/svg-blend-hue.html [ Failure ] -crbug.com/591099 css3/blending/svg-blend-saturation.html [ Failure ] -crbug.com/591099 fast/forms/fieldset/legend-after-margin-horizontal-writing-mode.html [ Failure ] -crbug.com/591099 fast/forms/fieldset/legend-after-margin-vertical-writing-mode.html [ Failure ] -crbug.com/591099 fast/forms/number/number-losing-renderer-on-click.html [ Crash ] -crbug.com/591099 fast/forms/text/textfield-onchange-deletion.html [ Crash ] -crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-transform.html [ Failure ] -crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-minimum-font.html [ Failure ] -crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-texttransform.html [ Failure ] -crbug.com/591099 fast/forms/select-popup/popup-menu-appearance-single-option.html [ Failure ] -crbug.com/591099 fast/forms/select-popup/popup-menu-key-operations.html [ Failure ] -crbug.com/591099 fast/forms/select-popup/popup-menu-appearance.html [ Failure ] -crbug.com/591099 fast/multicol/paged-becomes-multicol-with-spanner.html [ Failure ] -crbug.com/591099 fast/events/onbeforeunload-focused-iframe.html [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-left-right-vrl-008.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vrl-006.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-left-right-vlr-009.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vlr-007.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-ltr-top-bottom-vrl-002.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes-3/overconstrained-rel-pos-ltr-top-bottom-vlr-003.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-list-001-none.html [ Failure ] -crbug.com/591099 external/wpt/css/css-display-3/display-contents-list-001.html [ Failure ] -crbug.com/591099 external/wpt/css/css-display-3/display-contents-dynamic-list-001-inline.html [ Failure ] -crbug.com/591099 external/wpt/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_srcdoc.html [ Crash ] -crbug.com/591099 external/wpt/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html [ Crash ] -crbug.com/591099 inspector/sources/debugger/live-edit.html [ Failure ] -crbug.com/591099 inspector/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints.html [ Crash Timeout ] -crbug.com/591099 virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb.html [ Failure ] -crbug.com/591099 virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb.html [ Failure ] -crbug.com/591099 virtual/layout_ng/fast/block/float/002.html [ Failure ] -crbug.com/591099 virtual/layout_ng/fast/block/float/017.html [ Failure ] -crbug.com/591099 virtual/layout_ng/fast/block/float/formatting-context-changes.html [ Failure ] -crbug.com/591099 virtual/layout_ng/fast/block/float/rubybase-children-made-inline-crash.html [ Failure ] -crbug.com/591099 http/tests/csspaint/border-color.html [ Failure ] -crbug.com/591099 fast/ruby/generated-before-counter-doesnt-crash.html [ Failure ] -crbug.com/591099 fast/pagination/auto-height.html [ Failure ] -crbug.com/591099 fast/history/saves-state-after-frame-nav.html [ Failure ] -crbug.com/591099 paint/tables/stacking-context-row-background-clipped-with-offset.html [ Failure ] -crbug.com/591099 external/wpt/css/css-rhythm-1/line-height-step-writing-mode-vrl-ruby-001.html [ Failure ] -crbug.com/591099 editing/pasteboard/smart-paste-in-text-control.html [ Failure ] -crbug.com/591099 editing/selection/readonly-disabled-hittest.html [ Failure ] -crbug.com/591099 virtual/disable-spinvalidation/paint/tables/stacking-context-row-background-clipped-with-offset.html [ Failure ] -crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-frames.html [ Failure ] -crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-basic.html [ Failure ] -crbug.com/591099 virtual/stable/http/tests/navigation/postredirect-goback1.html [ Failure ] -crbug.com/591099 http/tests/navigation/postredirect-frames.html [ Failure ] -crbug.com/591099 http/tests/navigation/postredirect-basic.html [ Failure ] -crbug.com/591099 http/tests/navigation/postredirect-goback1.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 4b8a60b..24949c0 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -1646,10 +1646,6 @@ crbug.com/240576 external/wpt/fullscreen/api/element-ready-check-containing-iframe-manual.html [ Timeout Failure Pass ] -# TODO(foolip): Make the timing of fullscreen events reliable. -crbug.com/402376 external/wpt/fullscreen/api/document-exit-fullscreen-timing-manual.html [ Failure Pass ] -crbug.com/402376 external/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html [ Failure Pass ] - crbug.com/567230 [ Debug ] virtual/threaded/animations/restart-not-visible.html [ Timeout ] crbug.com/567419 inspector/elements/styles-2/metrics-box-sizing.html [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-0.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-0.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-0.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-0.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-1.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-1.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-1.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-1.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-2.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-2.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-2.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-2.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-3.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-3.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-3.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-3.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-4.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-4.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-4.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-4.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-5.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-5.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-5.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-5.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-6.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-6.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-6.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-6.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-7.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-7.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-7.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-7.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-8.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-8.html index 999f075..36c3025f5 100644 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-8.html +++ b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-8.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="resources/css-protocol-test.js"></script> + <script type="text/javascript" src="resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/style-matching-test.js"></script> <!-- available fonts ---> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js b/third_party/WebKit/LayoutTests/css3/fonts/resources/css-protocol-test.js similarity index 100% rename from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js rename to third_party/WebKit/LayoutTests/css3/fonts/resources/css-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/dom-protocol-test.js b/third_party/WebKit/LayoutTests/css3/fonts/resources/dom-protocol-test.js similarity index 100% rename from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/dom-protocol-test.js rename to third_party/WebKit/LayoutTests/css3/fonts/resources/dom-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js b/third_party/WebKit/LayoutTests/css3/fonts/resources/inspector-protocol-test.js similarity index 97% rename from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js rename to third_party/WebKit/LayoutTests/css3/fonts/resources/inspector-protocol-test.js index 64501da1..6dd8c3e 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js +++ b/third_party/WebKit/LayoutTests/css3/fonts/resources/inspector-protocol-test.js
@@ -137,7 +137,7 @@ var scriptTags = document.getElementsByTagName("script"); var scriptUrlBasePath = ""; for (var i = 0; i < scriptTags.length; ++i) { - var index = scriptTags[i].src.lastIndexOf("/inspector-protocol-test.js"); + var index = scriptTags[i].src.lastIndexOf("/resources/inspector-protocol-test.js"); if (index > -1 ) { scriptUrlBasePath = scriptTags[i].src.slice(0, index); break;
diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/protocol-test.html b/third_party/WebKit/LayoutTests/css3/fonts/resources/protocol-test.html new file mode 100644 index 0000000..1f3ce3c --- /dev/null +++ b/third_party/WebKit/LayoutTests/css3/fonts/resources/protocol-test.html
@@ -0,0 +1,449 @@ +<!-- +Copyright (C) 2012 Samsung Electronics. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<html> +<head> +<script> + +DevToolsAPI = {}; + +InspectorTest = {}; +InspectorTest._dispatchTable = []; +InspectorTest._requestId = -1; +InspectorTest._dumpInspectorProtocolMessages = false; +InspectorTest._embedderRequestId = -1; +InspectorTest.eventHandler = {}; + +InspectorTest.startDumpingProtocolMessages = function() +{ + InspectorTest._dumpInspectorProtocolMessages = true; +} + +/** + * @param {string} method + * @param {object} params + * @param {function({object} messageObject)=} handler + */ +InspectorTest.sendCommand = function(method, params, handler) +{ + this._dispatchTable[++this._requestId] = handler; + + var messageObject = { "method": method, + "params": params, + "id": this._requestId }; + + if (InspectorTest._dumpInspectorProtocolMessages) + testRunner.logToStderr("frontend: " + JSON.stringify(messageObject)); + var embedderMessage = { "id": ++this._embedderRequestId, "method": "dispatchProtocolMessage", "params": [JSON.stringify(messageObject)] }; + DevToolsHost.sendMessageToEmbedder(JSON.stringify(embedderMessage)); + return this._requestId; +} + +InspectorTest.sendCommandOrDie = function(command, properties, callback) +{ + var fulfill; + var result = new Promise(f => fulfill = f); + + InspectorTest.sendCommand(command, properties || {}, commandCallback); + function commandCallback(msg) + { + if (msg.error) { + InspectorTest.log("ERROR: " + msg.error.message); + InspectorTest.completeTest(); + return; + } + if (callback) + callback(msg.result); + fulfill(msg.result); + } + return result; +} + +InspectorTest.sendCommandPromise = function(method, params) +{ + var callback; + var promise = new Promise(fulfill => callback = fulfill); + InspectorTest.sendCommand(method, params, callback); + return promise; +} + +InspectorTest.waitForEventPromise = function(eventName) +{ + return new Promise(fulfill => InspectorTest.eventHandler[eventName] = fullfillAndClearListener.bind(null, fulfill)); + + function fullfillAndClearListener(fulfill, result) + { + fulfill(result); + delete InspectorTest.eventHandler[eventName]; + } +} + +InspectorTest.domUndo = function(callback) +{ + InspectorTest.sendCommandOrDie("DOM.undo", {}, callback); +} + +InspectorTest.undoAndNext = function(next) +{ + return InspectorTest.domUndo.bind(InspectorTest, next); +} + +InspectorTest.runTestSuite = function(testSuite) +{ + function nextTest() + { + if (!testSuite.length) { + InspectorTest.completeTest(); + return; + } + var fun = testSuite.shift(); + InspectorTest.log("\nRunning test: " + fun.name); + fun(nextTest); + } + + nextTest(); +} + +/** + * @param {function(object)=} callback + */ +InspectorTest.wrapCallback = function(callback) +{ + /** + * @param {object} message + */ + function callbackWrapper(message) + { + if (InspectorTest.completeTestIfError(message)) + return; + if (!callback) + return; + try { + callback(message["result"]); + } catch (e) { + InspectorTest.log("Exception " + e + " while invoking callback: " + callback); + InspectorTest.completeTest(); + } + } + return callbackWrapper; +} + +/** + * @param {string} command + * @param {function({object} messageObject)=} handler + */ +InspectorTest.sendRawCommand = function(command, handler) +{ + this._dispatchTable[++this._requestId] = handler; + var embedderMessage = { "id": ++this._embedderRequestId, "method": "dispatchProtocolMessage", "params": [command] }; + DevToolsHost.sendMessageToEmbedder(JSON.stringify(embedderMessage)); + return this._requestId; +} + +InspectorTest.readyForTest = function() +{ + var embedderMessage = { "id": ++this._embedderRequestId, "method": "readyForTest" }; + DevToolsHost.sendMessageToEmbedder(JSON.stringify(embedderMessage)); +} + +/** + * @param {string|!Object} messageOrObject + */ +DevToolsAPI.dispatchMessage = function(messageOrObject) +{ + var messageObject = (typeof messageOrObject === "string" ? JSON.parse(messageOrObject) : messageOrObject); + if (InspectorTest._dumpInspectorProtocolMessages) + testRunner.logToStderr("backend: " + JSON.stringify(messageObject)); + var messageId = messageObject["id"]; + try { + if (typeof messageId === "number") { + var handler = InspectorTest._dispatchTable[messageId]; + if (handler && typeof handler === "function") + handler(messageObject); + } else { + var eventName = messageObject["method"]; + var eventHandler = InspectorTest.eventHandler[eventName]; + if (eventHandler) + eventHandler(messageObject); + } + } catch(e) { + InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stack + "\n message = " + JSON.stringify(messageObject, null, 2)); + InspectorTest.completeTest(); + } +} + +/** + * @param {number} callId + * @param {string} script + */ +DevToolsAPI.evaluateForTestInFrontend = function(callId, script) +{ + try { + eval(script); + } catch (e) { + InspectorTest.log("FAIL: exception in evaluateForTestInFrontend: " + e); + InspectorTest.completeTest(); + } +} + +/** +* Logs message to document. +* @param {string} message +*/ +InspectorTest.log = function(message) +{ + this.sendCommand("Runtime.evaluate", { "expression": "log(" + JSON.stringify(message) + ")" } ); +} + +/** +* Formats and logs object to document. +* @param {Object} object +* @param {string=} title +* @param {Array<string>=} unstableKeys +*/ +InspectorTest.logObject = function(object, title, unstableKeys) +{ + var lines = []; + + function dumpValue(value, prefix, prefixWithName) + { + if (typeof value === "object" && value !== null) { + if (value instanceof Array) + dumpItems(value, prefix, prefixWithName); + else + dumpProperties(value, prefix, prefixWithName); + } else { + lines.push(prefixWithName + String(value).replace(/\n/g, " ")); + } + } + + function dumpProperties(object, prefix, firstLinePrefix) + { + prefix = prefix || ""; + firstLinePrefix = firstLinePrefix || prefix; + lines.push(firstLinePrefix + "{"); + + var propertyNames = Object.keys(object); + propertyNames.sort(); + for (var i = 0; i < propertyNames.length; ++i) { + var name = propertyNames[i]; + if (!object.hasOwnProperty(name)) + continue; + var prefixWithName = " " + prefix + name + " : "; + var value = object[name]; + if (unstableKeys && unstableKeys.indexOf(name) !== -1) + value = "<" + typeof(value) + ">"; + dumpValue(value, " " + prefix, prefixWithName); + } + lines.push(prefix + "}"); + } + + function dumpItems(object, prefix, firstLinePrefix) + { + prefix = prefix || ""; + firstLinePrefix = firstLinePrefix || prefix; + lines.push(firstLinePrefix + "["); + for (var i = 0; i < object.length; ++i) + dumpValue(object[i], " " + prefix, " " + prefix + "[" + i + "] : "); + lines.push(prefix + "]"); + } + + dumpValue(object, "", title); + InspectorTest.log(lines.join("\n")); +} + +/** +* Logs message directly to process stdout via alert function (hopefully followed by flush call). +* This message should survive process crash or kill by timeout. +* @param {string} message +*/ +InspectorTest.debugLog = function(message) +{ + this.sendCommand("Runtime.evaluate", { "expression": "debugLog(" + JSON.stringify(message) + ")" } ); +} + +InspectorTest.completeTest = function() +{ + this.sendCommand("Runtime.evaluate", { "expression": "closeTest();"} ); +} + +/** + * Evaluates string in page. + * @param {string} message + * @param {!function} callback + */ +InspectorTest.evaluateInPage = function(string, callback) +{ + this.sendCommand("Runtime.evaluate", { "expression": string }, function(message) { + if (message.error) + InspectorTest.log("Error while executing '" + string + "': " + message.error.message); + else if (callback) + callback(message.result.result.value); + }); +}; + +/** + * Evaluates expression in page. + * @param {string} expression + * @return {!Promise<?>} + */ +InspectorTest.evaluateInPagePromise = function(expression) +{ + return InspectorTest.sendCommandPromise("Runtime.evaluate", { "expression": expression, awaitPromise: false, returnByValue: true }); +}; + +InspectorTest.evaluateInPageAsync = function(expression) +{ + return InspectorTest.sendCommandPromise("Runtime.evaluate", { "expression": expression, awaitPromise: true, returnByValue: true }).then((message) => message.result.result.value); +} + +InspectorTest.completeTestIfError = function(messageObject) +{ + if (messageObject.error) { + InspectorTest.log(messageObject.error.message); + InspectorTest.completeTest(); + return true; + } + return false; +} + +InspectorTest.checkExpectation = function(fail, name, messageObject) +{ + if (fail === !!messageObject.error) { + InspectorTest.log("PASS: " + name); + return true; + } + + InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject)); + InspectorTest.completeTest(); + return false; +} +InspectorTest.expectedSuccess = InspectorTest.checkExpectation.bind(null, false); +InspectorTest.expectedError = InspectorTest.checkExpectation.bind(null, true); + +/** + * @param {string} scriptName + */ +InspectorTest.importScript = function(scriptName) +{ + var xhr = new XMLHttpRequest(); + xhr.open("GET", scriptName, false); + xhr.send(null); + window.eval(xhr.responseText + "\n//# sourceURL=" + scriptName); +} + +InspectorTest.safeWrap = function(func, onexception) +{ + function result() + { + if (!func) + return; + var wrapThis = this; + try { + return func.apply(wrapThis, arguments); + } catch(e) { + InspectorTest.log("Exception while running: " + func + "\n" + (e.stack || e)); + if (onexception) + InspectorTest.safeWrap(onexception)(); + else + InspectorTest.completeTest(); + } + } + return result; +} + +InspectorTest.navigate = function(url, callback) +{ + InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); + InspectorTest.evaluateInPage("navigateProtocolTest('" + url + "')"); +} + +InspectorTest.pageReloaded = function() +{ + InspectorTest.log("Page reloaded."); + var callback = InspectorTest._pageLoadedCallback; + delete InspectorTest._pageLoadedCallback; + if (callback) + callback(); +} + +InspectorTest.reloadProtocolTest = function(ignoreCache, callback) +{ + InspectorTest._pageLoadedCallback = afterReload; + // This will ensure we maintain logs after navigate. + + getLogs(getOldLogsCallback); + + function getLogs(getLogsCallback) + { + InspectorTest.evaluateInPage("outputElement.innerHTML", data => getLogsCallback(data.split("<br>"))); + } + + function clearLogs(clearLogsCallback) + { + InspectorTest.evaluateInPage("outputElement.textContent = \"\"", clearLogsCallback); + } + + var oldLogs; + + function getOldLogsCallback(data) + { + oldLogs = data; + prepareForReload(); + } + + function prepareForReload() + { + InspectorTest.evaluateInPage("prepareForReload()", reload); + } + + function reload() + { + InspectorTest.sendCommand("Page.reload", { "ignoreCache": ignoreCache }); + } + + function afterReload() + { + var currentLogs; + getLogs(data => { + currentLogs = data; + clearLogs(addLogsBack); + }); + + function addLogsBack() + { + for (var log of oldLogs) + InspectorTest.log(log); + for (var log of currentLogs) + InspectorTest.log(log); + callback(); + } + } +} + +window.addEventListener("load", InspectorTest.readyForTest.bind(InspectorTest), false); + +</script> +</head> +</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/text-styles/2d.text.font.parse.tiny.html b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/text-styles/2d.text.font.parse.tiny.html new file mode 100644 index 0000000..f668e8a4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/text-styles/2d.text.font.parse.tiny.html
@@ -0,0 +1,28 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> +<title>Canvas test: 2d.text.font.parse.tiny</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/canvas-tests.js"></script> +<link rel="stylesheet" href="/common/canvas-tests.css"> +<body class="show_output"> + +<h1>2d.text.font.parse.tiny</h1> +<p class="desc"></p> + + +<p class="output">Actual output:</p> +<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> + +<ul id="d"></ul> +<script> +var t = async_test(""); +_addTest(function(canvas, ctx) { + +ctx.font = '1px sans-serif'; +_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); + + +}); +</script> +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/tools/tests2dtext.yaml b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/tools/tests2dtext.yaml index 9b168e9..336e3cf3 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/2dcontext/tools/tests2dtext.yaml +++ b/third_party/WebKit/LayoutTests/external/wpt/2dcontext/tools/tests2dtext.yaml
@@ -12,6 +12,14 @@ ctx.font = '20PX SERIF'; @assert ctx.font === '20px serif'; @moz-todo +- name: 2d.text.font.parse.tiny + testing: + - 2d.text.font.parse + - 2d.text.font.get + code: | + ctx.font = '1px sans-serif'; + @assert ctx.font === '1px sans-serif'; + - name: 2d.text.font.parse.complex testing: - 2d.text.font.parse
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual-expected.txt deleted file mode 100644 index aff38e3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Document#exitFullscreen() assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-nested-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-nested-manual.html index dfd53bc..eefc7b4 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-nested-manual.html +++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-nested-manual.html
@@ -15,12 +15,20 @@ assert_equals(document.fullscreenElement, outer); // Then request fullscreen for the inner element. - trusted_request(t, inner); + trusted_click(t, t.step_func(() => { + inner.requestFullscreen(); + // Even though we are already in fullscreen, the change in + // document.fullscreenElement should not happen synchronously. + assert_equals(document.fullscreenElement, outer); + }), outer); document.onfullscreenchange = t.step_func(() => { assert_equals(document.fullscreenElement, inner); // Now exit fullscreen. document.exitFullscreen(); + // Even though we don't need to exit fullscreen, the change in + // document.fullscreenElement should not happen synchronously. + assert_equals(document.fullscreenElement, inner); document.onfullscreenchange = t.step_func_done(() => { assert_equals(document.fullscreenElement, outer); });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-timing-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-timing-manual.html index 5aeb04a9..7a536363 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-timing-manual.html +++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-timing-manual.html
@@ -19,6 +19,8 @@ // The resize event should fire before the fullscreenchange event. const events = []; const callback = t.step_func(event => { + // fullscreenElement should have changed before either event is fired. + assert_equals(document.fullscreenElement, null, `fullscreenElement in {event.type} event`); events.push(event.type); if (event.type == 'fullscreenchange') { step_timeout(t.unreached_func('timer callback'));
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-twice-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-twice-manual-expected.txt deleted file mode 100644 index 2124e08..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-twice-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Document#exitFullscreen() called twice assert_equals: fullscreenElement after first exitFullscreen() expected Element node <div id="log"></div> but got null -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-fullscreen-element-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-fullscreen-element-manual-expected.txt deleted file mode 100644 index bb1b685..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-fullscreen-element-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Document#fullscreenElement assert_equals: fullscreenElement after requestFullscreen() expected null but got Element node <div id="log"></div> -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual-expected.txt deleted file mode 100644 index 1ceed0d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() and Document#exitFullscreen() in iframe assert_equals: event target expected Element node <iframe allowfullscreen=""></iframe> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html index 40ca3ce..fc7f575 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html +++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html
@@ -15,8 +15,12 @@ document.onfullscreenchange = iframeDoc.onfullscreenchange = t.step_func(event => { count++; assert_between_inclusive(count, 1, 4, 'number of fullscreenchange events'); + // Both when entering and exiting, the fullscreenchange event is fired first + // on the outer document and then on the iframe's document. This is because + // the events are fired in animation frame tasks, which run in "frame tree" + // order. const expected = { - target: count == 1 || count == 4 ? iframe : iframeBody, + target: count == 1 || count == 3 ? iframe : iframeBody, outerFullscreenElement: count <= 2 ? iframe : null, innerFullscreenElement: count <= 2 ? iframeBody : null, };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt deleted file mode 100644 index ddb6e01..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() followed by moving the element within the document assert_equals: expected Element node <div id="target"></div> but got null -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual-expected.txt deleted file mode 100644 index bb136d07..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() followed by moving the element into an iframe assert_unreached: fullscreenchange event Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt deleted file mode 100644 index a522306c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() in iframe followed by removing the iframe assert_unreached: fullscreenchange event Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual-expected.txt deleted file mode 100644 index 19293294..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() followed by removing the element assert_unreached: fullscreenchange event Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual-expected.txt deleted file mode 100644 index 945809d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt deleted file mode 100644 index 1ab3134..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() when not allowed to request fullscreen assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html index 792cb0f..1ccfc7a 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html +++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html
@@ -6,13 +6,16 @@ <div id="log"></div> <script> async_test(t => { - trusted_request(t, document.querySelector('div')); + const div = document.querySelector('div'); + trusted_request(t, div); // If fullscreenchange is an animation frame event, then animation frame // callbacks should be run after it is fired, before the timer callback. // The resize event should fire before the fullscreenchange event. const events = []; const callback = t.step_func(event => { + // fullscreenElement should have changed before either event is fired. + assert_equals(document.fullscreenElement, div, `fullscreenElement in {event.type} event`); events.push(event.type); if (event.type == 'fullscreenchange') { step_timeout(t.unreached_func('timer callback'));
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-twice-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-twice-manual-expected.txt deleted file mode 100644 index a6b832f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-twice-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Element#requestFullscreen() twice assert_equals: fullscreenElement after first requestFullscreen() expected null but got Element node <div id="log"></div> -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt index e11ab7b..4eb2061 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt
@@ -16,12 +16,12 @@ PASS Document interface: new Document must inherit property "fullscreenElement" with the proper type (35) FAIL ShadowRoot interface: attribute fullscreenElement assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined" FAIL Element interface: operation requestFullscreen() assert_unreached: Throws "TypeError: Illegal invocation" instead of rejecting promise Reached unreachable code -FAIL Element interface: attribute onfullscreenchange assert_true: The prototype object must have a property "onfullscreenchange" expected true got false -FAIL Element interface: attribute onfullscreenerror assert_true: The prototype object must have a property "onfullscreenerror" expected true got false +PASS Element interface: attribute onfullscreenchange +PASS Element interface: attribute onfullscreenerror PASS Element must be primary interface of document.createElementNS(null, "test") PASS Stringification of document.createElementNS(null, "test") PASS Element interface: document.createElementNS(null, "test") must inherit property "requestFullscreen" with the proper type (34) -FAIL Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenchange" with the proper type (35) assert_inherits: property "onfullscreenchange" not found in prototype chain -FAIL Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type (36) assert_inherits: property "onfullscreenerror" not found in prototype chain +PASS Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenchange" with the proper type (35) +PASS Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type (36) Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual-expected.txt deleted file mode 100644 index a2b4673..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Move the fullscreen element to another document assert_equals: expected Element node <div></div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual-expected.txt deleted file mode 100644 index b7fc9f1b..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual-expected.txt +++ /dev/null
@@ -1,6 +0,0 @@ -This is a testharness.js-based test. -FAIL Remove the first element on the fullscreen element stack assert_equals: expected Element node <div id="first"> - <div id="last"></div> -</div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual-expected.txt deleted file mode 100644 index 477882ba..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual-expected.txt +++ /dev/null
@@ -1,6 +0,0 @@ -This is a testharness.js-based test. -FAIL Remove the last element on the fullscreen element stack assert_equals: expected Element node <div id="first"> - <div id="last"></div> -</div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual-expected.txt deleted file mode 100644 index 1fba999c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Remove the parent of the fullscreen element assert_equals: expected Element node <div id="child"></div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual-expected.txt deleted file mode 100644 index 4aefca7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Remove the single element on the fullscreen element stack assert_equals: expected Element node <div id="single"></div> but got Document node with 2 children -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-basic.html b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-basic.html index 56a3742d..e4fbfce9 100644 --- a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-basic.html +++ b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-basic.html
@@ -25,7 +25,7 @@ testDiv.addEventListener('wheel', wheelHandler); if (window.eventSender) { eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5); - eventSender.mouseScrollBy(-1, -2); + eventSender.mouseScrollBy(-1, -2, false, false, 0, true, 'phaseBegan'); var positive = "deltaX > 0 && deltaY > 0"; var correct = "deltaX == testDiv.scrollLeft && deltaY == testDiv.scrollTop"; shouldBecomeEqual(positive + " && " + correct , "true", finishJSTest);
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-ctrl.html b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-ctrl.html index 94f1428..581c776b 100644 --- a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-ctrl.html +++ b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-ctrl.html
@@ -23,7 +23,7 @@ debug('With ctrl modifier set and canScroll set to be false'); wheelEventCount = 0; eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5); - eventSender.mouseScrollBy(0, scrollAmount, false, true, "ctrlKey", false); + eventSender.mouseScrollBy(0, scrollAmount, false, true, "ctrlKey", false , "phaseBegan"); shouldBe("wheelEventCount", "1"); shouldEvaluateTo("deltaY", expectedDeltaY); shouldBeTrue("ctrlKey"); @@ -32,7 +32,7 @@ debug('Without ctrl and canScroll set to be default true'); wheelEventCount = 0; eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5); - eventSender.mouseScrollBy(0, scrollAmount, false, true); + eventSender.mouseScrollBy(0, scrollAmount, false, true, 0, true, "phaseChanged"); shouldBe("wheelEventCount", "1"); shouldEvaluateTo("deltaY", expectedDeltaY); shouldBeFalse("ctrlKey"); @@ -45,7 +45,7 @@ debug('With ctrl modifier set and canScroll set to be false'); wheelEventCount = 0; eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5); - eventSender.mouseScrollBy(0, scrollAmount, false, true, "ctrlKey", false); + eventSender.mouseScrollBy(0, scrollAmount, false, true, "ctrlKey", false, "phaseChanged"); shouldBe("wheelEventCount", "1"); shouldEvaluateTo("deltaY", expectedDeltaY); shouldBeTrue("ctrlKey"); @@ -54,7 +54,7 @@ debug('With ctrl modifier set and canScroll set to be true'); wheelEventCount = 0; eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5); - eventSender.mouseScrollBy(0, scrollAmount, false, true, "ctrlKey", true); + eventSender.mouseScrollBy(0, scrollAmount, false, true, "ctrlKey", true, "phaseChanged"); shouldBe("wheelEventCount", "1"); shouldEvaluateTo("deltaY", expectedDeltaY); shouldBeTrue("ctrlKey"); @@ -63,7 +63,7 @@ debug('Now without ctrl and canScroll set to be default true'); wheelEventCount = 0; eventSender.mouseMoveTo(testDiv.offsetLeft + 5, testDiv.offsetTop + 5); - eventSender.mouseScrollBy(0, scrollAmount, false, true); + eventSender.mouseScrollBy(0, scrollAmount, false, true, 0, true, "phaseChanged"); shouldBe("wheelEventCount", "1"); shouldEvaluateTo("deltaY", expectedDeltaY); shouldBeFalse("ctrlKey");
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-scrolling-div.html index 3c091fc..d5a2cf7 100644 --- a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-scrolling-div.html +++ b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-scrolling-div.html
@@ -16,7 +16,7 @@ // EventSender uses 40px per tick. eventSender.mouseMoveTo(overflowElement.offsetLeft + 5, overflowElement.offsetTop + 5); - eventSender.mouseScrollBy(-2.5, -5); + eventSender.mouseScrollBy(-2.5, -5, false, true, 0, true, "phaseBegan"); } div = document.getElementById("overflow");
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-text-node.html b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-text-node.html index bb8cb39..a54f5f9 100644 --- a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-text-node.html +++ b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-in-text-node.html
@@ -9,7 +9,7 @@ var div = document.querySelector('div'); if (window.eventSender) { eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5); - eventSender.mouseScrollBy(0,120); + eventSender.mouseScrollBy(0, 120, false, true, 0, true, "phaseBegan"); } else { debug("FAIL: This test requires window.eventSender."); finishJSTest();
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-mousewheel-interaction.html b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-mousewheel-interaction.html index ac46109..69b8b33 100644 --- a/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-mousewheel-interaction.html +++ b/third_party/WebKit/LayoutTests/fast/events/wheel/wheelevent-mousewheel-interaction.html
@@ -10,7 +10,7 @@ div.addEventListener('mousewheel', mouseWheelHandler); if (window.eventSender) { eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5); - eventSender.mouseScrollBy(10, 20); + eventSender.mouseScrollBy(10, 20, false, true, 0, true, "phaseBegan"); finishJSTest(); } else { debug("FAIL: This test requires window.eventSender.");
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-twice.html b/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-twice.html deleted file mode 100644 index 07c7fb3..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-twice.html +++ /dev/null
@@ -1,34 +0,0 @@ -<!DOCTYPE html> -<title>Document#exitFullscreen() called twice</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<script> -// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 -// TODO(foolip): Remove this test when the above is imported and passing. -async_test(t => { - const div = document.querySelector("div"); - - document.onfullscreenchange = t.step_func(() => { - // We are now in fullscreen. - assert_equals(document.fullscreenElement, div); - - document.onfullscreenchange = t.step_func(() => { - assert_equals(document.fullscreenElement, null); - // Done, but ensure that there's only one fullscreenchange event. - document.onfullscreenchange = t.unreached_func("second fullscreenchange event"); - setTimeout(t.step_func_done(), 0); - }); - - // Exit fullscreen twice. - document.exitFullscreen(); - assert_equals(document.fullscreenElement, null, "fullscreenElement after first exitFullscreen()"); - document.exitFullscreen(); - assert_equals(document.fullscreenElement, null, "fullscreenElement after second exitFullscreen()"); - }); - document.onfullscreenerror = t.unreached_func("fullscreenerror event"); - - trusted_request(t, div); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-vs-request.html b/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-vs-request.html index 607fcf1..85758c77 100644 --- a/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-vs-request.html +++ b/third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-vs-request.html
@@ -20,23 +20,30 @@ // Request fullscreen on another element, to avoid any synchronous // short-circuiting on document.fullscreenElement.requestFullscreen(), // which used to be in the spec. Also request both before and after the - // exit. Both requests should be silently ignored due to the exit. + // exit. The first request will be applied at the next microtask + // checkpoint and events queued for the following animation frame task. + // That will race with the exit resize, but by the second fullscreenchange + // event fullscreenElement must be null. The second request is ignored due + // to the pending exit and doesn't result in any events. let fullscreenchanges = 0; - document.onfullscreenchange = t.step_func((event) => { - assert_equals(document.fullscreenElement, child); + document.onfullscreenchange = t.step_func(() => { fullscreenchanges++; - if (fullscreenchanges == 3) - t.done(); + if (fullscreenchanges == 2) { + assert_equals(document.fullscreenElement, null); + // Expect no more fullscreenchange events. + document.onfullscreenchange = t.unreached_func("third fullscreenchange event"); + requestAnimationFrame(t.step_func_done()); + } }); const child = parent.firstChild; child.requestFullscreen(); - assert_equals(document.fullscreenElement, child, "fullscreenElement after first requestFullscreen()"); + assert_equals(document.fullscreenElement, parent, "fullscreenElement after first requestFullscreen()"); document.exitFullscreen(); assert_equals(document.fullscreenElement, parent, "fullscreenElement after exitFullscreen()"); child.requestFullscreen(); - assert_equals(document.fullscreenElement, child, "fullscreenElement after second requestFullscreen()"); + assert_equals(document.fullscreenElement, parent, "fullscreenElement after second requestFullscreen()"); }, parent); }); document.onfullscreenerror = t.unreached_func("fullscreenerror event");
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/document-fullscreen-element.html b/third_party/WebKit/LayoutTests/fullscreen/api/document-fullscreen-element.html deleted file mode 100644 index 1c1fcfd..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/document-fullscreen-element.html +++ /dev/null
@@ -1,36 +0,0 @@ -<!DOCTYPE html> -<title>Document.fullscreenElement</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<script> -async_test(function(t) -{ - var div = document.querySelector("div"); - - document.onfullscreenchange = t.step_func(function() - { - assert_equals(document.fullscreenElement, div, "fullscreenElement before exitFullscreen()"); - document.exitFullscreen(); - // TODO(foolip): fullscreenElement should still be div. - // https://crbug.com/402421 - assert_equals(document.fullscreenElement, null, "fullscreenElement after exitFullscreen()"); - - document.onfullscreenchange = t.step_func(function() - { - assert_equals(document.fullscreenElement, null, "fullscreenElement after exiting fullscreen"); - t.done(); - }); - }); - - trusted_click(t, function() - { - assert_equals(document.fullscreenElement, null, "fullscreenElement before requestFullscreen()"); - div.requestFullscreen(); - // TODO(foolip): fullscreenElement should still be null. - // https://crbug.com/402421 - assert_equals(document.fullscreenElement, div, "fullscreenElement after requestFullscreen()"); - }, document.body); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe.html deleted file mode 100644 index 40974a2e0..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe.html +++ /dev/null
@@ -1,29 +0,0 @@ -<!DOCTYPE html> -<title>Element#requestFullscreen() followed by moving the element into an iframe</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<div id="target"></div> -<iframe allowfullscreen></iframe> -<script> -// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 -// TODO(foolip): Remove this test when the above is imported and passing. -async_test(t => { - const target = document.getElementById("target"); - const iframeDoc = document.querySelector("iframe").contentDocument; - - iframeDoc.onfullscreenchange = t.unreached_func("fullscreenchange event in iframe"); - iframeDoc.onfullscreenerror = t.unreached_func("fullscreenerror event in iframe"); - document.onfullscreenchange = t.step_func_done(() => { - assert_equals(document.fullscreenElement, null); - assert_equals(iframeDoc.fullscreenElement, null); - }); - document.onfullscreenerror = t.unreached_func("fullscreenerror event"); - - trusted_click(t, () => { - target.requestFullscreen(); - iframeDoc.body.appendChild(target); - }, document.body); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html deleted file mode 100644 index 3b165ce..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html +++ /dev/null
@@ -1,27 +0,0 @@ -<!DOCTYPE html> -<title>Element#requestFullscreen() followed by moving the element within the document</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<div id="target"></div> -<div id="moveto"></div> -<script> -// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 -// TODO(foolip): Remove this test when the above is imported and passing. -async_test(t => { - const target = document.getElementById("target"); - const moveTo = document.getElementById("moveto"); - - document.onfullscreenchange = t.step_func_done(() => { - assert_equals(document.fullscreenElement, null); - assert_equals(target.parentNode, moveTo); - }); - document.onfullscreenerror = t.unreached_func("fullscreenchange event"); - - trusted_click(t, () => { - target.requestFullscreen(); - moveTo.appendChild(target); - }, document.body); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html deleted file mode 100644 index 161f29a..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html +++ /dev/null
@@ -1,28 +0,0 @@ -<!DOCTYPE html> -<title>Element#requestFullscreen() in iframe followed by removing the iframe</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<iframe allowfullscreen></iframe> -<script> -// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 -// TODO(foolip): Remove this test when the above is imported and passing. -async_test(t => { - const iframe = document.querySelector("iframe"); - const iframeDocument = iframe.contentDocument; - - document.onfullscreenchange = t.step_func_done(() => { - assert_equals(document.fullscreenElement, null); - assert_equals(iframeDocument.fullscreenElement, null); - }); - document.onfullscreenerror = t.unreached_func("fullscreenerror event"); - iframeDocument.onfullscreenchange = t.unreached_func("iframe fullscreenchange event"); - iframeDocument.onfullscreenerror = t.unreached_func("iframe fullscreenerror event"); - - trusted_click(t, () => { - iframeDocument.body.requestFullscreen(); - iframe.remove(); - }, document.body); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove.html deleted file mode 100644 index 85adefa..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<title>Element#requestFullscreen() followed by removing the element</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<div id="target"></div> -<script> -// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 -// TODO(foolip): Remove this test when the above is imported and passing. -async_test(t => { - const target = document.getElementById("target"); - - document.onfullscreenchange = t.step_func_done(() => { - assert_equals(document.fullscreenElement, null); - }); - document.onfullscreenerror = t.unreached_func("fullscreenchange event"); - - trusted_click(t, () => { - target.requestFullscreen(); - target.remove(); - }, document.body); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-twice.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-twice.html deleted file mode 100644 index 6472a25..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-twice.html +++ /dev/null
@@ -1,29 +0,0 @@ -<!DOCTYPE html> -<title>Element#requestFullscreen() twice</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../trusted-click.js"></script> -<div id="log"></div> -<script> -// Adapted from https://github.com/w3c/web-platform-tests/pull/4250 -// TODO(foolip): Remove this test when the above is imported and passing. -async_test(t => { - const div = document.querySelector("div"); - - document.onfullscreenchange = t.step_func(() => { - assert_equals(document.fullscreenElement, div); - // Done, but ensure that there's only one fullscreenchange event. - document.onfullscreenchange = t.unreached_func("second fullscreenchange event"); - setTimeout(t.step_func_done(), 0); - }); - document.onfullscreenerror = t.unreached_func("fullscreenerror event"); - - trusted_click(t, () => { - // Request fullscreen twice. - div.requestFullscreen(); - assert_equals(document.fullscreenElement, div, "fullscreenElement after first requestFullscreen()"); - div.requestFullscreen(); - assert_equals(document.fullscreenElement, div, "fullscreenElement after second requestFullscreen()"); - }, document.body); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-iframes.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-iframes.html index 8d6923c..a58a669c 100644 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-iframes.html +++ b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-iframes.html
@@ -18,15 +18,15 @@ // Expect first a fullscreenchange event for the second (!) request, then a // fullscreenerror event for the first request. TODO(foolip): Remove the // Fullscreen hierarchy restrictions. https://crbug.com/627792 - a.contentDocument.onfullscreenerror = t.step_func(() => { - b.contentDocument.onfullscreenchange = t.step_func_done(() => { - assert_equals(document.fullscreenElement, b, 'fullscreenElement'); - assert_equals(a.contentDocument.fullscreenElement, null, 'fullscreenElement in iframe a'); - assert_equals(b.contentDocument.fullscreenElement, b.contentDocument.body, 'fullscreenElement in iframe b'); + a.contentDocument.onfullscreenchange = t.step_func_done(() => { + assert_equals(document.fullscreenElement, a, 'fullscreenElement'); + assert_equals(a.contentDocument.fullscreenElement, a.contentDocument.body, 'fullscreenElement in iframe a'); + b.contentDocument.onfullscreenerror = t.step_func(() => { + assert_equals(b.contentDocument.fullscreenElement, null, 'fullscreenElement in iframe b'); }); }); - a.contentDocument.onfullscreenchange = t.unreached_func('fullscreenchange event in iframe a'); - b.contentDocument.onfullscreenerror = t.unreached_func('fullscreenerror event in iframe b'); + a.contentDocument.onfullscreenerror = t.unreached_func('fullscreenerror event in iframe a'); + b.contentDocument.onfullscreenchange = t.unreached_func('fullscreenchange event in iframe b'); trusted_click(t, () => { b.contentDocument.body.requestFullscreen();
diff --git a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-vs-exit.html b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-vs-exit.html index 539f715..419673b 100644 --- a/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-vs-exit.html +++ b/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-vs-exit.html
@@ -18,7 +18,7 @@ document.onfullscreenerror = t.unreached_func("fullscreenerror event"); target.requestFullscreen(); - assert_equals(document.fullscreenElement, target, "fullscreenElement after requestFullscreen()"); + assert_equals(document.fullscreenElement, null, "fullscreenElement after requestFullscreen()"); document.exitFullscreen(); assert_equals(document.fullscreenElement, null, "fullscreenElement after exitFullscreen()"); }, document.body);
diff --git a/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt b/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt index 93985ea..84bc76d 100644 --- a/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt +++ b/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt
@@ -1,11 +1,13 @@ +PASS getHoverActiveState(enterButton) is "hovered" PASS successfullyParsed is true TEST COMPLETE PASS document.webkitIsFullScreen is true PASS getHoverActiveState(enterButton) is "default" +PASS getHoverActiveState(exitButton) is "hovered" PASS document.webkitIsFullScreen is false PASS getHoverActiveState(exitButton) is "default" -Go full screen Exit full screen +Enter fullscreen Exit fullscreen EVENT(webkitfullscreenchange) EVENT(webkitfullscreenchange) END OF TEST
diff --git a/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html b/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html index 1aa60aab..940b8be 100644 --- a/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html +++ b/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html
@@ -4,8 +4,8 @@ <script src="../fast/events/touch/resources/touch-hover-active-tests.js"></script> <link rel="stylesheet" href="../fast/events/touch/resources/touch-hover-active-tests.css"> -<button id="enter" class='touch-interactive' onclick="document.body.webkitRequestFullScreen()">Go full screen</button> -<button id="exit" class='touch-interactive' onclick="document.webkitCancelFullScreen()">Exit full screen</button> +<button id="enter" class='touch-interactive' onclick="document.body.webkitRequestFullScreen()">Enter fullscreen</button> +<button id="exit" class='touch-interactive' onclick="document.webkitCancelFullScreen()">Exit fullscreen</button> <script> var enterButton; @@ -22,30 +22,36 @@ var enterButtonCenter = elementCenter(enterButton); + // After entering fullscreen + layout, the button should lose hover. waitForEventOnce(document, 'webkitfullscreenchange', function() { - shouldBeTrue("document.webkitIsFullScreen") - // After entering fullscreen, the button should lose hover - shouldBeDefault("getHoverActiveState(enterButton)") + shouldBeTrue("document.webkitIsFullScreen"); + testRunner.layoutAndPaintAsyncThen(function() { + shouldBeDefault("getHoverActiveState(enterButton)"); - waitForEventOnce(document, 'webkitfullscreenchange', function() { - shouldBeFalse("document.webkitIsFullScreen") - // After leaving fullscreen, the button should lose hover - shouldBeDefault("getHoverActiveState(exitButton)") - endTest(); + // After exiting fullscreen + layout, the button should lose hover. + waitForEventOnce(document, 'webkitfullscreenchange', function() { + shouldBeFalse("document.webkitIsFullScreen"); + testRunner.layoutAndPaintAsyncThen(function() { + shouldBeDefault("getHoverActiveState(exitButton)"); + endTest(); + }); + }); + + var exitButtonCenter = elementCenter(exitButton); + // Hover and click the "Exit fullscreen" button. + eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y); + eventSender.mouseDown(); + eventSender.mouseUp(); + shouldBeOnlyHovered("getHoverActiveState(exitButton)"); }); - - var exitButtonCenter = elementCenter(exitButton); - // Hover on and click the "Exit fullscreen" button - eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y); - eventSender.mouseDown(); - eventSender.mouseUp(); }); - // Move mouse over to the "Go fullscreen" button and click + // Hover and click the "Enter fullscreen" button. eventSender.mouseMoveTo(enterButtonCenter.x, enterButtonCenter.y); eventSender.mouseDown(); eventSender.mouseUp(); + shouldBeOnlyHovered("getHoverActiveState(enterButton)"); } runTest();
diff --git a/third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt b/third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt deleted file mode 100644 index b5c1b43d..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -PASS successfullyParsed is true - -TEST COMPLETE -PASS document.webkitFullscreenElement is not null -PASS
diff --git a/third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html b/third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html deleted file mode 100644 index 735c520..0000000 --- a/third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html +++ /dev/null
@@ -1,40 +0,0 @@ -<!DOCTYPE html> -<script src="../resources/js-test.js"></script> -<script> -if (window.testRunner) { - testRunner.dumpAsText(); - testRunner.waitUntilDone(); -} - -function runWithKeyDown(fn) -{ - document.addEventListener('keydown', function() { fn(); }, false); - if (window.testRunner) { - eventSender.keyDown('a'); - } -} - -function init() { - runWithKeyDown(goFullScreen); -} - -function goFullScreen() { - var iframe = document.getElementById('block1'); - var element = iframe.contentDocument.documentElement; - setTimeout(function () { - iframe.parentNode.removeChild(iframe); - gc(); - setTimeout(function () { - if (window.testRunner) { - testRunner.notifyDone(); - } - }, 0); - }, 0); - element.webkitRequestFullScreen(); - shouldNotBe("document.webkitFullscreenElement", "null"); -} -</script> -<body onload="init()"> - <iframe allowfullscreen src="resources/inner.html" id="block1"></iframe> - PASS -</body>
diff --git a/third_party/WebKit/LayoutTests/fullscreen/full-screen-stacking-context.html b/third_party/WebKit/LayoutTests/fullscreen/full-screen-stacking-context.html index 34f58dfe..b29ce7e 100644 --- a/third_party/WebKit/LayoutTests/fullscreen/full-screen-stacking-context.html +++ b/third_party/WebKit/LayoutTests/fullscreen/full-screen-stacking-context.html
@@ -3,12 +3,14 @@ <head> <script> var runPixelTests = true; - + function init() { - waitForEventAndEnd(document, 'webkitfullscreenchange'); + waitForEventOnce(document, 'webkitfullscreenchange', function() { + testRunner.layoutAndPaintAsyncThen(endTest); + }); runWithKeyDown(goFullScreen); } - + function goFullScreen() { document.getElementById('video').webkitRequestFullScreen(); } @@ -46,7 +48,7 @@ </style> </head> <body onload="init()"> - <div>This tests that a full screen element in a lower stacking context blocks a sibling in a higher stacking context. + <div>This tests that a full screen element in a lower stacking context blocks a sibling in a higher stacking context. After entering full screen mode, only a black box should be visible. Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div> <div id="one"></div>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/access-inspected-object.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/access-inspected-object.html index d8b1d71..0107307 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/access-inspected-object.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/access-inspected-object.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="inspector-protocol-test.js"></script> +<script type="text/javascript" src="resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/cookies-protocol-test.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/cookies-protocol-test.html index 971edcba..83d52515 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/cookies-protocol-test.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/cookies-protocol-test.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="inspector-protocol-test.js"></script> +<script src="resources/inspector-protocol-test.js"></script> <script> function test() {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-data-length.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-data-length.html index 76baf8c..f2162117 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-data-length.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-data-length.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="../inspector-protocol/inspector-protocol-test.js"></script> +<script src="../inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test() {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-fetch-content-with-error-status-code.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-fetch-content-with-error-status-code.html index ab3ec3b..11ebd356 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-fetch-content-with-error-status-code.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network-fetch-content-with-error-status-code.html
@@ -1,6 +1,6 @@ <html> <head> -<script src="../inspector-protocol/inspector-protocol-test.js"></script> +<script src="../inspector-protocol/resources/inspector-protocol-test.js"></script> <script> async function test() {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/disable-interception-midway.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/disable-interception-midway.html index 11238ee5..04b87bd2 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/disable-interception-midway.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/disable-interception-midway.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-cancel.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-cancel.html index 7ab183b..3ea34aa 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-cancel.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-cancel.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-provide-credentials.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-provide-credentials.html index f740c45..0fe60666 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-provide-credentials.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-auth-provide-credentials.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html index 2e2f314..00a5c9a1 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-blocked.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-blocked.html index f8c06786..1c70568 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-blocked.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-blocked.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-mocked.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-mocked.html index 500ae9f..cefd748 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-mocked.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-mocked.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-modified.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-modified.html index 8ff664e..9d794d3 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-modified.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception-modified.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception.html index 3659936..bcc1729 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/redirect-interception.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock302.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock302.html index 14bbe3d..17c46ae 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock302.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock302.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock404.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock404.html index f362a0a..7dc61fb8 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock404.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock404.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-modify-get-to-post.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-modify-get-to-post.html index ef0e56ca..b55d55e 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-modify-get-to-post.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-modify-get-to-post.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception.html index 65a33dd..7eb4ca1 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception-auth-fail.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception-auth-fail.html index 54e9f17..7d7845d 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception-auth-fail.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception-auth-fail.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html index 1893f6a..122ab33f 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../inspector-protocol-test.js"></script> -<script type="text/javascript" src="interception-test.js"></script> +<script type="text/javascript" src="../resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/interception-test.js"></script> <script> function appendIframe()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/override-referrer.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/override-referrer.html index 3526740..5e7cb98 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/override-referrer.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/override-referrer.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="inspector-protocol-test.js"></script> +<script src="resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/ping-redirect.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/ping-redirect.html index ac1c4564..71b1d3d8 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/ping-redirect.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/ping-redirect.html
@@ -1,6 +1,6 @@ <html> <head> -<script src="inspector-protocol-test.js"></script> +<script src="resources/inspector-protocol-test.js"></script> <script> function sendBeacon() {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/reload-memory-cache.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/reload-memory-cache.html index bcd61d663..082f75a4 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/reload-memory-cache.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/reload-memory-cache.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="inspector-protocol-test.js"></script> +<script src="resources/inspector-protocol-test.js"></script> <script src="resources/blank.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-blockable.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-blockable.html index b8124a5..17d4732 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-blockable.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-blockable.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script type="text/javascript" src="../inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../inspector-protocol/resources/inspector-protocol-test.js"></script> <script src="/resources/get-host-info.js"></script> <script src="resources/mixed-content-type-test.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-none.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-none.html index 8094217..dac754bf 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-none.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-none.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script type="text/javascript" src="../inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../inspector-protocol/resources/inspector-protocol-test.js"></script> <script src="/resources/get-host-info.js"></script> <script src="resources/mixed-content-type-test.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable.html index c3af1c96..eb6630b 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script type="text/javascript" src="../inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../inspector-protocol/resources/inspector-protocol-test.js"></script> <script src="/resources/get-host-info.js"></script> <script src="resources/mixed-content-type-test.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-referrer-policy.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-referrer-policy.html index de4331a..bebc29c 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-referrer-policy.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/request-referrer-policy.html
@@ -1,5 +1,5 @@ <!DOCTYPE html> -<script src="../inspector-protocol/inspector-protocol-test.js"></script> +<script src="../inspector-protocol/resources/inspector-protocol-test.js"></script> <script src="/resources/get-host-info.js"></script> <script> function sendRequest(policy) {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/image.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/image.html index f8fedac..c64fd2d 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/image.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/image.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- We also need to include the inspector test harness here to ensure the test completes normally after navigating to this page. --> -<script src="../inspector-protocol-test.js"></script> +<script src="../resources/inspector-protocol-test.js"></script> <body onload="runTest()"> <img src="image.png"> </body>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/inspector-protocol-test.js similarity index 97% copy from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js copy to third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/inspector-protocol-test.js index 64501da1..6dd8c3e 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/inspector-protocol-test.js
@@ -137,7 +137,7 @@ var scriptTags = document.getElementsByTagName("script"); var scriptUrlBasePath = ""; for (var i = 0; i < scriptTags.length; ++i) { - var index = scriptTags[i].src.lastIndexOf("/inspector-protocol-test.js"); + var index = scriptTags[i].src.lastIndexOf("/resources/inspector-protocol-test.js"); if (index > -1 ) { scriptUrlBasePath = scriptTags[i].src.slice(0, index); break;
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/interception-test.js similarity index 100% rename from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/interception-test.js rename to third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/interception-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/runtime-get-properties-doesnt-crash-on-window-frame.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/runtime-get-properties-doesnt-crash-on-window-frame.html index 52975058..f6039b14 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/runtime-get-properties-doesnt-crash-on-window-frame.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/runtime-get-properties-doesnt-crash-on-window-frame.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="./inspector-protocol-test.js"></script> +<script type="text/javascript" src="./resources/inspector-protocol-test.js"></script> <script> function test() {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html index d9af55c0..fcd8adc 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="../inspector-protocol-test.js"></script> +<script src="../resources/inspector-protocol-test.js"></script> <script> var ws; function openWebSocket(url)
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1-expected.txt index 2678ec3..baed94c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1-expected.txt
@@ -2,8 +2,7 @@ This text field has an error! -Details 1 -Details 2 +Details Select All { "nodeId": "<string>", @@ -129,16 +128,11 @@ { "name": "details", "value": { - "type": "idrefList", - "value": "", + "type": "idref", "relatedNodes": [ { - "idref": "d1", - "nodeResult": "div#d1" - }, - { - "idref": "d2", - "nodeResult": "div#d2" + "idref": "d", + "nodeResult": "div#d" } ] }
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1.html index 3384f77f..02a9929 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-aria-1.1.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test() @@ -18,9 +18,8 @@ <input data-dump aria-errormessage="err"> <h3 id="err">This text field has an error!</h3> - <img data-dump aria-details="d1 d2" aria-label="Label"> - <div id="d1">Details 1</div> - <div id="d2">Details 2</div> + <img data-dump aria-details="d" aria-label="Label"> + <div id="d">Details</div> <button data-dump aria-keyshortcuts="Ctrl+A">Select All</button>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getNodeWithNoAXNode.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getNodeWithNoAXNode.html index cc96e725..1f6ac05 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getNodeWithNoAXNode.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getNodeWithNoAXNode.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getRelationships.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getRelationships.html index edbca674..73af98b 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getRelationships.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-getRelationships.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodes.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodes.html index e9fff58..15b67b8 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodes.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodes.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodesModal.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodesModal.html index f084a6e6..49275b5 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodesModal.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-ignoredNodesModal.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-modal.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-modal.html index e540ba9e..6cef63f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-modal.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-modal.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-buttons.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-buttons.html index 6d7895b..9d45522 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-buttons.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-buttons.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.html index 7844d24..6b79c93 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-buttons.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-buttons.html index 2ec87917..f121c182 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-buttons.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-buttons.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.html index 8703e17..37631c1 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-labelledby.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-labelledby.html index dc163e0..ef4949f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-labelledby.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-labelledby.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-summary.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-summary.html index f539d925..d6ab35a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-summary.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-summary.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-visiblity.html b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-visiblity.html index ebf3fff..82976fb0 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-visiblity.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-visiblity.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="./accessibility-dumpAccessibilityNodes.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="./../resources/accessibility-dumpAccessibilityNodes.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-start.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-start.html index 742078b..b60d5b5 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-start.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-start.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function startAnimation()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-css-replay.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-css-replay.html index fdc606f25..d958879 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-css-replay.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-css-replay.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var player;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-empty-transition-cancel.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-empty-transition-cancel.html index 8be61a2..910a0aa 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-empty-transition-cancel.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-empty-transition-cancel.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function triggerEmptyTransition()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html index f8d49c9..4ca4899 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html
@@ -1,7 +1,7 @@ <!doctype html> <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function appendIframe() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-close.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-close.html index 4195ec9f..2a75c5abf 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-close.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-close.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html index e027348..7560b28e 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause-infinite.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var animation;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause.html index a92eafd..3a73546 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-pause.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var animation;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-paused-css-animation.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-paused-css-animation.html index 581063a..6c0eb91b 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-paused-css-animation.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-paused-css-animation.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style type="text/css"> #node.anim { animation: anim 300ms ease-in-out paused;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.html index bebdab05..a120ce8a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-release.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var animation;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-resolve.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-resolve.html index ada0e6b..8c2f6f64 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-resolve.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-resolve.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var player;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html index 8daecb1..bad36fe8 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-seek-past-end.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function startAnimation() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html index 01aba78c..094d53a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function triggerEmptyTransition()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html index fff98a1e..b4df7455 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style type="text/css"> #node.anim { animation: anim 0 ease-in-out;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-dom-mutation-violations.html b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-dom-mutation-violations.html index 1633de9..cec90b3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-dom-mutation-violations.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-dom-mutation-violations.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const-with-api.html b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const-with-api.html index 69525ed..f7d785d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const-with-api.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const-with-api.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-memory-setter-in-strict-mode.html b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-memory-setter-in-strict-mode.html index 9340da42..9843704 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-memory-setter-in-strict-mode.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-memory-setter-in-strict-mode.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html index c66013e..492816fb 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function collectProfiles() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profileEnd-parameterless-crash.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profileEnd-parameterless-crash.html index b644eb3..6a9d4c3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profileEnd-parameterless-crash.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profileEnd-parameterless-crash.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function collectProfiles() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/enable-disable.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/enable-disable.html index f47b90613..713348d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/enable-disable.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/enable-disable.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/record-cpu-profile.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/record-cpu-profile.html index c581398..48387011 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/record-cpu-profile.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/record-cpu-profile.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/stop-without-preceeding-start.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/stop-without-preceeding-start.html index 2b0bd47..d46bb664 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/stop-without-preceeding-start.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/stop-without-preceeding-start.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-add-rule.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-add-rule.html index bda7272b..810607c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-add-rule.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-add-rule.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet" href="resources/add-rule.css"/> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-collect-class-names.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-collect-class-names.html index a73157a2..5a84096 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-collect-class-names.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-collect-class-names.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html index 7c4eb75c..320668cb 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function loadStylesheet(url)
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-create-stylesheet-and-add-rule.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-create-stylesheet-and-add-rule.html index ca49584e..ebbb901 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-create-stylesheet-and-add-rule.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-create-stylesheet-and-add-rule.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <link rel="stylesheet" type="text/css" href="resources/stylesheet.css"></link> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html index 3f16f67a..08835642 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet"> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function loadWebFont()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-background-colors.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-background-colors.html index 9ec0db20..18be150 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-background-colors.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-background-colors.html
@@ -1,9 +1,9 @@ <html> <head> <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> <script> function test() { if (!InspectorTest)
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html index c35c5164..9908c24 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <link rel="stylesheet" type="text/css" href="resources/keyframes.css"></link> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-media-queries.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-media-queries.html index 29cc93b..01667e7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-media-queries.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-media-queries.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html index bc8d880..3865811 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-platform-fonts.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html index 28be229..a9e495ca 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-effective-property-value.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-effective-property-value.html index 1473050..edd551fa 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-effective-property-value.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-effective-property-value.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet" href="resources/set-active-property-value.css"/> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-style-text.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-style-text.html index 948d1c20..68a48748 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-style-text.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-style-text.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet" href="resources/set-style-text.css"/> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html index 9667efb..9c110a2e 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-styleSheetText.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-media-text.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-media-text.html index 1c8f579..0ce4d79 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-media-text.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-media-text.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts-correct-ranges.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts-correct-ranges.html index 1f8b356e..67720537 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts-correct-ranges.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts-correct-ranges.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet" href="resources/set-style-text.css"/> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts.html index 78cec58..7ed9da75 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-multiple-style-texts.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet" href="resources/set-style-text.css"/> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-rule-selector.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-rule-selector.html index 6eea64a..87ec433 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-rule-selector.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-rule-selector.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-style-text.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-style-text.html index af6b027..c62118b 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-style-text.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-style-text.html
@@ -1,9 +1,9 @@ <html> <head> <link rel="stylesheet" href="resources/set-style-text.css"/> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function removeRule()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-dom-inherits-styles.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-dom-inherits-styles.html index b0b956c..9bcfa66 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-dom-inherits-styles.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-dom-inherits-styles.html
@@ -1,9 +1,9 @@ <!DOCTYPE html> <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html index 3c8806dd..b2160ab 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html
@@ -1,9 +1,9 @@ <!DOCTYPE html> <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html index 1d433d2..a4b13a15 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html
@@ -1,8 +1,8 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules-multiple.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules-multiple.html index 80b378b..3dea943 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules-multiple.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules-multiple.html
@@ -39,9 +39,9 @@ } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules.html index ce3a07a..2df8b63 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-matching-rules.html
@@ -35,9 +35,9 @@ } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-modify-rule-and-get-rule-list.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-modify-rule-and-get-rule-list.html index 5d8b9cc..66e3fd9 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-modify-rule-and-get-rule-list.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/cssom-modify-rule-and-get-rule-list.html
@@ -15,9 +15,9 @@ } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/media-query-listener-exception.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/media-query-listener-exception.html index 024004a..1ed5746a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/media-query-listener-exception.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/media-query-listener-exception.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/pseudo-element-matching-selectors.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/pseudo-element-matching-selectors.html index b658c98..e15d786 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/css/pseudo-element-matching-selectors.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/pseudo-element-matching-selectors.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function addBeforeElement()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/access-obsolete-frame.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/access-obsolete-frame.html index b614228..7d1ba5d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/access-obsolete-frame.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/access-obsolete-frame.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.html index 48baf83f..84fab01dd 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/continueToLocation.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/continueToLocation.html index ce8d20c..5ae2992 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/continueToLocation.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/continueToLocation.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript" src="resources/statements.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.html index fb092b0..5bacfae 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function foo()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html index 791ed8a5..ddae332 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html index cb7cacf..5d3c19d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.html index 35fc655..1d33b8d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-in-tight-loop.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-in-tight-loop.html index a420eb1..fac7b51 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-in-tight-loop.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-in-tight-loop.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.html index 60238e9..a0357b3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html index d431baa..07ec913271 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setBlackboxPatterns.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function bar() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html index 91ca89f..cafebf4f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setTimeout-sourceUrl-dedicated-worker-loop.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setTimeout-sourceUrl-dedicated-worker-loop.html index 51abca2..fd20f46 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setTimeout-sourceUrl-dedicated-worker-loop.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-setTimeout-sourceUrl-dedicated-worker-loop.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-step-into-dedicated-worker.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-step-into-dedicated-worker.html index 561acdb..6822980 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-step-into-dedicated-worker.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-step-into-dedicated-worker.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.html index 1450367..3919a0f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html index 294d0a5..856dfc7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-script-blocked-by-csp.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-script-blocked-by-csp.html index 7368dba..1fb01011 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-script-blocked-by-csp.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-script-blocked-by-csp.html
@@ -1,7 +1,7 @@ <html> <head> <meta http-equiv="Content-Security-Policy" content="script-src 'self';"> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript" src="resources/script-blocked-by-csp.js"></script> </head> <body>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-setInnerHTML.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-setInnerHTML.html index 073b8e9..bb8c99d63 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-setInnerHTML.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-setInnerHTML.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function modifyHTML()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/postMessage-on-pause.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/postMessage-on-pause.html index 6435377..7cb5fbc 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/postMessage-on-pause.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/postMessage-on-pause.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var messageDispatched = false;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.html index b41aca8..d441cb1 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/setScriptSource.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/setScriptSource.html index 8ebeac2..9bdb671 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/setScriptSource.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/setScriptSource.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript" src="resources/liveedit-me.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.html index 5c6e12fa..e120131 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.html index 9803665..1da33950 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html index 050a097d..cbb17ec 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript" src="resources/blackboxed.js"></script> <script type="text/javascript" src="resources/mixed.js"></script> <script>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-setTimeout-on-pause-in-dedicated-worker.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-setTimeout-on-pause-in-dedicated-worker.html index e295351..7853e5d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-setTimeout-on-pause-in-dedicated-worker.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-setTimeout-on-pause-in-dedicated-worker.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html index 6de9574..20004b4 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function TestFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt index 580e744..d1f160e 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt
@@ -87,7 +87,7 @@ }, { "name": "src", - "value": "../../http/tests/inspector-protocol/inspector-protocol-test.js" + "value": "../../http/tests/inspector-protocol/resources/inspector-protocol-test.js" } ] },
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html index c914938..56897dcc 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html
@@ -6,7 +6,7 @@ src: url(../../resources/Ahem.ttf); } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> async function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-childNodeCount.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-childNodeCount.html index 351cd1e..1318d1a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-childNodeCount.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-childNodeCount.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function addNode()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html index ccb090a..6faae1b1 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-focus.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-focus.html index 55fb380..f2b7831 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-focus.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-focus.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function logActiveElement() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getBoxModel.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getBoxModel.html index 837e48f..585822b 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getBoxModel.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getBoxModel.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getEventListeners.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getEventListeners.html index 42d704d..93df54a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getEventListeners.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getEventListeners.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument-expected.txt index f7e8c1c..410ea23 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument-expected.txt
@@ -20,7 +20,7 @@ "type", "text/javascript", "src", - "../../http/tests/inspector-protocol/inspector-protocol-test.js" + "../../http/tests/inspector-protocol/resources/inspector-protocol-test.js" ] }, {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html index ce76a3d..4172ace 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html index eb41785..90adf48 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation.html index 5b151a5..228f7c2 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-ns-attr-modified.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-ns-attr-modified.html index 61ca83e5..a416efa 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-ns-attr-modified.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-ns-attr-modified.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html index 071f85e..acfdc7c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html
@@ -8,7 +8,7 @@ } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-depth.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-depth.html index 6353bf4e..4d5bed2 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-depth.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-depth.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-traverse-frames.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-traverse-frames.html index 58f9bd2a..60dd438 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-traverse-frames.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-child-nodes-traverse-frames.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.html index 662242d..d354dac 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setInspectModeEnabled.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setInspectModeEnabled.html index f10e98e..a4d7a88 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setInspectModeEnabled.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setInspectModeEnabled.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setOuterHTML.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setOuterHTML.html index bb770d3..9242de3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setOuterHTML.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setOuterHTML.html
@@ -1,7 +1,7 @@ <html> <head> <meta charset="utf8"> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.html index aed3003..9285fc15 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-svg-attribute-case.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/push-children-on-pseudo-addition.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/push-children-on-pseudo-addition.html index 194e500..0b90be9 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/push-children-on-pseudo-addition.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/push-children-on-pseudo-addition.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function addBeforeElement()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color-cleared.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color-cleared.html index 5de62a1..0d15809d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color-cleared.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color-cleared.html
@@ -7,7 +7,7 @@ } </style> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html index 9fa08a2..1e85566 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/default-background-color.html
@@ -7,7 +7,7 @@ } </style> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-2x.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-2x.html index b8d0a405..24d4adf2 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-2x.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-2x.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-only-viewport.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-only-viewport.html index ba930bea..6669019 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-only-viewport.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320-only-viewport.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320.html index 2f7e9d7..ad273773 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-320.html
@@ -1,7 +1,7 @@ <html><head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-2x.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-2x.html index 06f65df..8bec85b 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-2x.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-2x.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-only-viewport.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-only-viewport.html index 1eafc64..653eb0a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-only-viewport.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980-only-viewport.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980.html index 737ba3ba..60f77965 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-980.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.html index 397805b..cbd472e5 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-controls.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw-2x.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw-2x.html index 3dc638bb..73e321a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw-2x.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw-2x.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw.html index ac31db8..eab4d6a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-dw.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-initial-scale.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-initial-scale.html index e3ce18a..4edb372 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-initial-scale.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-initial-scale.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.html index c0eb543d..bf898fc 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-insets.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none-2x.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none-2x.html index 66255aea..e6bcdc3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none-2x.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none-2x.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none.html index 67d50fe..04ff69f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-none.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html index 03e0a44b..a041ec8 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-partial.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> body {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-restore.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-restore.html index 0b85155..6cd01f0f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-restore.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-restore.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small-dw.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small-dw.html index 68da836..1aea636 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small-dw.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small-dw.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.html index d0dd753..943eef8 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-small.html
@@ -1,8 +1,8 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script src="device-emulation-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script src="../resources/device-emulation-test.js"></script> <script> // This test is based on http://jsbin.com/urowoh/latest.
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-scale-not-persistant.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-scale-not-persistant.html index 7e5fa269..c673b7eb 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-scale-not-persistant.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-scale-not-persistant.html
@@ -1,6 +1,6 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function getCurrentSrc()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far-layered.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far-layered.html index 915e628c..1b7b332 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far-layered.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far-layered.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> html {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far.html index 7ced00c4..e20589c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-far.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> html {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html index dc9990d..ff228e9 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-near.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> html {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html index 134fd1c..55f5b30 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-reset.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> html {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-unobserved.html b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-unobserved.html index 4635f80..4085fcd 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-unobserved.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/forced-viewport-unobserved.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> html {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-objects-tracking.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-objects-tracking.html index d54911c..0c6cd2fb 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-objects-tracking.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-objects-tracking.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-samples-in-snapshot.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-samples-in-snapshot.html index 9b597207..a23b84e 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-samples-in-snapshot.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-samples-in-snapshot.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-active-dom-object.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-active-dom-object.html index 91f4378..1b0c19c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-active-dom-object.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-active-dom-object.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html index d045de4..0bd34f6 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html index 652663d..ff41be3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/sampling-heap-profiler.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/sampling-heap-profiler.html index 1b5bf0cf..4dea3a21 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/sampling-heap-profiler.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/sampling-heap-profiler.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/take-heap-snapshot.html b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/take-heap-snapshot.html index 7d5d504..6805fde 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/take-heap-snapshot.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/take-heap-snapshot.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> if (window.testRunner) { testRunner.dumpAsText();
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent-focus.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent-focus.html index a729129..9cea1ef 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent-focus.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent-focus.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function load()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html index 34a61d4..4ce88b3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> window.addEventListener("keydown", logEvent);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchMouseEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchMouseEvent.html index 296343e7..7b40610 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchMouseEvent.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchMouseEvent.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function addListeners()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.html index 640e9d2f..38c1669 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> window.addEventListener("touchstart", logEvent);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html index 802f29f..f715471 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> window.addEventListener("touchstart", logEvent, {passive: false});
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html index fe385b95..27e903f8 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html
@@ -1,4 +1,4 @@ -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> window.addEventListener("keydown", logEvent); window.addEventListener("mousedown", logEvent);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/json-parse.html b/third_party/WebKit/LayoutTests/inspector-protocol/json-parse.html index d91d9b9c..9213da2 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/json-parse.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/json-parse.html
@@ -1,7 +1,7 @@ <html> <head> <meta charset="utf8"> -<script type="text/javascript" src="../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers.html b/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers.html index 37928cb..0131fc7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="layer-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/layer-protocol-test.js"></script> <script type="text/javascript"> function addCompositedLayer()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler-load-empty.html b/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler-load-empty.html index 361cdab2..4c7f0b7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler-load-empty.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler-load-empty.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="application/x-javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="application/x-javascript" src="layer-protocol-test.js"></script> +<script type="application/x-javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="application/x-javascript" src="../resources/layer-protocol-test.js"></script> <script type="application/x-javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler.html b/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler.html index e636ebc..06134e06 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layers/paint-profiler.html
@@ -11,8 +11,8 @@ transform: translateZ(10px); } </style> -<script type="application/x-javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="application/x-javascript" src="layer-protocol-test.js"></script> +<script type="application/x-javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="application/x-javascript" src="../resources/layer-protocol-test.js"></script> <script type="application/x-javascript"> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/cjk-ideograph-fallback-by-lang.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/cjk-ideograph-fallback-by-lang.html index 1bfbdb3f..d408f63 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/cjk-ideograph-fallback-by-lang.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/cjk-ideograph-fallback-by-lang.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="../resources/css-protocol-test.js"></script> + <script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> </head> <body>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/fallback-myanmar.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/fallback-myanmar.html index b286bce..7a71087 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/fallback-myanmar.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/fallback-myanmar.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="../resources/css-protocol-test.js"></script> + <script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> </head> <script>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/generic-system-ui.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/generic-system-ui.html index 1ce9b7a..e38bbab5 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/generic-system-ui.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/generic-system-ui.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/css-protocol-test.js"></script> +<script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> <style> .test {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.html index 1aafcb2..6f1e00f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="../resources/css-protocol-test.js"></script> + <script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> </head> <body>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/ogham.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/ogham.html index 82d47e0..7f98133 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/ogham.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/ogham.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="../resources/css-protocol-test.js"></script> + <script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> </head> <body>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/tifinagh.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/tifinagh.html index b7ad9c70..b18e2ff 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/tifinagh.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/tifinagh.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="../resources/css-protocol-test.js"></script> + <script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> </head> <body>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/unicode-range-combining-chars-fallback.html b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/unicode-range-combining-chars-fallback.html index eb3e3c26..95d4173ff 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/unicode-range-combining-chars-fallback.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/unicode-range-combining-chars-fallback.html
@@ -2,9 +2,9 @@ <html> <meta charset="UTF-8"> <head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> + <script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> + <script type="text/javascript" src="../resources/css-protocol-test.js"></script> + <script type="text/javascript" src="../resources/dom-protocol-test.js"></script> <script type="text/javascript" src="resources/layout-font-test.js"></script> <style type="text/css">
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/loading-iframe-document-node.html b/third_party/WebKit/LayoutTests/inspector-protocol/loading-iframe-document-node.html index ea0195e..8757a3a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/loading-iframe-document-node.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/loading-iframe-document-node.html
@@ -1,7 +1,7 @@ <!doctype html> <html> <head> -<script type="text/javascript" src="../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function appendIframe() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html b/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html index e7ed7c8..2049b69a 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function appendIframe() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/network/websocket-initiator.html b/third_party/WebKit/LayoutTests/inspector-protocol/network/websocket-initiator.html index 9bfaa64..379e053 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/network/websocket-initiator.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/network/websocket-initiator.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> testRunner.setDumpConsoleMessages(false); var ws;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html index 5936158b..3fe0661c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html index c4278fe..77d025cc 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html index 2c92ae3..5e921d77 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var frame;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html index 05d3f8b2..364bf1ad 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function createFrame()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html index b3c66d67..fcf0f26 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function load()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html index 9c1f928..44f796c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function load()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html index 4b4230f..43d94fc 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html
@@ -1,7 +1,7 @@ <html> <head> -<script src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <style> body {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html index 4e002c7..7c40457 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/accessibility-dumpAccessibilityNodes.js similarity index 100% rename from third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-dumpAccessibilityNodes.js rename to third_party/WebKit/LayoutTests/inspector-protocol/resources/accessibility-dumpAccessibilityNodes.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/css-protocol-test.js similarity index 100% copy from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js copy to third_party/WebKit/LayoutTests/inspector-protocol/resources/css-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/device-emulation-test.js similarity index 100% rename from third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-emulation-test.js rename to third_party/WebKit/LayoutTests/inspector-protocol/resources/device-emulation-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/dom-protocol-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/dom-protocol-test.js similarity index 100% copy from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/dom-protocol-test.js copy to third_party/WebKit/LayoutTests/inspector-protocol/resources/dom-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layers/layer-protocol-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/layer-protocol-test.js similarity index 100% rename from third_party/WebKit/LayoutTests/inspector-protocol/layers/layer-protocol-test.js rename to third_party/WebKit/LayoutTests/inspector-protocol/resources/layer-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js b/third_party/WebKit/LayoutTests/inspector-protocol/resources/tracing-test.js similarity index 100% rename from third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js rename to third_party/WebKit/LayoutTests/inspector-protocol/resources/tracing-test.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-await-promise.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-await-promise.html index 7717a11..1bb91a80 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-await-promise.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-await-promise.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var resolveCallback;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-callFunctionOn-async.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-callFunctionOn-async.html index f521765..a52e399 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-callFunctionOn-async.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-callFunctionOn-async.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> testRunner.setDumpConsoleMessages(false);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-clear-of-command-line-api.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-clear-of-command-line-api.html index 5834c25..797aa53 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-clear-of-command-line-api.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-clear-of-command-line-api.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var methods = ["dir","dirxml","profile","profileEnd","clear","table","keys","values","debug","undebug","monitor","unmonitor","inspect","copy"];
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-command-line-api-can-be-overriden.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-command-line-api-can-be-overriden.html index c74afd7..2391e18 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-command-line-api-can-be-overriden.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-command-line-api-can-be-overriden.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function overrideDir()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-compileScript.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-compileScript.html index a93d06f4..85e6d04 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-compileScript.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-compileScript.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html index bee5210..de145d12 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.html index 25587d2..93d8014 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> testRunner.setDumpConsoleMessages(false);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-line-and-column.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-line-and-column.html index 9bc10e3..a0e57b7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-line-and-column.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-line-and-column.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html index 9c16c9af..6c459b4 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-handle-navigate.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-handle-navigate.html index 0065d77..16482b7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-handle-navigate.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-handle-navigate.html
@@ -1,7 +1,7 @@ <!doctype html> <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function appendIframe() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html index a68be22..ec1ce68e 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-memory.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function dumpInnerHtml()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.html index e58a8d7..2e1dc349 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html index 892073f..0ad3d5ebd 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function createPromiseAndScheduleResolve()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-in-default-context.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-in-default-context.html index b500422..ead0b4f8 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-in-default-context.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-in-default-context.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-return-by-value.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-return-by-value.html index 170441f6..2236c70 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-return-by-value.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-return-by-value.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-with-context-id-equal-zero.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-with-context-id-equal-zero.html index e2e2b98..555a1b6 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-with-context-id-equal-zero.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-with-context-id-equal-zero.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.html index c119374..2ed42f20 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> window.dummyObject = { a : 1 };
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html index f79329b8..c1eb2f4 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-execution-contexts-events.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function createFrame()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html index afaf0a7..fd17f013 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.html index c825b856..0a8373d 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties-preview.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties.html index 770cdc7..b5e5d14 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-getProperties.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-property-on-console-proto.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-property-on-console-proto.html index eb11ffbb..bfd27558 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-property-on-console-proto.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-property-on-console-proto.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function testFunction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-runScript-async.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-runScript-async.html index b81bafc8..bf5550e1 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-runScript-async.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-runScript-async.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-shouldnt-crash-after-inspected-context-destroyed.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-shouldnt-crash-after-inspected-context-destroyed.html index df60742b..cd25c63 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-shouldnt-crash-after-inspected-context-destroyed.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-shouldnt-crash-after-inspected-context-destroyed.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> function test()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/shadow-dom-rules-in-styleSheetAddedEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/shadow-dom-rules-in-styleSheetAddedEvent.html index efc2c42..27dda57 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/shadow-dom-rules-in-styleSheetAddedEvent.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/shadow-dom-rules-in-styleSheetAddedEvent.html
@@ -1,7 +1,7 @@ <!doctype html> <html> <head> -<script type="text/javascript" src="../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script type="text/javascript"> function pageLoaded() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.html b/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.html index f876a61..51d1950 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var styleElement1; var styleElement2;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/fetch-as-stream.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/fetch-as-stream.html index 9915d15..b6edcb3 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/fetch-as-stream.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/fetch-as-stream.html
@@ -8,8 +8,8 @@ height: 100px; } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/tracing-test.js"></script> <script> function performActions() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html index f6621af..e4167d9 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/tracing-test.js"></script> <script> function performActions() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html index d43cdd1..c500060 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/tracing-test.js"></script> <script> function performAction()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-layout.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-layout.html index f998ee4..e2f0691 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-layout.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-layout.html
@@ -6,8 +6,8 @@ background-color: red; } </style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/tracing-test.js"></script> <script> function performActions()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-raf.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-raf.html index 8aaf9aa..c5376f0 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-raf.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-raf.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/tracing-test.js"></script> <script> function performActions()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-timer.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-timer.html index 78b64b5..5a3db8f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-timer.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-timer.html
@@ -1,7 +1,7 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> -<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../resources/tracing-test.js"></script> <script> function performActions()
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.html b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.html index 6d693e4..97a9a86 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker1;
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html index 51ac7af..978d326 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
@@ -1,6 +1,6 @@ <html> <head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> +<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> <script> var worker;
diff --git a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt index 44f56e6..03b8ea1 100644 --- a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
@@ -1782,6 +1782,8 @@ getter onbeforepaste getter oncopy getter oncut + getter onfullscreenchange + getter onfullscreenerror getter onpaste getter onsearch getter onselectstart @@ -1860,6 +1862,8 @@ setter onbeforepaste setter oncopy setter oncut + setter onfullscreenchange + setter onfullscreenerror setter onpaste setter onsearch setter onselectstart
diff --git a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt index d00b9d97..3d814af 100644 --- a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
@@ -144,6 +144,8 @@ property onended property onerror property onfocus + property onfullscreenchange + property onfullscreenerror property ongotpointercapture property oninput property oninvalid @@ -1240,6 +1242,8 @@ property onended property onerror property onfocus + property onfullscreenchange + property onfullscreenerror property ongotpointercapture property oninput property oninvalid
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt index ae8e3a87..5f26cbc 100644 --- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -1782,6 +1782,8 @@ getter onbeforepaste getter oncopy getter oncut + getter onfullscreenchange + getter onfullscreenerror getter onpaste getter onsearch getter onselectstart @@ -1860,6 +1862,8 @@ setter onbeforepaste setter oncopy setter oncut + setter onfullscreenchange + setter onfullscreenerror setter onpaste setter onsearch setter onselectstart
diff --git a/third_party/WebKit/PerformanceTests/resources/results-template.html b/third_party/WebKit/PerformanceTests/resources/results-template.html deleted file mode 100644 index 7d340ae0..0000000 --- a/third_party/WebKit/PerformanceTests/resources/results-template.html +++ /dev/null
@@ -1,614 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Blink Performance Test Results</title> -<style type="text/css"> - -section { - background: white; - padding: 10px; - position: relative; -} - -.time-plots { - padding-left: 25px; -} - -.time-plots > div { - display: inline-block; - width: 90px; - height: 40px; - margin-right: 10px; -} - -section h1 { - text-align: center; - font-size: 1em; -} - -section .tooltip { - position: absolute; - text-align: center; - background: #ffcc66; - border-radius: 5px; - padding: 0px 5px; -} - -body { - padding: 0px; - margin: 0px; - font-family: sans-serif; -} - -table { - background: white; - width: 100%; -} - -table, td, th { - border-collapse: collapse; - padding: 5px; -} - -tr.even { - background: #f6f6f6; -} - -table td { - position: relative; - font-family: monospace; -} - -th, td { - cursor: pointer; - cursor: hand; -} - -th { - background: #e6eeee; - background: -webkit-gradient(linear, left top, left bottom, from(rgb(244, 244, 244)), to(rgb(217, 217, 217))); - border: 1px solid #ccc; -} - -th:after { - content: ' \25B8'; -} - -th.headerSortUp:after { - content: ' \25BE'; -} - -th.headerSortDown:after { - content: ' \25B4'; -} - -td.comparison, td.result { - text-align: right; -} - -td.better { - color: #6c6; -} - -td.worse { - color: #c66; -} - -td.missing { - text-align: center; -} - -.checkbox { - display: inline-block; - background: #eee; - background: -webkit-gradient(linear, left bottom, left top, from(rgb(220, 220, 220)), to(rgb(200, 200, 200))); - border: inset 1px #ddd; - border-radius: 5px; - margin: 10px; - font-size: small; - cursor: pointer; - cursor: hand; - -webkit-user-select: none; - font-weight: bold; -} - -.checkbox span { - display: inline-block; - line-height: 100%; - padding: 5px 8px; - border: outset 1px transparent; -} - -.checkbox .checked { - background: #e6eeee; - background: -webkit-gradient(linear, left top, left bottom, from(rgb(255, 255, 255)), to(rgb(235, 235, 235))); - border: outset 1px #eee; - border-radius: 5px; -} - -</style> -</head> -<body> -<div style="padding: 0 10px;"> -Result <span id="time-memory" class="checkbox"><span class="checked">Time</span><span>Memory</span></span> -Reference <span id="reference" class="checkbox"></span> -</div> -<table id="container"></table> -<script> - -(function () { - var jQuery = 'PerformanceTests/Dromaeo/resources/dromaeo/web/lib/jquery-1.6.4.js'; - var plugins = ['PerformanceTests/resources/jquery.flot.min.js', 'PerformanceTests/resources/jquery.tablesorter.min.js', - 'PerformanceTests/resources/statistics.js']; - var localPath = '%AbsolutePathToWebKitTrunk%'; - var remotePath = 'https://svn.webkit.org/repository/webkit/trunk'; - var numberOfFailures = 0; - var startedLoadingPlugins = false; - var numberOfLoadedPlugins = 0; - - function loadScript(src, loaded, failed) { - var script = document.createElement('script'); - script.async = true; - script.src = src; - script.onload = loaded; - if (failed) - script.onerror = failed; - document.body.appendChild(script); - } - - function loadPlugins(trunkPath) { - for (var i = 0; i < plugins.length; i++) - loadScript(trunkPath + '/' + plugins[i], loadedPlugin, createFailedToLoadPlugin(plugins[i])); - } - - function loadedPlugin() { - numberOfLoadedPlugins++; - if (numberOfLoadedPlugins == plugins.length) - setTimeout(init, 0); - } - - function createFailedToLoadPlugin(plugin) { - return function () { alert("Failed to load " + plugin); } - } - - function createLoadedJQuery(trunkPath) { - return function () { loadPlugins(trunkPath); } - } - - loadScript(localPath + '/' + jQuery, - createLoadedJQuery(localPath), - function () { - loadScript(remotePath + '/' + jQuery, - createLoadedJQuery(remotePath), - function () { alert("Failed to load jQuery."); }); - }); -})(); - -function TestResult(metric, values, associatedRun) { - if (values[0] instanceof Array) { - var flattenedValues = []; - for (var i = 0; i < values.length; i++) - flattenedValues = flattenedValues.concat(values[i]); - values = flattenedValues; - } - - this.test = function () { return metric; } - this.values = function () { return values.map(function (value) { return metric.scalingFactor() * value; }); } - this.unscaledMean = function () { return Statistics.sum(values) / values.length; } - this.mean = function () { return metric.scalingFactor() * this.unscaledMean(); } - this.min = function () { return metric.scalingFactor() * Statistics.min(values); } - this.max = function () { return metric.scalingFactor() * Statistics.max(values); } - this.confidenceIntervalDelta = function () { - return metric.scalingFactor() * Statistics.confidenceIntervalDelta(0.95, values.length, - Statistics.sum(values), Statistics.squareSum(values)); - } - this.confidenceIntervalDeltaRatio = function () { return this.confidenceIntervalDelta() / this.mean(); } - this.percentDifference = function(other) { return (other.unscaledMean() - this.unscaledMean()) / this.unscaledMean(); } - this.isStatisticallySignificant = function (other) { - var diff = Math.abs(other.mean() - this.mean()); - return diff > this.confidenceIntervalDelta() && diff > other.confidenceIntervalDelta(); - } - this.run = function () { return associatedRun; } -} - -function TestRun(entry) { - this.description = function () { return entry['description']; } - this.webkitRevision = function () { return entry['revisions']['chromium']['revision']; } - this.label = function () { - var label = 'r' + this.webkitRevision(); - if (this.description()) - label += ' ‐ ' + this.description(); - return label; - } -} - -function PerfTestMetric(name, metric) { - var testResults = []; - var cachedUnit = null; - var cachedScalingFactor = null; - var unit = {'FrameRate': 'fps', 'Runs': 'runs/s', 'Time': 'ms', 'Malloc': 'bytes', 'JSHeap': 'bytes'}[metric]; - - // We can't do this in TestResult because all results for each test need to share the same unit and the same scaling factor. - function computeScalingFactorIfNeeded() { - // FIXME: We shouldn't be adjusting units on every test result. - // We can only do this on the first test. - if (!testResults.length || cachedUnit) - return; - - var mean = testResults[0].unscaledMean(); // FIXME: We should look at all values. - var kilo = unit == 'bytes' ? 1024 : 1000; - if (mean > 10 * kilo * kilo && unit != 'ms') { - cachedScalingFactor = 1 / kilo / kilo; - cachedUnit = 'M ' + unit; - } else if (mean > 10 * kilo) { - cachedScalingFactor = 1 / kilo; - cachedUnit = unit == 'ms' ? 's' : ('K ' + unit); - } else { - cachedScalingFactor = 1; - cachedUnit = unit; - } - } - - this.name = function () { return name + ':' + metric; } - this.isMemoryTest = function () { return metric == 'JSHeap' || metric == 'Malloc'; } - this.addResult = function (newResult) { - testResults.push(newResult); - cachedUnit = null; - cachedScalingFactor = null; - } - this.results = function () { return testResults; } - this.scalingFactor = function() { - computeScalingFactorIfNeeded(); - return cachedScalingFactor; - } - this.unit = function () { - computeScalingFactorIfNeeded(); - return cachedUnit; - } - this.smallerIsBetter = function () { return unit == 'ms' || unit == 'bytes'; } -} - -var plotColor = 'rgb(230,50,50)'; -var subpointsPlotOptions = { - lines: {show:true, lineWidth: 0}, - color: plotColor, - points: {show: true, radius: 1}, - bars: {show: false}}; - -var mainPlotOptions = { - xaxis: { - min: -0.5, - tickSize: 1, - }, - crosshair: { mode: 'y' }, - series: { shadowSize: 0 }, - bars: {show: true, align: 'center', barWidth: 0.5}, - lines: { show: false }, - points: { show: true }, - grid: { - borderWidth: 1, - borderColor: '#ccc', - backgroundColor: '#fff', - hoverable: true, - autoHighlight: false, - } -}; - -var timePlotOptions = { - yaxis: { show: false }, - xaxis: { show: false }, - lines: { show: true }, - grid: { borderWidth: 1, borderColor: '#ccc' }, - colors: [ plotColor ] -}; - -function createPlot(container, test) { - var section = $('<section><div class="plot"></div><div class="time-plots"></div>' - + '<span class="tooltip"></span></section>'); - section.children('.plot').css({'width': (100 * test.results().length + 25) + 'px', 'height': '300px'}); - $(container).append(section); - - var plotContainer = section.children('.plot'); - var minIsZero = true; - attachPlot(test, plotContainer, minIsZero); - - attachTimePlots(test, section.children('.time-plots')); - - var tooltip = section.children('.tooltip'); - plotContainer.bind('plothover', function (event, position, item) { - if (item) { - var postfix = item.series.id ? ' (' + item.series.id + ')' : ''; - tooltip.html(item.datapoint[1].toPrecision(4) + postfix); - var sectionOffset = $(section).offset(); - tooltip.css({left: item.pageX - sectionOffset.left - tooltip.outerWidth() / 2, top: item.pageY - sectionOffset.top + 10}); - tooltip.fadeIn(200); - } else - tooltip.hide(); - }); - plotContainer.mouseout(function () { - tooltip.hide(); - }); - plotContainer.click(function (event) { - event.preventDefault(); - minIsZero = !minIsZero; - attachPlot(test, plotContainer, minIsZero); - }); - - return section; -} - -function attachTimePlots(test, container) { - var results = test.results(); - var attachedPlot = false; - for (var i = 0; i < results.length; i++) { - container.append('<div></div>'); - var values = results[i].values(); - if (!values) - continue; - attachedPlot = true; - - $.plot(container.children().last(), [values.map(function (value, index) { return [index, value]; })], - $.extend(true, {}, timePlotOptions, {yaxis: {min: Math.min.apply(Math, values) * 0.9, max: Math.max.apply(Math, values) * 1.1}, - xaxis: {min: -0.5, max: values.length - 0.5}})); - } - if (!attachedPlot) - container.children().remove(); -} - -function attachPlot(test, plotContainer, minIsZero) { - var results = test.results(); - - var values = results.reduce(function (values, result, index) { - var newValues = result.values(); - return newValues ? values.concat(newValues.map(function (value) { return [index, value]; })) : values; - }, []); - - var plotData = [$.extend(true, {}, subpointsPlotOptions, {data: values})]; - plotData.push({id: 'μ', data: results.map(function (result, index) { return [index, result.mean()]; }), color: plotColor}); - - var overallMax = Statistics.max(results.map(function (result, index) { return result.max(); })); - var overallMin = Statistics.min(results.map(function (result, index) { return result.min(); })); - var margin = (overallMax - overallMin) * 0.1; - var currentPlotOptions = $.extend(true, {}, mainPlotOptions, {yaxis: { - min: minIsZero ? 0 : overallMin - margin, - max: minIsZero ? overallMax * 1.1 : overallMax + margin}}); - - currentPlotOptions.xaxis.max = results.length - 0.5; - currentPlotOptions.xaxis.ticks = results.map(function (result, index) { return [index, result.run().label()]; }); - - $.plot(plotContainer, plotData, currentPlotOptions); -} - -function toFixedWidthPrecision(value) { - var decimal = value.toFixed(2); - return decimal; -} - -function formatPercentage(fraction) { - var percentage = fraction * 100; - return (fraction * 100).toFixed(2) + '%'; -} - -function createTable(tests, runs, shouldIgnoreMemory, referenceIndex) { - $('#container').html('<thead><tr><th>Test</th><th>Unit</th>' + runs.map(function (run, index) { - return '<th colspan="' + (index == referenceIndex ? 2 : 3) + '" class="{sorter: \'comparison\'}">' + run.label() + '</th>'; - }).reduce(function (markup, cell) { return markup + cell; }, '') + '</tr></head><tbody></tbody>'); - - var testNames = []; - for (testName in tests) - testNames.push(testName); - - testNames.sort().map(function (testName) { - var test = tests[testName]; - if (test.isMemoryTest() != shouldIgnoreMemory) - createTableRow(runs, test, referenceIndex); - }); - - $('#container').tablesorter({widgets: ['zebra']}); -} - -function linearRegression(points) { - // Implement http://www.easycalculation.com/statistics/learn-correlation.php. - // x = magnitude - // y = iterations - var sumX = 0; - var sumY = 0; - var sumXSquared = 0; - var sumYSquared = 0; - var sumXTimesY = 0; - - for (var i = 0; i < points.length; i++) { - var x = i; - var y = points[i]; - sumX += x; - sumY += y; - sumXSquared += x * x; - sumYSquared += y * y; - sumXTimesY += x * y; - } - - var r = (points.length * sumXTimesY - sumX * sumY) / - Math.sqrt((points.length * sumXSquared - sumX * sumX) * - (points.length * sumYSquared - sumY * sumY)); - - if (isNaN(r) || r == Math.Infinity) - r = 0; - - var slope = (points.length * sumXTimesY - sumX * sumY) / (points.length * sumXSquared - sumX * sumX); - var intercept = sumY / points.length - slope * sumX / points.length; - return {slope: slope, intercept: intercept, rSquared: r * r}; -} - -var warningSign = '<svg viewBox="0 0 100 100" style="width: 18px; height: 18px; vertical-align: bottom;" version="1.1">' - + '<polygon fill="red" points="50,10 90,80 10,80 50,10" stroke="red" stroke-width="10" stroke-linejoin="round" />' - + '<polygon fill="white" points="47,30 48,29, 50, 28.7, 52,29 53,30 50,60" stroke="white" stroke-width="10" stroke-linejoin="round" />' - + '<circle cx="50" cy="73" r="6" fill="white" />' - + '</svg>'; - -function createTableRow(runs, test, referenceIndex) { - var tableRow = $('<tr><td class="test">' + test.name() + '</td><td class="unit">' + test.unit() + '</td></tr>'); - - function markupForRun(result, referenceResult) { - var comparisonCell = ''; - var hiddenValue = ''; - var shouldCompare = result !== referenceResult; - if (shouldCompare && referenceResult) { - var percentDifference = referenceResult.percentDifference(result); - var better = test.smallerIsBetter() ? percentDifference < 0 : percentDifference > 0; - var comparison = ''; - var className = 'comparison'; - if (referenceResult.isStatisticallySignificant(result)) { - comparison = formatPercentage(Math.abs(percentDifference)) + (better ? ' Better' : ' Worse '); - className += better ? ' better' : ' worse'; - } - hiddenValue = '<span style="display: none">|' + comparison + '</span>'; - comparisonCell = '<td class="' + className + '">' + comparison + '</td>'; - } else if (shouldCompare) - comparisonCell = '<td class="comparison"></td>'; - - var values = result.values(); - var warning = ''; - var regressionAnalysis = ''; - if (values && values.length > 3) { - regressionResult = linearRegression(values); - regressionAnalysis = 'slope=' + toFixedWidthPrecision(regressionResult.slope) - + ', R^2=' + toFixedWidthPrecision(regressionResult.rSquared); - if (regressionResult.rSquared > 0.6 && Math.abs(regressionResult.slope) > 0.01) { - warning = ' <span class="regression-warning" title="Detected a time dependency with ' + regressionAnalysis + '">' + warningSign + ' </span>'; - } - } - - var statistics = 'σ=' + toFixedWidthPrecision(result.confidenceIntervalDelta()) + ', min=' + toFixedWidthPrecision(result.min()) - + ', max=' + toFixedWidthPrecision(result.max()) + '\n' + regressionAnalysis; - - // Tablesorter doesn't know about the second cell so put the comparison in the invisible element. - return '<td class="result" title="' + statistics + '">' + toFixedWidthPrecision(result.mean()) + hiddenValue - + '</td><td class="confidenceIntervalDelta" title="' + statistics + '">± ' - + formatPercentage(result.confidenceIntervalDeltaRatio()) + warning + '</td>' + comparisonCell; - } - - function markupForMissingRun(isReference) { - return '<td colspan="' + (isReference ? 2 : 3) + '" class="missing">Missing</td>'; - } - - var runIndex = 0; - var results = test.results(); - var referenceResult = undefined; - var resultIndexMap = {}; - for (var i = 0; i < results.length; i++) { - while (runs[runIndex] !== results[i].run()) - runIndex++; - if (runIndex == referenceIndex) - referenceResult = results[i]; - resultIndexMap[runIndex] = i; - } - for (var i = 0; i < runs.length; i++) { - var resultIndex = resultIndexMap[i]; - if (resultIndex == undefined) - tableRow.append(markupForMissingRun(i == referenceIndex)); - else - tableRow.append(markupForRun(results[resultIndex], referenceResult)); - } - - $('#container').children('tbody').last().append(tableRow); - - tableRow.click(function (event) { - if (event.target != tableRow[0] && event.target.parentNode != tableRow[0]) - return; - - event.preventDefault(); - - var firstCell = tableRow.children('td').first(); - if (firstCell.children('section').length) { - firstCell.children('section').remove(); - tableRow.children('td').css({'padding-bottom': ''}); - } else { - var plot = createPlot(firstCell, test); - plot.css({'position': 'absolute', 'z-index': 2}); - var offset = tableRow.offset(); - offset.left += 1; - offset.top += tableRow.outerHeight(); - plot.offset(offset); - tableRow.children('td').css({'padding-bottom': plot.outerHeight() + 5}); - } - - return false; - }); -} - -function init() { - $.tablesorter.addParser({ - id: 'comparison', - is: function(s) { - return s.indexOf('|') >= 0; - }, - format: function(s) { - var parsed = parseFloat(s.substring(s.indexOf('|') + 1)); - return isNaN(parsed) ? 0 : parsed; - }, - type: 'numeric', - }); - - var runs = []; - var metrics = {}; - $.each(JSON.parse(document.getElementById('json').textContent), function (index, entry) { - var run = new TestRun(entry); - runs.push(run); - - function addTests(tests, parentFullName) { - for (var testName in tests) { - var fullTestName = parentFullName + '/' + testName; - var rawMetrics = tests[testName].metrics; - - for (var metricName in rawMetrics) { - var fullMetricName = fullTestName + ':' + metricName; - var metric = metrics[fullMetricName]; - if (!metric) { - metric = new PerfTestMetric(fullTestName, metricName); - metrics[fullMetricName] = metric; - } - metric.addResult(new TestResult(metric, rawMetrics[metricName].current, run)); - } - - if (tests[testName].tests) - addTests(tests[testName].tests, fullTestName); - } - } - - addTests(entry.tests, ''); - }); - - var shouldIgnoreMemory= true; - var referenceIndex = 0; - - createTable(metrics, runs, shouldIgnoreMemory, referenceIndex); - - $('#time-memory').bind('change', function (event, checkedElement) { - shouldIgnoreMemory = checkedElement.textContent == 'Time'; - createTable(metrics, runs, shouldIgnoreMemory, referenceIndex); - }); - - runs.map(function (run, index) { - $('#reference').append('<span value="' + index + '"' + (index == referenceIndex ? ' class="checked"' : '') + '>' + run.label() + '</span>'); - }) - - $('#reference').bind('change', function (event, checkedElement) { - referenceIndex = parseInt(checkedElement.getAttribute('value')); - createTable(metrics, runs, shouldIgnoreMemory, referenceIndex); - }); - - $('.checkbox').each(function (index, checkbox) { - $(checkbox).children('span').click(function (event) { - if ($(this).hasClass('checked')) - return; - $(checkbox).children('span').removeClass('checked'); - $(this).addClass('checked'); - $(checkbox).trigger('change', $(this)); - }); - }); -} - -</script> -<script id="json" type="application/json">%PeformanceTestsResultsJSON%</script> -</body> -</html>
diff --git a/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp b/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp index a587637..692da6d 100644 --- a/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp +++ b/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp
@@ -34,7 +34,6 @@ #include "core/css/MediaQueryEvaluator.h" #include "core/css/RuleSet.h" #include "core/css/StyleSheetContents.h" -#include "core/dom/Fullscreen.h" #include "core/html/HTMLAnchorElement.h" #include "core/html/HTMLHtmlElement.h" #include "core/layout/LayoutTheme.h"
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp index 8548b6a..cdbf162 100644 --- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp +++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -1059,7 +1059,7 @@ if (IsHTMLFrameElementBase(element) && element.ContainsFullScreenElement()) return true; - return Fullscreen::IsCurrentFullScreenElement(element); + return Fullscreen::IsFullscreenElement(element); case CSSSelector::kPseudoFullScreenAncestor: return element.ContainsFullScreenElement(); case CSSSelector::kPseudoVideoPersistent:
diff --git a/third_party/WebKit/Source/core/dom/DocumentFullscreen.cpp b/third_party/WebKit/Source/core/dom/DocumentFullscreen.cpp index 4a12e9d..2cbf370 100644 --- a/third_party/WebKit/Source/core/dom/DocumentFullscreen.cpp +++ b/third_party/WebKit/Source/core/dom/DocumentFullscreen.cpp
@@ -41,8 +41,4 @@ Fullscreen::ExitFullscreen(document); } -Element* DocumentFullscreen::currentFullScreenElement(Document& document) { - return Fullscreen::CurrentFullScreenElementForBindingFrom(document); -} - } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/DocumentFullscreen.h b/third_party/WebKit/Source/core/dom/DocumentFullscreen.h index f0fa77d..633337f 100644 --- a/third_party/WebKit/Source/core/dom/DocumentFullscreen.h +++ b/third_party/WebKit/Source/core/dom/DocumentFullscreen.h
@@ -45,9 +45,6 @@ DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(fullscreenchange); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(fullscreenerror); - // Mozilla version - static Element* currentFullScreenElement(Document&); - DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenerror); };
diff --git a/third_party/WebKit/Source/core/dom/DocumentFullscreen.idl b/third_party/WebKit/Source/core/dom/DocumentFullscreen.idl index 23225e7..316ebb6 100644 --- a/third_party/WebKit/Source/core/dom/DocumentFullscreen.idl +++ b/third_party/WebKit/Source/core/dom/DocumentFullscreen.idl
@@ -30,8 +30,8 @@ [RuntimeEnabled=FullscreenUnprefixed] attribute EventHandler onfullscreenerror; // Mozilla version - [MeasureAs=PrefixedDocumentIsFullscreen, ImplementedAs=currentFullScreenElement] readonly attribute boolean webkitIsFullScreen; - [MeasureAs=PrefixedDocumentCurrentFullScreenElement, ImplementedAs=currentFullScreenElement] readonly attribute Element webkitCurrentFullScreenElement; + [MeasureAs=PrefixedDocumentIsFullscreen, ImplementedAs=fullscreenElement] readonly attribute boolean webkitIsFullScreen; + [MeasureAs=PrefixedDocumentCurrentFullScreenElement, ImplementedAs=fullscreenElement] readonly attribute Element webkitCurrentFullScreenElement; [MeasureAs=PrefixedDocumentCancelFullScreen, ImplementedAs=exitFullscreen] void webkitCancelFullScreen(); // W3C version
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp index 467981e..7373851b 100644 --- a/third_party/WebKit/Source/core/dom/Element.cpp +++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1748,7 +1748,7 @@ DCHECK(!HasRareData() || !GetElementRareData()->HasPseudoElements()); - if (Fullscreen::IsCurrentFullScreenElement(*this)) { + if (Fullscreen::IsFullscreenElement(*this)) { SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); if (insertion_point->IsElementNode()) { ToElement(insertion_point)->SetContainsFullScreenElement(false); @@ -3715,7 +3715,7 @@ // In some rare situations, when the persistent video has been removed from // the tree, part of the tree might still carry the flag. - if (!value && Fullscreen::IsCurrentFullScreenElement(*this)) { + if (!value && Fullscreen::IsFullscreenElement(*this)) { for (Node* node = firstChild(); node;) { if (!node->IsElementNode() || !ToElement(node)->ContainsPersistentVideo()) { @@ -4361,7 +4361,7 @@ return false; if (HasAnimations()) return false; - if (Fullscreen::IsCurrentFullScreenElement(*this)) + if (Fullscreen::IsFullscreenElement(*this)) return false; return true; }
diff --git a/third_party/WebKit/Source/core/dom/ElementFullscreen.h b/third_party/WebKit/Source/core/dom/ElementFullscreen.h index 597e553..2956896 100644 --- a/third_party/WebKit/Source/core/dom/ElementFullscreen.h +++ b/third_party/WebKit/Source/core/dom/ElementFullscreen.h
@@ -18,6 +18,9 @@ public: static void requestFullscreen(Element&); + DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(fullscreenchange); + DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(fullscreenerror); + static void webkitRequestFullscreen(Element&); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange);
diff --git a/third_party/WebKit/Source/core/dom/ElementFullscreen.idl b/third_party/WebKit/Source/core/dom/ElementFullscreen.idl index e27ee3d..65e443f 100644 --- a/third_party/WebKit/Source/core/dom/ElementFullscreen.idl +++ b/third_party/WebKit/Source/core/dom/ElementFullscreen.idl
@@ -7,6 +7,9 @@ partial interface Element { [RuntimeEnabled=FullscreenUnprefixed] void requestFullscreen(); + [RuntimeEnabled=FullscreenUnprefixed] attribute EventHandler onfullscreenchange; + [RuntimeEnabled=FullscreenUnprefixed] attribute EventHandler onfullscreenerror; + // Mozilla version [LogActivity, LogAllWorlds, MeasureAs=PrefixedElementRequestFullScreen, ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen();
diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.cpp b/third_party/WebKit/Source/core/dom/Fullscreen.cpp index 65159dc4..548ac6f0 100644 --- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp +++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
@@ -50,6 +50,7 @@ #include "core/page/ChromeClient.h" #include "core/svg/SVGSVGElement.h" #include "platform/ScopedOrientationChangeIndicator.h" +#include "platform/bindings/Microtask.h" #include "platform/feature_policy/FeaturePolicy.h" namespace blink { @@ -162,18 +163,53 @@ return true; } -bool IsPrefixed(const AtomicString& type) { - return type == EventTypeNames::webkitfullscreenchange || - type == EventTypeNames::webkitfullscreenerror; +// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen step 4: +bool RequestFullscreenConditionsMet(Element& pending, Document& document) { + // |pending|'s namespace is the HTML namespace or |pending| is an SVG svg or + // MathML math element. Note: MathML is not supported. + if (!pending.IsHTMLElement() && !isSVGSVGElement(pending)) + return false; + + // The fullscreen element ready check for |pending| returns false. + if (!FullscreenElementReady(pending)) + return false; + + // Fullscreen is supported. + if (!FullscreenIsSupported(document)) + return false; + + // This algorithm is allowed to request fullscreen. + if (!AllowedToRequestFullscreen(document)) + return false; + + return true; } -Event* CreateEvent(const AtomicString& type, EventTarget& target) { - EventInit initializer; - initializer.setBubbles(IsPrefixed(type)); - Event* event = Event::Create(type, initializer); - event->SetTarget(&target); - return event; -} +// RequestFullscreenScope is allocated at the top of |RequestFullscreen()| and +// used to avoid synchronously changing any state within that method, by +// deferring changes in |DidEnterFullscreen()|. +class RequestFullscreenScope { + STACK_ALLOCATED(); + WTF_MAKE_NONCOPYABLE(RequestFullscreenScope); + + public: + RequestFullscreenScope() { + DCHECK(!running_request_fullscreen_); + running_request_fullscreen_ = true; + } + + ~RequestFullscreenScope() { + DCHECK(running_request_fullscreen_); + running_request_fullscreen_ = false; + } + + static bool RunningRequestFullscreen() { return running_request_fullscreen_; } + + private: + static bool running_request_fullscreen_; +}; + +bool RequestFullscreenScope::running_request_fullscreen_ = false; // Walks the frame tree and returns the first local ancestor frame, if any. LocalFrame* NextLocalAncestor(Frame& frame) { @@ -191,7 +227,7 @@ LocalFrame* frame = document.GetFrame(); if (!frame) return nullptr; - LocalFrame* next = NextLocalAncestor(*document.GetFrame()); + LocalFrame* next = NextLocalAncestor(*frame); if (!next) return nullptr; DCHECK(next->GetDocument()); @@ -209,34 +245,94 @@ return document; } -// Helper to find the browsing context container in |doc| that embeds the -// |descendant| Document, possibly through multiple levels of nesting. This -// works even in OOPIF scenarios like A-B-A, where there may be remote frames -// in between |doc| and |descendant|. -HTMLFrameOwnerElement* FindContainerForDescendant(const Document& doc, - const Document& descendant) { - Frame* frame = descendant.GetFrame(); - while (frame->Tree().Parent() != doc.GetFrame()) - frame = frame->Tree().Parent(); - return ToHTMLFrameOwnerElement(frame->Owner()); +// https://fullscreen.spec.whatwg.org/#simple-fullscreen-document +bool IsSimpleFullscreenDocument(Document& document) { + return Fullscreen::FullscreenElementStackSizeFrom(document) == 1; } -// Fullscreen status affects scroll paint properties through -// LocalFrameView::userInputScrollable(). -void SetNeedsPaintPropertyUpdate(Document* document) { - if (!RuntimeEnabledFeatures::SlimmingPaintInvalidationEnabled() || - RuntimeEnabledFeatures::RootLayerScrollingEnabled()) - return; +// https://fullscreen.spec.whatwg.org/#collect-documents-to-unfullscreen +HeapVector<Member<Document>> CollectDocumentsToUnfullscreen(Document& doc) { + // 1. Let |docs| be an ordered set consisting of |doc|. + HeapVector<Member<Document>> docs; + docs.push_back(&doc); - if (!document) - return; + // 2. While true: + for (Document* lastDoc = &doc;;) { + // 2.1. Let |lastDoc| be |docs|'s last document. - LocalFrame* frame = document->GetFrame(); - if (!frame) - return; + // 2.2. Assert: |lastDoc|'s fullscreen element is not null. + DCHECK(Fullscreen::FullscreenElementFrom(*lastDoc)); - if (LocalFrameView* frame_view = frame->View()) - frame_view->SetNeedsPaintPropertyUpdate(); + // 2.3. If |lastDoc| is not a simple fullscreen document, break. + if (!IsSimpleFullscreenDocument(*lastDoc)) + break; + + // 2.4. Let |container| be |lastDoc|'s browsing context container, if any, + // and otherwise break. + // + // OOPIF: Skip over remote frames, assuming that they have exactly one + // element in their fullscreen element stacks, thereby erring on the side of + // exiting fullscreen. TODO(alexmos): Deal with nested fullscreen cases, see + // https://crbug.com/617369. + lastDoc = NextLocalAncestor(*lastDoc); + if (!lastDoc) + break; + + // 2.5. If |container|'s iframe fullscreen flag is set, break. + // TODO(foolip): Support the iframe fullscreen flag. + // https://crbug.com/644695 + + // 2.6. Append |container|'s node document to |docs|. + docs.push_back(lastDoc); + } + + // 3. Return |docs|. + return docs; +} + +// https://fullscreen.spec.whatwg.org/#run-the-fullscreen-rendering-steps +void FireEvent(const AtomicString& type, Element* element, Document* document) { + DCHECK(document); + DCHECK(element); + + // |Document::EnqueueAnimationFrameTask()| is used instead of a "list of + // pending fullscreen events", so only the body of the "run the fullscreen + // rendering steps" loop appears here: + + // 3.1. Let |target| be |element| if |element| is connected and its node + // document is |document|, and otherwise let |target| be |document|. + EventTarget* target = + element->isConnected() && &element->GetDocument() == document + ? static_cast<EventTarget*>(element) + : static_cast<EventTarget*>(document); + + // 3.2. Fire an event named |type|, with its bubbles and composed attributes + // set to true, at |target|. + Event* event = Event::CreateBubble(type); + event->SetComposed(true); + target->DispatchEvent(event); +} + +const AtomicString& AdjustEventType(const AtomicString& type, + Fullscreen::RequestType request_type) { + DCHECK(type == EventTypeNames::fullscreenchange || + type == EventTypeNames::fullscreenerror); + + if (request_type == Fullscreen::RequestType::kUnprefixed) + return type; + return type == EventTypeNames::fullscreenchange + ? EventTypeNames::webkitfullscreenchange + : EventTypeNames::webkitfullscreenerror; +} + +void EnqueueEvent(const AtomicString& type, + Element& element, + Document& document, + Fullscreen::RequestType request_type) { + const AtomicString& adjusted_type = AdjustEventType(type, request_type); + document.EnqueueAnimationFrameTask(WTF::Bind(FireEvent, adjusted_type, + WrapPersistent(&element), + WrapPersistent(&document))); } } // anonymous namespace @@ -266,6 +362,12 @@ return nullptr; } +size_t Fullscreen::FullscreenElementStackSizeFrom(Document& document) { + if (Fullscreen* found = FromIfExists(document)) + return found->fullscreen_element_stack_.size(); + return 0; +} + Element* Fullscreen::FullscreenElementForBindingFrom(TreeScope& scope) { Element* element = FullscreenElementFrom(scope.GetDocument()); if (!element || !RuntimeEnabledFeatures::FullscreenUnprefixedEnabled()) @@ -287,28 +389,6 @@ return scope.AdjustedElement(*element); } -Element* Fullscreen::CurrentFullScreenElementFrom(Document& document) { - if (Fullscreen* found = FromIfExists(document)) - return found->CurrentFullScreenElement(); - return nullptr; -} - -Element* Fullscreen::CurrentFullScreenElementForBindingFrom( - Document& document) { - Element* element = CurrentFullScreenElementFrom(document); - if (!element || !RuntimeEnabledFeatures::FullscreenUnprefixedEnabled()) - return element; - - // For Shadow DOM V0 compatibility: We allow returning an element in V0 shadow - // tree, even though it leaks the Shadow DOM. - if (element->IsInV0ShadowTree()) { - UseCounter::Count(document, - WebFeature::kDocumentFullscreenElementInV0Shadow); - return element; - } - return document.AdjustedElement(*element); -} - bool Fullscreen::IsInFullscreenElementStack(const Element& element) { const Fullscreen* found = FromIfExists(element.GetDocument()); if (!found) @@ -323,42 +403,49 @@ Fullscreen::Fullscreen(Document& document) : Supplement<Document>(document), ContextLifecycleObserver(&document), - full_screen_layout_object_(nullptr), - event_queue_timer_( - TaskRunnerHelper::Get(TaskType::kUnthrottled, &document), - this, - &Fullscreen::EventQueueTimerFired), - for_cross_process_descendant_(false) { + full_screen_layout_object_(nullptr) { document.SetHasFullscreenSupplement(); } Fullscreen::~Fullscreen() {} -inline Document* Fullscreen::GetDocument() { +Document* Fullscreen::GetDocument() { return ToDocument(LifecycleContext()); } void Fullscreen::ContextDestroyed(ExecutionContext*) { - event_queue_.clear(); - if (full_screen_layout_object_) full_screen_layout_object_->Destroy(); - current_full_screen_element_ = nullptr; + pending_requests_.clear(); fullscreen_element_stack_.clear(); } // https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen -void Fullscreen::RequestFullscreen(Element& element) { +void Fullscreen::RequestFullscreen(Element& pending) { // TODO(foolip): Make RequestType::Unprefixed the default when the unprefixed // API is enabled. https://crbug.com/383813 - RequestFullscreen(element, RequestType::kPrefixed, false); + RequestFullscreen(pending, RequestType::kPrefixed); } -void Fullscreen::RequestFullscreen(Element& element, - RequestType request_type, - bool for_cross_process_descendant) { - Document& document = element.GetDocument(); +void Fullscreen::RequestFullscreen(Element& pending, RequestType request_type) { + RequestFullscreenScope scope; + + // 1. Let |pending| be the context object. + + // 2. Let |pendingDoc| be |pending|'s node document. + Document& document = pending.GetDocument(); + + // 3. Let |promise| be a new promise. + // TODO(foolip): Promises. https://crbug.com/644637 + + // 4. If |pendingDoc| is not fully active, then reject |promise| with a + // TypeError exception and return |promise|. + if (!document.IsActive() || !document.GetFrame()) + return; + + bool for_cross_process_descendant = + request_type == RequestType::kPrefixedForCrossProcessDescendant; // Use counters only need to be incremented in the process of the actual // fullscreen element. @@ -372,249 +459,301 @@ } } - // Ignore this call if the document is not in a live frame. - if (!document.IsActive() || !document.GetFrame()) - return; + // 5. Let |error| be false. + bool error = false; - // If |element| is on top of |doc|'s fullscreen element stack, terminate these - // substeps. - if (&element == FullscreenElementFrom(document)) - return; + // 6. If any of the following conditions are false, then set |error| to true: + // + // OOPIF: If |RequestFullscreen()| was already called in a descendant frame + // and passed the checks, do not check again here. + if (!for_cross_process_descendant && + !RequestFullscreenConditionsMet(pending, document)) + error = true; - do { - // 1. If any of the following conditions are false, then terminate these - // steps and queue a task to fire an event named fullscreenerror with its - // bubbles attribute set to true on the context object's node document: + // 7. Return |promise|, and run the remaining steps in parallel. - // |element|'s namespace is the HTML namespace or |element| is an SVG - // svg or MathML math element. - // Note: MathML is not supported. - if (!element.IsHTMLElement() && !isSVGSVGElement(element)) - break; + // 8. If |error| is false: Resize |pendingDoc|'s top-level browsing context's + // document's viewport's dimensions to match the dimensions of the screen of + // the output device. Optionally display a message how the end user can + // revert this. + if (!error) { + if (From(document).pending_requests_.size()) { + UseCounter::Count(document, + WebFeature::kFullscreenRequestWithPendingElement); + } // TODO(foolip): In order to reinstate the hierarchy restrictions in the // spec, something has to prevent dialog elements from moving within top // layer. Either disallowing fullscreen for dialog elements entirely or just // preventing dialog elements from simultaneously being fullscreen and modal // are good candidates. See https://github.com/whatwg/fullscreen/pull/91 - if (isHTMLDialogElement(element)) { + if (isHTMLDialogElement(pending)) { UseCounter::Count(document, WebFeature::kRequestFullscreenForDialogElement); - if (element.IsInTopLayer()) { + if (pending.IsInTopLayer()) { UseCounter::Count( document, WebFeature::kRequestFullscreenForDialogElementInTopLayer); } } - // The fullscreen element ready check for |element| returns true. - if (!FullscreenElementReady(element)) - break; + From(document).pending_requests_.push_back( + std::make_pair(&pending, request_type)); + LocalFrame& frame = *document.GetFrame(); + frame.GetChromeClient().EnterFullscreen(frame); + } else { + // Note: Although we are past the "in parallel" point, it's OK to continue + // synchronously because when |error| is true, |ContinueRequestFullscreen()| + // will only queue a task and return. This is indistinguishable from, e.g., + // enqueueing a microtask to continue at step 9. + ContinueRequestFullscreen(document, pending, request_type, + true /* error */); + } +} - // Fullscreen is supported. - if (!FullscreenIsSupported(document)) - break; - - // This algorithm is allowed to request fullscreen. - // OOPIF: If |forCrossProcessDescendant| is true, requestFullscreen was - // already called on a descendant element in another process, and - // getting here means that it was already allowed to request fullscreen. - if (!for_cross_process_descendant && !AllowedToRequestFullscreen(document)) - break; - - // 2. Let doc be element's node document. (i.e. "this") - - // 3. Let docs be all doc's ancestor browsing context's documents (if any) - // and doc. - // - // For OOPIF scenarios, |docs| will only contain documents for local - // ancestors, and remote ancestors will be processed in their - // respective processes. This preserves the spec's event firing order - // for local ancestors, but not for remote ancestors. However, that - // difference shouldn't be observable in practice: a fullscreenchange - // event handler would need to postMessage a frame in another renderer - // process, where the message should be queued up and processed after - // the IPC that dispatches fullscreenchange. - HeapDeque<Member<Document>> docs; - for (Document* doc = &document; doc; doc = NextLocalAncestor(*doc)) - docs.push_front(doc); - - // 4. For each document in docs, run these substeps: - HeapDeque<Member<Document>>::iterator current = docs.begin(), - following = docs.begin(); - - do { - ++following; - - // 1. Let following document be the document after document in docs, or - // null if there is no such document. - Document* current_doc = *current; - Document* following_doc = following != docs.end() ? *following : nullptr; - - // 2. If following document is null, push context object on document's - // fullscreen element stack, and queue a task to fire an event named - // fullscreenchange with its bubbles attribute set to true on the - // document. - if (!following_doc) { - From(*current_doc).PushFullscreenElementStack(element, request_type); - From(document).EnqueueChangeEvent(*current_doc, request_type); - continue; - } - - // 3. Otherwise, if document's fullscreen element stack is either empty or - // its top element is not following document's browsing context container, - Element* top_element = FullscreenElementFrom(*current_doc); - HTMLFrameOwnerElement* following_owner = - FindContainerForDescendant(*current_doc, *following_doc); - if (!top_element || top_element != following_owner) { - // ...push following document's browsing context container on document's - // fullscreen element stack, and queue a task to fire an event named - // fullscreenchange with its bubbles attribute set to true on document. - From(*current_doc) - .PushFullscreenElementStack(*following_owner, request_type); - From(document).EnqueueChangeEvent(*current_doc, request_type); - continue; - } - - // 4. Otherwise, do nothing for this document. It stays the same. - } while (++current != docs.end()); - - From(document).for_cross_process_descendant_ = for_cross_process_descendant; - - // 5. Return, and run the remaining steps asynchronously. - // 6. Optionally, perform some animation. - if (From(document).pending_fullscreen_element_) { - UseCounter::Count(document, - WebFeature::kFullscreenRequestWithPendingElement); - } - From(document).pending_fullscreen_element_ = &element; - document.GetFrame()->GetChromeClient().EnterFullscreen( - *document.GetFrame()); - - // 7. Optionally, display a message indicating how the user can exit - // displaying the context object fullscreen. +void Fullscreen::DidEnterFullscreen() { + if (!GetDocument()) return; - } while (false); - From(document).EnqueueErrorEvent(element, request_type); + // We may be called synchronously from within + // |FullscreenController::EnterFullscreen()| if we were already fullscreen, + // but must still not synchronously change the fullscreen element. Instead + // enqueue a microtask to continue. + if (RequestFullscreenScope::RunningRequestFullscreen()) { + Microtask::EnqueueMicrotask( + WTF::Bind(&Fullscreen::DidEnterFullscreen, WrapPersistent(this))); + return; + } + + ElementStack requests; + requests.swap(pending_requests_); + for (const ElementStackEntry& request : requests) { + ContinueRequestFullscreen(*GetDocument(), *request.first, request.second, + false /* error */); + } +} + +void Fullscreen::ContinueRequestFullscreen(Document& document, + Element& pending, + RequestType request_type, + bool error) { + DCHECK(document.IsActive()); + DCHECK(document.GetFrame()); + + // 9. If any of the following conditions are false, then set |error| to true: + // * |pending|'s node document is |pendingDoc|. + // * The fullscreen element ready check for |pending| returns true. + if (pending.GetDocument() != document || !FullscreenElementReady(pending)) + error = true; + + // 10. If |error| is true: + if (error) { + // 10.1. Append (fullscreenerror, |pending|) to |pendingDoc|'s list of + // pending fullscreen events. + EnqueueEvent(EventTypeNames::fullscreenerror, pending, document, + request_type); + + // 10.2. Reject |promise| with a TypeError exception and terminate these + // steps. + return; + } + + // 11. Let |fullscreenElements| be an ordered set initially consisting of + // |pending|. + HeapVector<Member<Element>> fullscreen_elements; + fullscreen_elements.push_back(pending); + + // 12. While the first element in |fullscreenElements| is in a nested browsing + // context: append its browsing context container to |fullscreenElements|. + // + // OOPIF: |fullscreenElements| will only contain elements for local ancestors, + // and remote ancestors will be processed in their respective processes. This + // preserves the spec's event firing order for local ancestors, but not for + // remote ancestors. However, that difference shouldn't be observable in + // practice: a fullscreenchange event handler would need to postMessage a + // frame in another renderer process, where the message should be queued up + // and processed after the IPC that dispatches fullscreenchange. + for (Frame* frame = pending.GetDocument().GetFrame(); frame; + frame = frame->Tree().Parent()) { + if (!frame->Owner() || !frame->Owner()->IsLocal()) + continue; + Element* element = ToHTMLFrameOwnerElement(frame->Owner()); + fullscreen_elements.push_back(element); + } + + // 13. For each |element| in |fullscreenElements|: + for (Element* element : fullscreen_elements) { + // 13.1. Let |doc| be |element|'s node document. + Document& doc = element->GetDocument(); + + // 13.2. If |element| is |doc|'s fullscreen element, continue. + if (element == FullscreenElementFrom(doc)) + continue; + + // 13.3. If |element| is |pending| and |pending| is an iframe element, set + // |element|'s iframe fullscreen flag. + // TODO(foolip): Support the iframe fullscreen flag. + // https://crbug.com/644695 + + // 13.4. Fullscreen |element| within |doc|. + // TODO(foolip): Merge fullscreen element stack into top layer. + // https://crbug.com/627790 + From(doc).PushFullscreenElementStack(*element, request_type); + + // 13.5. Append (fullscreenchange, |element|) to |doc|'s list of pending + // fullscreen events. + EnqueueEvent(EventTypeNames::fullscreenchange, *element, doc, request_type); + } + + // 14. Resolve |promise| with undefined. } // https://fullscreen.spec.whatwg.org/#fully-exit-fullscreen void Fullscreen::FullyExitFullscreen(Document& document) { - // To fully exit fullscreen, run these steps: - - // 1. Let |doc| be the top-level browsing context's document. - // - // Since the top-level browsing context's document might be unavailable in - // OOPIF scenarios (i.e., when the top frame is remote), this actually uses - // the Document of the topmost local ancestor frame. Without OOPIF, this - // will be the top frame's document. With OOPIF, each renderer process for - // the current page will separately call fullyExitFullscreen to cover all - // local frames in each process. + // TODO(foolip): The spec used to have a first step saying "Let |doc| be the + // top-level browsing context's document" which was removed in + // https://github.com/whatwg/fullscreen/commit/3243119d027a8ff5b80998eb1f17f8eba148a346. + // Remove it here as well. Document& doc = TopmostLocalAncestor(document); - // 2. If |doc|'s fullscreen element stack is empty, terminate these steps. + // 1. If |document|'s fullscreen element is null, terminate these steps. if (!FullscreenElementFrom(doc)) return; - // 3. Remove elements from |doc|'s fullscreen element stack until only the top - // element is left. + // 2. Unfullscreen elements whose fullscreen flag is set, within + // |document|'s top layer, except for |document|'s fullscreen element. size_t stack_size = From(doc).fullscreen_element_stack_.size(); From(doc).fullscreen_element_stack_.erase(0, stack_size - 1); DCHECK_EQ(From(doc).fullscreen_element_stack_.size(), 1u); - // 4. Act as if the exitFullscreen() method was invoked on |doc|. + // 3. Exit fullscreen |document|. ExitFullscreen(doc); } // https://fullscreen.spec.whatwg.org/#exit-fullscreen -void Fullscreen::ExitFullscreen(Document& document) { - // The exitFullscreen() method must run these steps: +void Fullscreen::ExitFullscreen(Document& doc) { + // 1. Let |promise| be a new promise. + // TODO(foolip): Promises. https://crbug.com/644637 - // Ignore this call if the document is not in a live frame. - if (!document.IsActive() || !document.GetFrame()) + // 2. If |doc| is not fully active or |doc|'s fullscreen element is null, then + // reject |promise| with a TypeError exception and return |promise|. + if (!doc.IsActive() || !doc.GetFrame() || !FullscreenElementFrom(doc)) return; - // 1. Let doc be the context object. (i.e. "this") - // 2. If doc's fullscreen element stack is empty, terminate these steps. - if (!FullscreenElementFrom(document)) + // 3. Let |resize| be false. + bool resize = false; + + // 4. Let |docs| be the result of collecting documents to unfullscreen given + // |doc|. + HeapVector<Member<Document>> docs = CollectDocumentsToUnfullscreen(doc); + + // 5. Let |topLevelDoc| be |doc|'s top-level browsing context's active + // document. + // + // OOPIF: Let |topLevelDoc| be the topmost local ancestor instead. If the main + // frame is in another process, we will still fully exit fullscreen even + // though that's wrong if the main frame was in nested fullscreen. + // TODO(alexmos): Deal with nested fullscreen cases, see + // https://crbug.com/617369. + Document& top_level_doc = TopmostLocalAncestor(doc); + + // 6. If |topLevelDoc| is in |docs|, and it is a simple fullscreen document, + // then set |doc| to |topLevelDoc| and |resize| to true. + // + // Note: |doc| is not set here, but |doc| will be the topmost local ancestor + // in |Fullscreen::ContinueExitFullscreen| if |resize| is true. + if (!docs.IsEmpty() && docs.back() == &top_level_doc && + IsSimpleFullscreenDocument(top_level_doc)) { + resize = true; + } + + // 7. Return |promise|, and run the remaining steps in parallel. + + // 8. If |resize| is true, resize |doc|'s viewport to its "normal" dimensions. + if (resize) { + LocalFrame& frame = *doc.GetFrame(); + frame.GetChromeClient().ExitFullscreen(frame); + } else { + // Note: We are past the "in parallel" point, and |ContinueExitFullscreen()| + // will change script-observable state (document.fullscreenElement) + // synchronously, so we have to continue asynchronously. + Microtask::EnqueueMicrotask(WTF::Bind( + ContinueExitFullscreen, WrapWeakPersistent(&doc), false /* resize */)); + } +} + +void Fullscreen::DidExitFullscreen() { + ContinueExitFullscreen(GetDocument(), true /* resize */); +} + +void Fullscreen::ContinueExitFullscreen(Document* doc, bool resize) { + if (!doc || !doc->IsActive() || !doc->GetFrame()) return; - // 3. Let descendants be all the doc's descendant browsing context's documents - // with a non-empty fullscreen element stack (if any), ordered so that the - // child of the doc is last and the document furthest away from the doc is - // first. - HeapDeque<Member<Document>> descendants; - for (Frame* descendant = document.GetFrame()->Tree().TraverseNext(); - descendant; descendant = descendant->Tree().TraverseNext()) { + if (resize) { + // See comment for step 6. + DCHECK_EQ(nullptr, NextLocalAncestor(*doc)); + } + + // 9. If |doc|'s fullscreen element is null, then resolve |promise| with + // undefined and terminate these steps. + if (!FullscreenElementFrom(*doc)) + return; + + // 10. Let |exitDocs| be the result of collecting documents to unfullscreen + // given |doc|. + HeapVector<Member<Document>> exit_docs = CollectDocumentsToUnfullscreen(*doc); + + // 11. Let |descendantDocs| be an ordered set consisting of |doc|'s + // descendant browsing contexts' documents whose fullscreen element is + // non-null, if any, in tree order. + HeapVector<Member<Document>> descendant_docs; + for (Frame* descendant = doc->GetFrame()->Tree().FirstChild(); descendant; + descendant = descendant->Tree().TraverseNext(doc->GetFrame())) { if (!descendant->IsLocalFrame()) continue; DCHECK(ToLocalFrame(descendant)->GetDocument()); if (FullscreenElementFrom(*ToLocalFrame(descendant)->GetDocument())) - descendants.push_front(ToLocalFrame(descendant)->GetDocument()); + descendant_docs.push_back(ToLocalFrame(descendant)->GetDocument()); } - // 4. For each descendant in descendants, empty descendant's fullscreen - // element stack, and queue a task to fire an event named fullscreenchange - // with its bubbles attribute set to true on descendant. - for (auto& descendant : descendants) { - DCHECK(descendant); - RequestType request_type = - From(*descendant).fullscreen_element_stack_.back().second; - From(*descendant).ClearFullscreenElementStack(); - From(document).EnqueueChangeEvent(*descendant, request_type); - } + // 12. For each |exitDoc| in |exitDocs|: + for (Document* exit_doc : exit_docs) { + Fullscreen& fullscreen = From(*exit_doc); + ElementStack& stack = fullscreen.fullscreen_element_stack_; + DCHECK(!stack.IsEmpty()); - // 5. While doc is not null, run these substeps: - Element* new_top = nullptr; - for (Document* current_doc = &document; current_doc;) { - RequestType request_type = - From(*current_doc).fullscreen_element_stack_.back().second; + // 12.1. Append (fullscreenchange, |exitDoc|'s fullscreen element) to + // |exitDoc|'s list of pending fullscreen events. + EnqueueEvent(EventTypeNames::fullscreenchange, *stack.back().first, + *exit_doc, stack.back().second); - // 1. Pop the top element of doc's fullscreen element stack. - From(*current_doc).PopFullscreenElementStack(); - - // If doc's fullscreen element stack is non-empty and the element now at - // the top is either not in a document or its node document is not doc, - // repeat this substep. - new_top = FullscreenElementFrom(*current_doc); - if (new_top && - (!new_top->isConnected() || new_top->GetDocument() != current_doc)) - continue; - - // 2. Queue a task to fire an event named fullscreenchange with its bubbles - // attribute set to true on doc. - From(document).EnqueueChangeEvent(*current_doc, request_type); - - // 3. If doc's fullscreen element stack is empty and doc's browsing context - // has a browsing context container, set doc to that browsing context - // container's node document. - // - // OOPIF: If browsing context container's document is in another - // process, keep moving up the ancestor chain and looking for a - // browsing context container with a local document. - // TODO(alexmos): Deal with nested fullscreen cases, see - // https://crbug.com/617369. - if (!new_top) { - current_doc = NextLocalAncestor(*current_doc); - continue; + // 12.2. If |resize| is true, unfullscreen |exitDoc|. + // 12.3. Otherwise, unfullscreen |exitDoc|'s fullscreen element. + if (resize) { + while (!stack.IsEmpty()) + fullscreen.PopFullscreenElementStack(); + } else { + fullscreen.PopFullscreenElementStack(); } - - // 4. Otherwise, set doc to null. - current_doc = nullptr; } - // 6. Return, and run the remaining steps asynchronously. - // 7. Optionally, perform some animation. + // 13. For each |descendantDoc| in |descendantDocs|: + for (Document* descendant_doc : descendant_docs) { + Fullscreen& fullscreen = From(*descendant_doc); + ElementStack& stack = fullscreen.fullscreen_element_stack_; + DCHECK(!stack.IsEmpty()); - // Only exit fullscreen mode if the fullscreen element stack is empty. - if (!new_top) { - document.GetFrame()->GetChromeClient().ExitFullscreen(*document.GetFrame()); - return; + // 13.1. Append (fullscreenchange, |descendantDoc|'s fullscreen element) to + // |descendantDoc|'s list of pending fullscreen events. + EnqueueEvent(EventTypeNames::fullscreenchange, *stack.back().first, + *descendant_doc, stack.back().second); + + // 13.2. Unfullscreen |descendantDoc|. + while (!stack.IsEmpty()) + fullscreen.PopFullscreenElementStack(); } - // Otherwise, enter fullscreen for the fullscreen element stack's top element. - From(document).pending_fullscreen_element_ = new_top; - From(document).DidEnterFullscreen(); + // 14. Resolve |promise| with undefined. } // https://fullscreen.spec.whatwg.org/#dom-document-fullscreenenabled @@ -626,127 +765,6 @@ FullscreenIsSupported(document); } -void Fullscreen::DidEnterFullscreen() { - if (!GetDocument()->IsActive() || !GetDocument()->GetFrame()) - return; - - // Start the timer for events enqueued by |requestFullscreen()|. The hover - // state update is scheduled first so that it's done when the events fire. - GetDocument()->GetFrame()->GetEventHandler().ScheduleHoverStateUpdate(); - event_queue_timer_.StartOneShot(0, BLINK_FROM_HERE); - - Element* element = pending_fullscreen_element_.Release(); - if (!element) - return; - - if (current_full_screen_element_ == element) - return; - - if (!element->isConnected() || &element->GetDocument() != GetDocument()) { - // The element was removed or has moved to another document since the - // |requestFullscreen()| call. Exit fullscreen again to recover. - // TODO(foolip): Fire a fullscreenerror event. This is currently difficult - // because the fullscreenchange event has already been enqueued and possibly - // even fired. https://crbug.com/402376 - LocalFrame& frame = *GetDocument()->GetFrame(); - frame.GetChromeClient().ExitFullscreen(frame); - return; - } - - if (full_screen_layout_object_) - full_screen_layout_object_->UnwrapLayoutObject(); - - Element* previous_element = current_full_screen_element_; - current_full_screen_element_ = element; - - // Create a placeholder block for a the full-screen element, to keep the page - // from reflowing when the element is removed from the normal flow. Only do - // this for a LayoutBox, as only a box will have a frameRect. The placeholder - // will be created in setFullScreenLayoutObject() during layout. - LayoutObject* layout_object = current_full_screen_element_->GetLayoutObject(); - bool should_create_placeholder = layout_object && layout_object->IsBox(); - if (should_create_placeholder) { - saved_placeholder_frame_rect_ = ToLayoutBox(layout_object)->FrameRect(); - saved_placeholder_computed_style_ = - ComputedStyle::Clone(layout_object->StyleRef()); - } - - // TODO(alexmos): When |m_forCrossProcessDescendant| is true, some of - // this layout work has already been done in another process, so it should - // not be necessary to repeat it here. - if (current_full_screen_element_ != GetDocument()->documentElement()) { - LayoutFullScreen::WrapLayoutObject( - layout_object, layout_object ? layout_object->Parent() : 0, - GetDocument()); - } - - // When |m_forCrossProcessDescendant| is true, m_currentFullScreenElement - // corresponds to the HTMLFrameOwnerElement for the out-of-process iframe - // that contains the actual fullscreen element. Hence, it must also set - // the ContainsFullScreenElement flag (so that it gains the - // -webkit-full-screen-ancestor style). - if (for_cross_process_descendant_) { - DCHECK(current_full_screen_element_->IsFrameOwnerElement()); - DCHECK(ToHTMLFrameOwnerElement(current_full_screen_element_) - ->ContentFrame() - ->IsRemoteFrame()); - current_full_screen_element_->SetContainsFullScreenElement(true); - } - - current_full_screen_element_ - ->SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true); - - GetDocument()->GetStyleEngine().EnsureUAStyleForFullscreen(); - current_full_screen_element_->PseudoStateChanged( - CSSSelector::kPseudoFullScreen); - - // FIXME: This should not call updateStyleAndLayoutTree. - GetDocument()->UpdateStyleAndLayoutTree(); - - GetDocument()->GetFrame()->GetChromeClient().FullscreenElementChanged( - previous_element, element); -} - -void Fullscreen::DidExitFullscreen() { - if (!GetDocument()->IsActive() || !GetDocument()->GetFrame()) - return; - - // Start the timer for events enqueued by |exitFullscreen()|. The hover state - // update is scheduled first so that it's done when the events fire. - GetDocument()->GetFrame()->GetEventHandler().ScheduleHoverStateUpdate(); - event_queue_timer_.StartOneShot(0, BLINK_FROM_HERE); - - // If fullscreen was canceled by the browser, e.g. if the user pressed Esc, - // then |exitFullscreen()| was never called. Let |fullyExitFullscreen()| clear - // the fullscreen element stack and fire any events as necessary. - // TODO(foolip): Remove this when state changes and events are synchronized - // with animation frames. https://crbug.com/402376 - FullyExitFullscreen(*GetDocument()); - - if (!current_full_screen_element_) - return; - - if (for_cross_process_descendant_) - current_full_screen_element_->SetContainsFullScreenElement(false); - - current_full_screen_element_ - ->SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); - - if (full_screen_layout_object_) - LayoutFullScreenItem(full_screen_layout_object_).UnwrapLayoutObject(); - - GetDocument()->GetStyleEngine().EnsureUAStyleForFullscreen(); - current_full_screen_element_->PseudoStateChanged( - CSSSelector::kPseudoFullScreen); - Element* previous_element = current_full_screen_element_; - current_full_screen_element_ = nullptr; - - for_cross_process_descendant_ = false; - - GetDocument()->GetFrame()->GetChromeClient().FullscreenElementChanged( - previous_element, nullptr); -} - void Fullscreen::SetFullScreenLayoutObject(LayoutFullScreen* layout_object) { if (layout_object == full_screen_layout_object_) return; @@ -774,57 +792,10 @@ full_screen_layout_object_ = nullptr; } -void Fullscreen::EnqueueChangeEvent(Document& document, - RequestType request_type) { - Event* event; - if (request_type == RequestType::kUnprefixed) { - event = CreateEvent(EventTypeNames::fullscreenchange, document); - } else { - DCHECK(document.HasFullscreenSupplement()); - Fullscreen& fullscreen = From(document); - EventTarget* target = fullscreen.FullscreenElement(); - if (!target) - target = fullscreen.CurrentFullScreenElement(); - if (!target) - target = &document; - event = CreateEvent(EventTypeNames::webkitfullscreenchange, *target); - } - event_queue_.push_back(event); - // NOTE: The timer is started in didEnterFullscreen/didExitFullscreen. -} - -void Fullscreen::EnqueueErrorEvent(Element& element, RequestType request_type) { - Event* event; - if (request_type == RequestType::kUnprefixed) - event = CreateEvent(EventTypeNames::fullscreenerror, element.GetDocument()); - else - event = CreateEvent(EventTypeNames::webkitfullscreenerror, element); - event_queue_.push_back(event); - event_queue_timer_.StartOneShot(0, BLINK_FROM_HERE); -} - -void Fullscreen::EventQueueTimerFired(TimerBase*) { - HeapDeque<Member<Event>> event_queue; - event_queue_.Swap(event_queue); - - while (!event_queue.IsEmpty()) { - Event* event = event_queue.TakeFirst(); - Node* target = event->target()->ToNode(); - - // If the element was removed from our tree, also message the - // documentElement. - if (!target->isConnected() && GetDocument()->documentElement()) { - DCHECK(IsPrefixed(event->type())); - event_queue.push_back( - CreateEvent(event->type(), *GetDocument()->documentElement())); - } - - target->DispatchEvent(event); - } -} - void Fullscreen::ElementRemoved(Element& node) { - // |Fullscreen::ElementRemoved| is called for each removed element, so only + DCHECK_EQ(GetDocument(), &node.GetDocument()); + + // |Fullscreen::ElementRemoved()| is called for each removed element, so only // the body of the spec "removing steps" loop appears here: // 2.1. If |node| is its node document's fullscreen element, exit fullscreen @@ -845,36 +816,107 @@ // Note: |node| was not in the fullscreen element stack. } -void Fullscreen::ClearFullscreenElementStack() { - if (fullscreen_element_stack_.IsEmpty()) - return; - - fullscreen_element_stack_.clear(); - - SetNeedsPaintPropertyUpdate(GetDocument()); -} - void Fullscreen::PopFullscreenElementStack() { - if (fullscreen_element_stack_.IsEmpty()) - return; + DCHECK(!fullscreen_element_stack_.IsEmpty()); + Element* old_element = FullscreenElement(); fullscreen_element_stack_.pop_back(); - SetNeedsPaintPropertyUpdate(GetDocument()); + // Note: |requestType| is only used if |FullscreenElement()| is non-null. + RequestType request_type = fullscreen_element_stack_.IsEmpty() + ? RequestType::kUnprefixed + : fullscreen_element_stack_.back().second; + FullscreenElementChanged(old_element, FullscreenElement(), request_type); } void Fullscreen::PushFullscreenElementStack(Element& element, RequestType request_type) { + Element* old_element = FullscreenElement(); fullscreen_element_stack_.push_back(std::make_pair(&element, request_type)); - SetNeedsPaintPropertyUpdate(GetDocument()); + FullscreenElementChanged(old_element, &element, request_type); +} + +void Fullscreen::FullscreenElementChanged(Element* old_element, + Element* new_element, + RequestType new_request_type) { + DCHECK_NE(old_element, new_element); + + if (!GetDocument()) + return; + + GetDocument()->GetStyleEngine().EnsureUAStyleForFullscreen(); + + if (full_screen_layout_object_) + full_screen_layout_object_->UnwrapLayoutObject(); + DCHECK(!full_screen_layout_object_); + + if (old_element) { + DCHECK_NE(old_element, FullscreenElement()); + + old_element->PseudoStateChanged(CSSSelector::kPseudoFullScreen); + + old_element->SetContainsFullScreenElement(false); + old_element->SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries( + false); + } + + if (new_element) { + DCHECK_EQ(new_element, FullscreenElement()); + + new_element->PseudoStateChanged(CSSSelector::kPseudoFullScreen); + + // OOPIF: For RequestType::PrefixedForCrossProcessDescendant, |toElement| is + // the iframe element for the out-of-process frame that contains the + // fullscreen element. Hence, it must match :-webkit-full-screen-ancestor. + if (new_request_type == RequestType::kPrefixedForCrossProcessDescendant) { + DCHECK(isHTMLIFrameElement(new_element)); + new_element->SetContainsFullScreenElement(true); + } + new_element->SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries( + true); + + // Create a placeholder block for the fullscreen element, to keep the page + // from reflowing when the element is removed from the normal flow. Only do + // this for a LayoutBox, as only a box will have a frameRect. The + // placeholder will be created in setFullScreenLayoutObject() during layout. + LayoutObject* layout_object = new_element->GetLayoutObject(); + bool should_create_placeholder = layout_object && layout_object->IsBox(); + if (should_create_placeholder) { + saved_placeholder_frame_rect_ = ToLayoutBox(layout_object)->FrameRect(); + saved_placeholder_computed_style_ = + ComputedStyle::Clone(layout_object->StyleRef()); + } + + if (new_element != GetDocument()->documentElement()) { + LayoutFullScreen::WrapLayoutObject( + layout_object, layout_object ? layout_object->Parent() : 0, + GetDocument()); + } + } + + if (LocalFrame* frame = GetDocument()->GetFrame()) { + // TODO(foolip): Synchronize hover state changes with animation frames. + // https://crbug.com/668758 + frame->GetEventHandler().ScheduleHoverStateUpdate(); + frame->GetChromeClient().FullscreenElementChanged(old_element, new_element); + + if (RuntimeEnabledFeatures::SlimmingPaintInvalidationEnabled() && + !RuntimeEnabledFeatures::RootLayerScrollingEnabled()) { + // Fullscreen status affects scroll paint properties through + // LocalFrameView::UserInputScrollable(). + if (LocalFrameView* frame_view = frame->View()) + frame_view->SetNeedsPaintPropertyUpdate(); + } + } + + // TODO(foolip): This should not call |UpdateStyleAndLayoutTree()|. + GetDocument()->UpdateStyleAndLayoutTree(); } DEFINE_TRACE(Fullscreen) { - visitor->Trace(pending_fullscreen_element_); + visitor->Trace(pending_requests_); visitor->Trace(fullscreen_element_stack_); - visitor->Trace(current_full_screen_element_); - visitor->Trace(event_queue_); Supplement<Document>::Trace(visitor); ContextLifecycleObserver::Trace(visitor); }
diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.h b/third_party/WebKit/Source/core/dom/Fullscreen.h index 6dd19969..5ff12f0 100644 --- a/third_party/WebKit/Source/core/dom/Fullscreen.h +++ b/third_party/WebKit/Source/core/dom/Fullscreen.h
@@ -35,7 +35,6 @@ #include "core/dom/Document.h" #include "core/dom/Element.h" #include "platform/Supplementable.h" -#include "platform/Timer.h" #include "platform/geometry/LayoutRect.h" #include "platform/wtf/Deque.h" #include "platform/wtf/RefPtr.h" @@ -46,6 +45,10 @@ class ComputedStyle; class LayoutFullScreen; +// The Fullscreen class implements most of the Fullscreen API Standard, +// https://fullscreen.spec.whatwg.org/, especially its algorithms. It is a +// Document supplement as each document has some fullscreen state, and to +// actually enter and exit fullscreen it (indirectly) uses FullscreenController. class CORE_EXPORT Fullscreen final : public GarbageCollectedFinalized<Fullscreen>, public Supplement<Document>, @@ -59,9 +62,8 @@ static Fullscreen* FromIfExists(Document&); static Element* FullscreenElementFrom(Document&); static Element* FullscreenElementForBindingFrom(TreeScope&); - static Element* CurrentFullScreenElementFrom(Document&); - static Element* CurrentFullScreenElementForBindingFrom(Document&); - static bool IsCurrentFullScreenElement(const Element&); + static size_t FullscreenElementStackSizeFrom(Document&); + static bool IsFullscreenElement(const Element&); static bool IsInFullscreenElementStack(const Element&); enum class RequestType { @@ -70,25 +72,18 @@ // Element.webkitRequestFullscreen()/webkitRequestFullScreen() and // HTMLVideoElement.webkitEnterFullscreen()/webkitEnterFullScreen() kPrefixed, + // For WebRemoteFrameImpl to notify that a cross-process descendant frame + // has requested and is about to enter fullscreen. + kPrefixedForCrossProcessDescendant, }; static void RequestFullscreen(Element&); - - // |forCrossProcessDescendant| is used in OOPIF scenarios and is set to - // true when fullscreen is requested for an out-of-process descendant - // element. - static void RequestFullscreen(Element&, - RequestType, - bool for_cross_process_descendant = false); + static void RequestFullscreen(Element&, RequestType); static void FullyExitFullscreen(Document&); static void ExitFullscreen(Document&); static bool FullscreenEnabled(Document&); - // TODO(foolip): The fullscreen element stack is modified synchronously in - // requestFullscreen(), which is not per spec and means that - // |fullscreenElement()| is not always the same as - // |currentFullScreenElement()|, see https://crbug.com/402421. Element* FullscreenElement() const { return !fullscreen_element_stack_.IsEmpty() ? fullscreen_element_stack_.back().first.Get() @@ -108,20 +103,6 @@ void ElementRemoved(Element&); - // Returns true if the current fullscreen element stack corresponds to a - // container for an actual fullscreen element in a descendant - // out-of-process iframe. - bool ForCrossProcessDescendant() { return for_cross_process_descendant_; } - - // Mozilla API - // TODO(foolip): |currentFullScreenElement()| is a remnant from before the - // fullscreen element stack. It is still maintained separately from the - // stack and is is what the :-webkit-full-screen pseudo-class depends on. It - // should be removed, see https://crbug.com/402421. - Element* CurrentFullScreenElement() const { - return current_full_screen_element_.Get(); - } - // ContextLifecycleObserver: void ContextDestroyed(ExecutionContext*) override; @@ -134,33 +115,28 @@ Document* GetDocument(); + static void ContinueRequestFullscreen(Document&, + Element&, + RequestType, + bool error); + + static void ContinueExitFullscreen(Document*, bool resize); + void ClearFullscreenElementStack(); void PopFullscreenElementStack(); void PushFullscreenElementStack(Element&, RequestType); + void FullscreenElementChanged(Element* old_element, + Element* new_element, + RequestType new_request_type); - void EnqueueChangeEvent(Document&, RequestType); - void EnqueueErrorEvent(Element&, RequestType); - void EventQueueTimerFired(TimerBase*); + using ElementStackEntry = std::pair<Member<Element>, RequestType>; + using ElementStack = HeapVector<ElementStackEntry>; + ElementStack pending_requests_; + ElementStack fullscreen_element_stack_; - Member<Element> pending_fullscreen_element_; - HeapVector<std::pair<Member<Element>, RequestType>> fullscreen_element_stack_; - Member<Element> current_full_screen_element_; LayoutFullScreen* full_screen_layout_object_; - TaskRunnerTimer<Fullscreen> event_queue_timer_; - HeapDeque<Member<Event>> event_queue_; LayoutRect saved_placeholder_frame_rect_; RefPtr<ComputedStyle> saved_placeholder_computed_style_; - - // TODO(alexmos, dcheng): Currently, this assumes that if fullscreen was - // entered for an element in an out-of-process iframe, then it's not - // possible to re-enter fullscreen for a different element in this - // document, since that requires a user gesture, which can't be obtained - // since nothing in this document is visible, and since user gestures can't - // be forwarded across processes. However, the latter assumption could - // change if https://crbug.com/161068 is fixed so that cross-process - // postMessage can carry user gestures. If that happens, this should be - // moved to be part of |m_fullscreenElementStack|. - bool for_cross_process_descendant_; }; inline Fullscreen* Fullscreen::FromIfExists(Document& document) { @@ -169,9 +145,9 @@ return FromIfExistsSlow(document); } -inline bool Fullscreen::IsCurrentFullScreenElement(const Element& element) { +inline bool Fullscreen::IsFullscreenElement(const Element& element) { if (Fullscreen* found = FromIfExists(element.GetDocument())) - return found->CurrentFullScreenElement() == &element; + return found->FullscreenElement() == &element; return false; }
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp b/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp index 6f5d951..c1433466 100644 --- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp +++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
@@ -132,7 +132,7 @@ new_layout_object->SetStyle( &style); // setStyle() can depend on layoutObject() already being set. - if (Fullscreen::IsCurrentFullScreenElement(*node_)) { + if (Fullscreen::IsFullscreenElement(*node_)) { new_layout_object = LayoutFullScreen::WrapLayoutObject( new_layout_object, parent_layout_object, &node_->GetDocument()); if (!new_layout_object)
diff --git a/third_party/WebKit/Source/core/exported/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/core/exported/WebPluginContainerImpl.cpp index 90cfad4..0526bb6b 100644 --- a/third_party/WebKit/Source/core/exported/WebPluginContainerImpl.cpp +++ b/third_party/WebKit/Source/core/exported/WebPluginContainerImpl.cpp
@@ -317,7 +317,7 @@ } bool WebPluginContainerImpl::IsFullscreenElement() const { - return Fullscreen::IsCurrentFullScreenElement(*element_); + return Fullscreen::IsFullscreenElement(*element_); } void WebPluginContainerImpl::CancelFullscreen() {
diff --git a/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp index c77d0e9..e10629b 100644 --- a/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp +++ b/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp
@@ -342,24 +342,21 @@ HTMLFrameOwnerElement* owner_element = ToHTMLFrameOwnerElement(GetFrame()->Owner()); - // Call requestFullscreen() on |ownerElement| to make it the provisional - // fullscreen element in FullscreenController, and to prepare - // fullscreenchange events that will need to fire on it and its (local) - // ancestors. The events will be triggered if/when fullscreen is entered. + // Call |requestFullscreen()| on |ownerElement| to make it the pending + // fullscreen element in anticipation of the coming |didEnterFullscreen()| + // call. // - // Passing |forCrossProcessAncestor| to requestFullscreen is necessary - // because: - // - |ownerElement| will need :-webkit-full-screen-ancestor style in - // addition to :-webkit-full-screen. - // - there's no need to resend the ToggleFullscreen IPC to the browser - // process. + // PrefixedForCrossProcessDescendant is necessary because: + // - The fullscreen element ready check and other checks should be bypassed. + // - |ownerElement| will need :-webkit-full-screen-ancestor style in addition + // to :-webkit-full-screen. // // TODO(alexmos): currently, this assumes prefixed requests, but in the // future, this should plumb in information about which request type // (prefixed or unprefixed) to use for firing fullscreen events. - Fullscreen::RequestFullscreen(*owner_element, - Fullscreen::RequestType::kPrefixed, - true /* forCrossProcessAncestor */); + Fullscreen::RequestFullscreen( + *owner_element, + Fullscreen::RequestType::kPrefixedForCrossProcessDescendant); } void WebRemoteFrameImpl::SetHasReceivedUserGesture() {
diff --git a/third_party/WebKit/Source/core/exported/WebViewBase.h b/third_party/WebKit/Source/core/exported/WebViewBase.h index 8e1492fc..2d0d243 100644 --- a/third_party/WebKit/Source/core/exported/WebViewBase.h +++ b/third_party/WebKit/Source/core/exported/WebViewBase.h
@@ -149,7 +149,8 @@ virtual void EnterFullscreen(LocalFrame&) = 0; virtual void ExitFullscreen(LocalFrame&) = 0; - virtual void FullscreenElementChanged(Element*, Element*) = 0; + virtual void FullscreenElementChanged(Element* old_element, + Element* new_element) = 0; virtual bool HasOpenedPopup() const = 0;
diff --git a/third_party/WebKit/Source/core/frame/FullscreenController.cpp b/third_party/WebKit/Source/core/frame/FullscreenController.cpp index faa3326..bac937c 100644 --- a/third_party/WebKit/Source/core/frame/FullscreenController.cpp +++ b/third_party/WebKit/Source/core/frame/FullscreenController.cpp
@@ -66,7 +66,7 @@ void FullscreenController::DidEnterFullscreen() { // |Browser::EnterFullscreenModeForTab()| can enter fullscreen without going - // through |Fullscreen::requestFullscreen()|, in which case there will be no + // through |Fullscreen::RequestFullscreen()|, in which case there will be no // fullscreen element. Do nothing. if (state_ != State::kEnteringFullscreen) return; @@ -89,6 +89,9 @@ fullscreen->DidEnterFullscreen(); } } + + // TODO(foolip): If the top level browsing context (main frame) ends up with + // no fullscreen element, exit fullscreen again to recover. } void FullscreenController::DidExitFullscreen() { @@ -101,38 +104,37 @@ UpdatePageScaleConstraints(true); - // Set |m_state| so that any |exitFullscreen()| calls from within - // |Fullscreen::didExitFullscreen()| do not call - // |WebFrameClient::exitFullscreen()| again. - // TODO(foolip): Remove this when state changes and events are synchronized - // with animation frames. https://crbug.com/402376 - state_ = State::kExitingFullscreen; - - // Notify all local frames that we have exited fullscreen. - // TODO(foolip): This should only need to notify the topmost local roots. That - // doesn't currently work because |Fullscreen::m_currentFullScreenElement| - // isn't set for the topmost document when an iframe goes fullscreen, but can - // be done once |m_currentFullScreenElement| is gone and all state is in the - // fullscreen element stack. https://crbug.com/402421 - for (Frame* frame = web_view_base_->GetPage()->MainFrame(); frame; - frame = frame->Tree().TraverseNext()) { - if (!frame->IsLocalFrame()) - continue; - if (Document* document = ToLocalFrame(frame)->GetDocument()) { - if (Fullscreen* fullscreen = Fullscreen::FromIfExists(*document)) - fullscreen->DidExitFullscreen(); - } - } - // We need to wait until style and layout are updated in order to properly // restore scroll offsets since content may not be overflowing in the same way // until they are. state_ = State::kNeedsScrollAndScaleRestore; + + // Notify the topmost local frames that we have exited fullscreen. + // |Fullscreen::DidExitFullscreen()| will take care of descendant frames. + for (Frame* frame = web_view_base_->GetPage()->MainFrame(); frame;) { + Frame* next_frame = frame->Tree().TraverseNext(); + + if (frame->IsRemoteFrame()) { + frame = next_frame; + continue; + } + + DCHECK(frame->IsLocalRoot()); + if (Document* document = ToLocalFrame(frame)->GetDocument()) { + if (Fullscreen* fullscreen = Fullscreen::FromIfExists(*document)) + fullscreen->DidExitFullscreen(); + } + + // Skip over all descendant frames. + while (next_frame && next_frame->Tree().IsDescendantOf(frame)) + next_frame = next_frame->Tree().TraverseNext(); + frame = next_frame; + } } void FullscreenController::EnterFullscreen(LocalFrame& frame) { // If already fullscreen or exiting fullscreen, synchronously call - // |didEnterFullscreen()|. When exiting, the coming |didExitFullscren()| call + // |DidEnterFullscreen()|. When exiting, the coming |DidExitFullscreen()| call // will again notify all frames. if (state_ == State::kFullscreen || state_ == State::kExitingFullscreen) { State old_state = state_; @@ -142,7 +144,7 @@ return; } - // We need to store these values here rather than in |didEnterFullscreen()| + // We need to store these values here rather than in |DidEnterFullscreen()| // since by the time the latter is called, a Resize has already occured, // clamping the scroll offset. Don't save values if we're still waiting to // restore a previous set. This can happen if we exit and quickly reenter @@ -184,19 +186,19 @@ state_ = State::kExitingFullscreen; } -void FullscreenController::FullscreenElementChanged(Element* from_element, - Element* to_element) { - DCHECK_NE(from_element, to_element); +void FullscreenController::FullscreenElementChanged(Element* old_element, + Element* new_element) { + DCHECK_NE(old_element, new_element); // We only override the WebView's background color for overlay fullscreen // video elements, so have to restore the override when the element changes. RestoreBackgroundColorOverride(); - if (to_element) { - DCHECK(Fullscreen::IsCurrentFullScreenElement(*to_element)); + if (new_element) { + DCHECK(Fullscreen::IsFullscreenElement(*new_element)); - if (isHTMLVideoElement(*to_element)) { - HTMLVideoElement& video_element = toHTMLVideoElement(*to_element); + if (isHTMLVideoElement(*new_element)) { + HTMLVideoElement& video_element = toHTMLVideoElement(*new_element); video_element.DidEnterFullscreen(); // If the video uses overlay fullscreen mode, make the background @@ -206,11 +208,11 @@ } } - if (from_element) { - DCHECK(!Fullscreen::IsCurrentFullScreenElement(*from_element)); + if (old_element) { + DCHECK(!Fullscreen::IsFullscreenElement(*old_element)); - if (isHTMLVideoElement(*from_element)) { - HTMLVideoElement& video_element = toHTMLVideoElement(*from_element); + if (isHTMLVideoElement(*old_element)) { + HTMLVideoElement& video_element = toHTMLVideoElement(*old_element); video_element.DidExitFullscreen(); } } @@ -264,7 +266,7 @@ } web_view_base_->SetVisualViewportOffset(initial_visual_viewport_offset_); // Background color override was already restored when - // fullscreenElementChanged([..], nullptr) was called while exiting. + // FullscreenElementChanged([..], nullptr) was called while exiting. state_ = State::kInitial; } @@ -279,7 +281,7 @@ fullscreen_constraints); web_view_base_->GetPageScaleConstraintsSet().ComputeFinalConstraints(); - // Although we called |computedFinalConstraints()| above, the "final" + // Although we called |ComputeFinalConstraints()| above, the "final" // constraints are not actually final. They are still subject to scale factor // clamping by contents size. Normally they should be dirtied due to contents // size mutation after layout, however the contents size is not guaranteed to
diff --git a/third_party/WebKit/Source/core/frame/FullscreenController.h b/third_party/WebKit/Source/core/frame/FullscreenController.h index 2de17f99..95da1fc 100644 --- a/third_party/WebKit/Source/core/frame/FullscreenController.h +++ b/third_party/WebKit/Source/core/frame/FullscreenController.h
@@ -44,6 +44,9 @@ class LocalFrame; class WebViewBase; +// FullscreenController is a per-WebView class that manages the transition into +// and out of fullscreen, including restoring scroll offset and scale after +// exiting fullscreen. It is (indirectly) used by the Fullscreen class. class CORE_EXPORT FullscreenController { public: static std::unique_ptr<FullscreenController> Create(WebViewBase*); @@ -61,7 +64,7 @@ // Called by Fullscreen (via ChromeClient) to notify that the fullscreen // element has changed. - void FullscreenElementChanged(Element*, Element*); + void FullscreenElementChanged(Element* old_element, Element* new_element); bool IsFullscreenOrTransitioning() const { return state_ != State::kInitial; } @@ -79,12 +82,12 @@ WebViewBase* web_view_base_; // State is used to avoid unnecessary enter/exit requests, and to restore the - // m_initial* after the first layout upon exiting fullscreen. Typically, the + // initial*_ after the first layout upon exiting fullscreen. Typically, the // state goes through every state from Initial to NeedsScrollAndScaleRestore // and then back to Initial, but the are two exceptions: - // 1. didExitFullscreen() can transition from any non-Initial state to + // 1. DidExitFullscreen() can transition from any non-Initial state to // NeedsScrollAndScaleRestore, in case of a browser-intiated exit. - // 2. enterFullscreen() can transition from NeedsScrollAndScaleRestore to + // 2. EnterFullscreen() can transition from NeedsScrollAndScaleRestore to // EnteringFullscreen, in case of a quick exit+enter. enum class State { kInitial,
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp index ad82df4da..06633f0ff 100644 --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3479,7 +3479,7 @@ } bool HTMLMediaElement::IsFullscreen() const { - return Fullscreen::IsCurrentFullScreenElement(*this); + return Fullscreen::IsFullscreenElement(*this); } void HTMLMediaElement::DidEnterFullscreen() {
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp index 554e9e8..32ac659 100644 --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
@@ -256,7 +256,7 @@ histogram.Count(kVideoPersistenceControlsTypeCustom); Element* fullscreen_element = - Fullscreen::CurrentFullScreenElementFrom(GetDocument()); + Fullscreen::FullscreenElementFrom(GetDocument()); // Only set the video in persistent mode if it is not using native controls // and is currently fullscreen. if (!fullscreen_element || IsFullscreen()) @@ -280,7 +280,7 @@ PseudoStateChanged(CSSSelector::kPseudoVideoPersistent); Element* fullscreen_element = - Fullscreen::CurrentFullScreenElementFrom(GetDocument()); + Fullscreen::FullscreenElementFrom(GetDocument()); // If the page is no longer fullscreen, the full tree will have to be // traversed to make sure things are cleaned up. for (Element* element = this; element && element != fullscreen_element;
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElementPersistentTest.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElementPersistentTest.cpp index d3be4b6b..478cb9d 100644 --- a/third_party/WebKit/Source/core/html/HTMLVideoElementPersistentTest.cpp +++ b/third_party/WebKit/Source/core/html/HTMLVideoElementPersistentTest.cpp
@@ -56,7 +56,7 @@ } Element* FullscreenElement() { - return Fullscreen::CurrentFullScreenElementFrom(GetDocument()); + return Fullscreen::FullscreenElementFrom(GetDocument()); } MockChromeClient& GetMockChromeClient() { return *chrome_client_; }
diff --git a/third_party/WebKit/Source/core/html/media/MediaCustomControlsFullscreenDetector.cpp b/third_party/WebKit/Source/core/html/media/MediaCustomControlsFullscreenDetector.cpp index 2d6cc0a..5abe2d1 100644 --- a/third_party/WebKit/Source/core/html/media/MediaCustomControlsFullscreenDetector.cpp +++ b/third_party/WebKit/Source/core/html/media/MediaCustomControlsFullscreenDetector.cpp
@@ -144,7 +144,7 @@ bool MediaCustomControlsFullscreenDetector::IsVideoOrParentFullscreen() { Element* fullscreen_element = - Fullscreen::CurrentFullScreenElementFrom(VideoElement().GetDocument()); + Fullscreen::FullscreenElementFrom(VideoElement().GetDocument()); if (!fullscreen_element) return false;
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp index 1b0e7390..63891ab 100644 --- a/third_party/WebKit/Source/core/input/EventHandler.cpp +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -238,6 +238,7 @@ scroll_manager_->Clear(); gesture_manager_->Clear(); mouse_event_manager_->Clear(); + mouse_wheel_event_manager_->Clear(); last_deferred_tap_element_ = nullptr; event_handler_will_reset_capturing_mouse_events_node_ = false; }
diff --git a/third_party/WebKit/Source/core/input/MouseWheelEventManager.cpp b/third_party/WebKit/Source/core/input/MouseWheelEventManager.cpp index e830907..6a8a308 100644 --- a/third_party/WebKit/Source/core/input/MouseWheelEventManager.cpp +++ b/third_party/WebKit/Source/core/input/MouseWheelEventManager.cpp
@@ -18,37 +18,100 @@ namespace blink { MouseWheelEventManager::MouseWheelEventManager(LocalFrame& frame, ScrollManager& scroll_manager) - : frame_(frame), scroll_manager_(scroll_manager) {} + : frame_(frame), wheel_target_(nullptr), scroll_manager_(scroll_manager) {} DEFINE_TRACE(MouseWheelEventManager) { visitor->Trace(frame_); + visitor->Trace(wheel_target_); visitor->Trace(scroll_manager_); } +void MouseWheelEventManager::Clear() { + wheel_target_ = nullptr; +} + WebInputEventResult MouseWheelEventManager::HandleWheelEvent( const WebMouseWheelEvent& event) { -#if OS(MACOSX) - // Filter Mac OS specific phases, usually with a zero-delta. - // https://crbug.com/553732 - // TODO(chongz): EventSender sends events with - // |WebMouseWheelEvent::PhaseNone|, - // but it shouldn't. - const int kWheelEventPhaseNoEventMask = WebMouseWheelEvent::kPhaseEnded | - WebMouseWheelEvent::kPhaseCancelled | - WebMouseWheelEvent::kPhaseMayBegin; - if ((event.phase & kWheelEventPhaseNoEventMask) || - (event.momentum_phase & kWheelEventPhaseNoEventMask)) - return WebInputEventResult::kNotHandled; -#endif - Document* doc = frame_->GetDocument(); + bool wheel_scroll_latching = + RuntimeEnabledFeatures::TouchpadAndWheelScrollLatchingEnabled(); - if (doc->GetLayoutViewItem().IsNull()) + Document* doc = frame_->GetDocument(); + if (!doc || doc->GetLayoutViewItem().IsNull()) return WebInputEventResult::kNotHandled; LocalFrameView* view = frame_->View(); if (!view) return WebInputEventResult::kNotHandled; + if (wheel_scroll_latching) { + const int kWheelEventPhaseEndedEventMask = + WebMouseWheelEvent::kPhaseEnded | WebMouseWheelEvent::kPhaseCancelled; + const int kWheelEventPhaseNoEventMask = + kWheelEventPhaseEndedEventMask | WebMouseWheelEvent::kPhaseMayBegin; + + if ((event.phase & kWheelEventPhaseEndedEventMask) || + (event.momentum_phase & kWheelEventPhaseEndedEventMask)) { + wheel_target_ = nullptr; + } + + if ((event.phase & kWheelEventPhaseNoEventMask) || + (event.momentum_phase & kWheelEventPhaseNoEventMask)) { + // Filter wheel events with zero deltas and reset the wheel_target_ node. + DCHECK(!event.delta_x && !event.delta_y); + return WebInputEventResult::kNotHandled; + } + + if (event.phase == WebMouseWheelEvent::kPhaseBegan) { + // Find and save the wheel_target_, this target will be used for the rest + // of the current scrolling sequence. + DCHECK(!wheel_target_); + wheel_target_ = FindTargetNode(event, doc, view); + } + } else { // !wheel_scroll_latching, wheel_target_ will be updated for each + // wheel event. +#if OS(MACOSX) + // Filter Mac OS specific phases, usually with a zero-delta. + // https://crbug.com/553732 + // TODO(chongz): EventSender sends events with + // |WebMouseWheelEvent::PhaseNone|, + // but it shouldn't. + const int kWheelEventPhaseNoEventMask = + WebMouseWheelEvent::kPhaseEnded | WebMouseWheelEvent::kPhaseCancelled | + WebMouseWheelEvent::kPhaseMayBegin; + if ((event.phase & kWheelEventPhaseNoEventMask) || + (event.momentum_phase & kWheelEventPhaseNoEventMask)) + return WebInputEventResult::kNotHandled; +#endif + + wheel_target_ = FindTargetNode(event, doc, view); + } + + LocalFrame* subframe = + EventHandlingUtil::SubframeForTargetNode(wheel_target_.Get()); + if (subframe) { + WebInputEventResult result = + subframe->GetEventHandler().HandleWheelEvent(event); + if (result != WebInputEventResult::kNotHandled) + scroll_manager_->SetFrameWasScrolledByUser(); + return result; + } + + if (wheel_target_) { + WheelEvent* dom_event = + WheelEvent::Create(event, wheel_target_->GetDocument().domWindow()); + DispatchEventResult dom_event_result = + wheel_target_->DispatchEvent(dom_event); + if (dom_event_result != DispatchEventResult::kNotCanceled) + return EventHandlingUtil::ToWebInputEventResult(dom_event_result); + } + + return WebInputEventResult::kNotHandled; +} + +Node* MouseWheelEventManager::FindTargetNode(const WebMouseWheelEvent& event, + const Document* doc, + const LocalFrameView* view) { + DCHECK(doc && !doc->GetLayoutViewItem().IsNull() && view); LayoutPoint v_point = view->RootFrameToContents(FlooredIntPoint(event.PositionInRootFrame())); @@ -65,24 +128,7 @@ if (!node && result.GetScrollbar()) node = doc->documentElement(); - LocalFrame* subframe = EventHandlingUtil::SubframeForTargetNode(node); - if (subframe) { - WebInputEventResult result = - subframe->GetEventHandler().HandleWheelEvent(event); - if (result != WebInputEventResult::kNotHandled) - scroll_manager_->SetFrameWasScrolledByUser(); - return result; - } - - if (node) { - WheelEvent* dom_event = - WheelEvent::Create(event, node->GetDocument().domWindow()); - DispatchEventResult dom_event_result = node->DispatchEvent(dom_event); - if (dom_event_result != DispatchEventResult::kNotCanceled) - return EventHandlingUtil::ToWebInputEventResult(dom_event_result); - } - - return WebInputEventResult::kNotHandled; + return node; } } // namespace blink
diff --git a/third_party/WebKit/Source/core/input/MouseWheelEventManager.h b/third_party/WebKit/Source/core/input/MouseWheelEventManager.h index ecf2e5ae..809ed02 100644 --- a/third_party/WebKit/Source/core/input/MouseWheelEventManager.h +++ b/third_party/WebKit/Source/core/input/MouseWheelEventManager.h
@@ -11,7 +11,10 @@ namespace blink { +class Document; class LocalFrame; +class LocalFrameView; +class Node; class ScrollManager; class WebMouseWheelEvent; @@ -23,10 +26,17 @@ explicit MouseWheelEventManager(LocalFrame&, ScrollManager&); DECLARE_TRACE(); + void Clear(); + WebInputEventResult HandleWheelEvent(const WebMouseWheelEvent&); private: + Node* FindTargetNode(const WebMouseWheelEvent&, + const Document*, + const LocalFrameView*); + const Member<LocalFrame> frame_; + Member<Node> wheel_target_; Member<ScrollManager> scroll_manager_; };
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp index 8144726..a7cfa23 100644 --- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -409,9 +409,9 @@ // not its parent. Since the splitting logic expects |this| to be the parent, // set |beforeChild| to be the LayoutFullScreen. if (Fullscreen* fullscreen = Fullscreen::FromIfExists(GetDocument())) { - const Element* full_screen_element = fullscreen->CurrentFullScreenElement(); - if (full_screen_element && before_child && - before_child->GetNode() == full_screen_element) + const Element* fullscreen_element = fullscreen->FullscreenElement(); + if (fullscreen_element && before_child && + before_child->GetNode() == fullscreen_element) before_child = fullscreen->FullScreenLayoutObject(); }
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp index f9031b19..aec7679 100644 --- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp +++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -171,11 +171,6 @@ return nullptr; fullscreen_element = Fullscreen::FullscreenElementFrom(*content_document); } - // Get the current fullscreen element from the document. - // TODO(foolip): When |currentFullScreenElementFrom| is removed, this will - // become a no-op and can be removed. https://crbug.com/402421 - fullscreen_element = - Fullscreen::CurrentFullScreenElementFrom(*content_document); if (!isHTMLVideoElement(fullscreen_element)) return nullptr; LayoutObject* layout_object = fullscreen_element->GetLayoutObject();
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.h b/third_party/WebKit/Source/core/page/ChromeClient.h index 1b1ecbd0..b291a9d 100644 --- a/third_party/WebKit/Source/core/page/ChromeClient.h +++ b/third_party/WebKit/Source/core/page/ChromeClient.h
@@ -253,7 +253,8 @@ virtual void EnterFullscreen(LocalFrame&) {} virtual void ExitFullscreen(LocalFrame&) {} - virtual void FullscreenElementChanged(Element*, Element*) {} + virtual void FullscreenElementChanged(Element* old_element, + Element* new_element) {} virtual void ClearCompositedSelection(LocalFrame*) {} virtual void UpdateCompositedSelection(LocalFrame*,
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp index c52d572..3a543dd 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -200,7 +200,7 @@ new ObjectVectorAttributeSetter(AXObjectVectorAttribute::kAriaFlowTo)); ax_sparse_attribute_setter_map.Set( aria_detailsAttr, - new ObjectVectorAttributeSetter(AXObjectVectorAttribute::kAriaDetails)); + new ObjectAttributeSetter(AXObjectAttribute::kAriaDetails)); ax_sparse_attribute_setter_map.Set( aria_errormessageAttr, new ObjectAttributeSetter(AXObjectAttribute::kAriaErrorMessage));
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp index b814e741..f0db96ae 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -246,8 +246,8 @@ AXObjectAttribute::kAriaErrorMessage); STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaControls, AXObjectVectorAttribute::kAriaControls); -STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaDetails, - AXObjectVectorAttribute::kAriaDetails); +STATIC_ASSERT_ENUM(WebAXObjectAttribute::kAriaDetails, + AXObjectAttribute::kAriaDetails); STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaFlowTo, AXObjectVectorAttribute::kAriaFlowTo); #undef STATIC_ASSERT_ENUM
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.h b/third_party/WebKit/Source/modules/accessibility/AXObject.h index 5d37161..f8cd011e 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXObject.h +++ b/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -246,12 +246,12 @@ enum class AXObjectAttribute { kAriaActiveDescendant, + kAriaDetails, kAriaErrorMessage, }; enum class AXObjectVectorAttribute { kAriaControls, - kAriaDetails, kAriaFlowTo, };
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp index 7c40c69..616a7bc 100644 --- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp +++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -355,6 +355,11 @@ CreateProperty(AXRelationshipAttributesEnum::Activedescendant, CreateRelatedNodeListValue(object))); break; + case AXObjectAttribute::kAriaDetails: + properties_.addItem( + CreateProperty(AXRelationshipAttributesEnum::Details, + CreateRelatedNodeListValue(object))); + break; case AXObjectAttribute::kAriaErrorMessage: properties_.addItem( CreateProperty(AXRelationshipAttributesEnum::Errormessage, @@ -371,11 +376,6 @@ AXRelationshipAttributesEnum::Controls, objects, aria_controlsAttr, *ax_object_)); break; - case AXObjectVectorAttribute::kAriaDetails: - properties_.addItem(CreateRelatedNodeListProperty( - AXRelationshipAttributesEnum::Details, objects, aria_controlsAttr, - *ax_object_)); - break; case AXObjectVectorAttribute::kAriaFlowTo: properties_.addItem(CreateRelatedNodeListProperty( AXRelationshipAttributesEnum::Flowto, objects, aria_flowtoAttr,
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp index b0115cc..6f2ea557 100644 --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -490,19 +490,29 @@ // <canvas> element. element_font_description.SetComputedSize( element_font_description.SpecifiedSize()); + element_font_description.SetAdjustedSize( + element_font_description.SpecifiedSize()); + font_style->SetFontDescription(element_font_description); font_style->GetFont().Update(font_style->GetFont().GetFontSelector()); canvas()->GetDocument().EnsureStyleResolver().ComputeFont( font_style.Get(), *parsed_style); - fonts_resolved_using_current_style_.insert(new_font, - font_style->GetFont()); + + // We need to reset Computed and Adjusted size so we skip zoom and + // minimum font size. + FontDescription final_description( + font_style->GetFont().GetFontDescription()); + final_description.SetComputedSize(final_description.SpecifiedSize()); + final_description.SetAdjustedSize(final_description.SpecifiedSize()); + Font final_font(final_description); + + fonts_resolved_using_current_style_.insert(new_font, final_font); DCHECK(!font_lru_list_.Contains(new_font)); font_lru_list_.insert(new_font); PruneLocalFontCache(canvas_font_cache->HardMaxFonts()); // hard limit should_prune_local_font_cache_ = true; // apply soft limit ModifiableState().SetFont( - font_style->GetFont(), - canvas()->GetDocument().GetStyleEngine().FontSelector()); + final_font, canvas()->GetDocument().GetStyleEngine().FontSelector()); } } else { Font resolved_font;
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp index 22bb5ed..f26a4d3 100644 --- a/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp +++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
@@ -63,6 +63,18 @@ MOCK_METHOD1(LockOrientation, void(WebScreenOrientationLockType)); }; +void DidEnterFullscreen(Document* document) { + DCHECK(document); + Fullscreen::From(*document).DidEnterFullscreen(); + document->ServiceScriptedAnimations(WTF::MonotonicallyIncreasingTime()); +} + +void DidExitFullscreen(Document* document) { + DCHECK(document); + Fullscreen::From(*document).DidExitFullscreen(); + document->ServiceScriptedAnimations(WTF::MonotonicallyIncreasingTime()); +} + class MockChromeClient final : public EmptyChromeClient { public: // ChromeClient overrides: @@ -71,11 +83,17 @@ ScreenOrientationControllerImpl::ProvideTo(frame, &web_screen_orientation_client_); } + // The real ChromeClient::EnterFullscreen/ExitFullscreen implementation is + // async due to IPC, emulate that by posting tasks: void EnterFullscreen(LocalFrame& frame) override { - Fullscreen::From(*frame.GetDocument()).DidEnterFullscreen(); + Platform::Current()->CurrentThread()->GetWebTaskRunner()->PostTask( + BLINK_FROM_HERE, + WTF::Bind(DidEnterFullscreen, WrapPersistent(frame.GetDocument()))); } void ExitFullscreen(LocalFrame& frame) override { - Fullscreen::From(*frame.GetDocument()).DidExitFullscreen(); + Platform::Current()->CurrentThread()->GetWebTaskRunner()->PostTask( + BLINK_FROM_HERE, + WTF::Bind(DidExitFullscreen, WrapPersistent(frame.GetDocument()))); } MOCK_CONST_METHOD0(GetScreenInfo, WebScreenInfo()); @@ -153,15 +171,12 @@ void SimulateEnterFullscreen() { UserGestureIndicator gesture(UserGestureToken::Create(&GetDocument())); - Fullscreen::RequestFullscreen(Video()); - Fullscreen::From(GetDocument()).DidEnterFullscreen(); testing::RunPendingTasks(); } void SimulateExitFullscreen() { Fullscreen::ExitFullscreen(GetDocument()); - Fullscreen::From(GetDocument()).DidExitFullscreen(); testing::RunPendingTasks(); }
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp index cc9ab79..1e0a6f9 100644 --- a/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp +++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp
@@ -141,7 +141,7 @@ // Don't enter/exit fullscreen if some other element is fullscreen. Element* fullscreen_element = - Fullscreen::CurrentFullScreenElementFrom(video_element_->GetDocument()); + Fullscreen::FullscreenElementFrom(video_element_->GetDocument()); if (fullscreen_element && fullscreen_element != video_element_) return;
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp index 814bc8d..20ac52e 100644 --- a/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp +++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp
@@ -563,7 +563,7 @@ Fullscreen::RequestFullscreen(*GetDocument().body()); } testing::RunPendingTasks(); - EXPECT_TRUE(Fullscreen::IsCurrentFullScreenElement(*GetDocument().body())); + EXPECT_TRUE(Fullscreen::IsFullscreenElement(*GetDocument().body())); EXPECT_FALSE(GetVideo().IsFullscreen()); // Play video. @@ -576,7 +576,7 @@ RotateTo(kWebScreenOrientationLandscapePrimary); // Should not enter fullscreen on video, since document is already fullscreen. - EXPECT_TRUE(Fullscreen::IsCurrentFullScreenElement(*GetDocument().body())); + EXPECT_TRUE(Fullscreen::IsFullscreenElement(*GetDocument().body())); EXPECT_FALSE(GetVideo().IsFullscreen()); } @@ -654,7 +654,7 @@ Fullscreen::RequestFullscreen(*GetDocument().body()); } testing::RunPendingTasks(); - EXPECT_TRUE(Fullscreen::IsCurrentFullScreenElement(*GetDocument().body())); + EXPECT_TRUE(Fullscreen::IsFullscreenElement(*GetDocument().body())); EXPECT_FALSE(GetVideo().IsFullscreen()); // Leave video paused (playing is not a requirement to exit fullscreen). @@ -665,7 +665,7 @@ RotateTo(kWebScreenOrientationPortraitPrimary); // Should not exit fullscreen, since video was not the fullscreen element. - EXPECT_TRUE(Fullscreen::IsCurrentFullScreenElement(*GetDocument().body())); + EXPECT_TRUE(Fullscreen::IsFullscreenElement(*GetDocument().body())); EXPECT_FALSE(GetVideo().IsFullscreen()); }
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp index c887b77..5ca48a5 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -435,7 +435,6 @@ // Parses basic-card data to avoid parsing JSON in the browser. void SetBasicCardMethodData(const ScriptValue& input, PaymentMethodDataPtr& output, - ExecutionContext& execution_context, ExceptionState& exception_state) { BasicCardRequest basic_card; V8BasicCardRequest::toImpl(input.GetIsolate(), input.V8Value(), basic_card, @@ -484,12 +483,6 @@ } } } - - if (output->supported_types.size() != arraysize(kBasicCardTypes)) { - execution_context.AddConsoleMessage(ConsoleMessage::Create( - kJSMessageSource, kWarningMessageLevel, - "Cannot yet distinguish credit, debit, and prepaid cards.")); - } } } @@ -497,7 +490,6 @@ const Vector<String>& supported_methods, const ScriptValue& input, PaymentMethodDataPtr& output, - ExecutionContext& execution_context, ExceptionState& exception_state) { DCHECK(!input.IsEmpty()); v8::Local<v8::String> value; @@ -530,11 +522,15 @@ } if (RuntimeEnabledFeatures::PaymentRequestBasicCardEnabled() && supported_methods.Contains("basic-card")) { - SetBasicCardMethodData(input, output, execution_context, exception_state); + SetBasicCardMethodData(input, output, exception_state); if (exception_state.HadException()) exception_state.ClearException(); } +} +void CountPaymentRequestNetworkNameInSupportedMethods( + const Vector<String>& supported_methods, + ExecutionContext& execution_context) { for (size_t i = 0; i < arraysize(kBasicCardNetworks); ++i) { if (supported_methods.Contains(kBasicCardNetworks[i].name)) { Deprecation::CountDeprecation( @@ -594,6 +590,8 @@ return; } } + CountPaymentRequestNetworkNameInSupportedMethods( + modifier.supportedMethods(), execution_context); output.back()->method_data = payments::mojom::blink::PaymentMethodData::New(); @@ -602,7 +600,7 @@ if (modifier.hasData() && !modifier.data().IsEmpty()) { StringifyAndParseMethodSpecificData( modifier.supportedMethods(), modifier.data(), - output.back()->method_data, execution_context, exception_state); + output.back()->method_data, exception_state); } else { output.back()->method_data->stringified_data = ""; } @@ -723,6 +721,9 @@ } } + CountPaymentRequestNetworkNameInSupportedMethods( + payment_method_data.supportedMethods(), execution_context); + output.push_back(payments::mojom::blink::PaymentMethodData::New()); output.back()->supported_methods = payment_method_data.supportedMethods(); @@ -730,7 +731,7 @@ !payment_method_data.data().IsEmpty()) { StringifyAndParseMethodSpecificData( payment_method_data.supportedMethods(), payment_method_data.data(), - output.back(), execution_context, exception_state); + output.back(), exception_state); } else { output.back()->stringified_data = ""; }
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.cpp b/third_party/WebKit/Source/platform/MemoryCoordinator.cpp index 7e08795..02c0a31d 100644 --- a/third_party/WebKit/Source/platform/MemoryCoordinator.cpp +++ b/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
@@ -5,10 +5,12 @@ #include "platform/MemoryCoordinator.h" #include "base/sys_info.h" -#include "platform/fonts/FontCache.h" +#include "platform/WebTaskRunner.h" +#include "platform/fonts/FontGlobalContext.h" #include "platform/graphics/ImageDecodingStore.h" #include "platform/instrumentation/tracing/TraceEvent.h" #include "platform/wtf/allocator/Partitions.h" +#include "public/platform/WebThread.h" #if OS(ANDROID) #include "base/android/sys_utils.h" @@ -64,6 +66,13 @@ return *external.Get(); } +void MemoryCoordinator::RegisterThread(WebThread* thread) { + MemoryCoordinator::Instance().web_threads_.insert(thread); +} + +void MemoryCoordinator::UnregisterThread(WebThread* thread) { + MemoryCoordinator::Instance().web_threads_.erase(thread); +} MemoryCoordinator::MemoryCoordinator() {} @@ -102,6 +111,15 @@ // cache in purge+throttle. ImageDecodingStore::Instance().Clear(); WTF::Partitions::DecommitFreeableMemory(); + + // Thread-specific data never issues a layout, so we are safe here. + for (auto thread : web_threads_) { + if (!thread->GetWebTaskRunner()) + continue; + + thread->GetWebTaskRunner()->PostTask( + FROM_HERE, WTF::Bind(MemoryCoordinator::ClearThreadSpecificMemory)); + } } void MemoryCoordinator::ClearMemory() { @@ -109,7 +127,11 @@ // TODO(tasak|bashi): Make ImageDecodingStore and FontCache be // MemoryCoordinatorClients rather than clearing caches here. ImageDecodingStore::Instance().Clear(); - FontCache::GetFontCache()->Invalidate(); + FontGlobalContext::ClearMemory(); +} + +void MemoryCoordinator::ClearThreadSpecificMemory() { + FontGlobalContext::ClearMemory(); } DEFINE_TRACE(MemoryCoordinator) {
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.h b/third_party/WebKit/Source/platform/MemoryCoordinator.h index 3149524..928ab93 100644 --- a/third_party/WebKit/Source/platform/MemoryCoordinator.h +++ b/third_party/WebKit/Source/platform/MemoryCoordinator.h
@@ -10,6 +10,7 @@ #include "platform/wtf/Noncopyable.h" #include "public/platform/WebMemoryPressureLevel.h" #include "public/platform/WebMemoryState.h" +#include "public/platform/WebThread.h" namespace blink { @@ -29,7 +30,7 @@ // MemoryCoordinator listens to some events which could be opportunities // for reducing memory consumption and notifies its clients. class PLATFORM_EXPORT MemoryCoordinator final - : public GarbageCollected<MemoryCoordinator> { + : public GarbageCollectedFinalized<MemoryCoordinator> { WTF_MAKE_NONCOPYABLE(MemoryCoordinator); public: @@ -56,6 +57,9 @@ // the heap size. static void Initialize(); + static void RegisterThread(WebThread*); + static void UnregisterThread(WebThread*); + void RegisterClient(MemoryCoordinatorClient*); void UnregisterClient(MemoryCoordinatorClient*); @@ -77,11 +81,13 @@ MemoryCoordinator(); void ClearMemory(); + static void ClearThreadSpecificMemory(); static bool is_low_end_device_; static int64_t physical_memory_mb_; HeapHashSet<WeakMember<MemoryCoordinatorClient>> clients_; + HashSet<WebThread*> web_threads_; }; } // namespace blink
diff --git a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp index 10edb7a..331113f 100644 --- a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp +++ b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
@@ -5,6 +5,7 @@ #include "platform/WebThreadSupportingGC.h" #include <memory> +#include "platform/MemoryCoordinator.h" #include "platform/heap/SafePoint.h" #include "platform/scheduler/child/web_scheduler.h" #include "platform/wtf/PtrUtil.h" @@ -36,11 +37,13 @@ owning_thread_ = Platform::Current()->CreateThread(name); thread_ = owning_thread_.get(); } + MemoryCoordinator::RegisterThread(thread_); } WebThreadSupportingGC::~WebThreadSupportingGC() { // WebThread's destructor blocks until all the tasks are processed. owning_thread_.reset(); + MemoryCoordinator::UnregisterThread(thread_); } void WebThreadSupportingGC::Initialize() {
diff --git a/third_party/WebKit/Source/platform/fonts/FontGlobalContext.cpp b/third_party/WebKit/Source/platform/fonts/FontGlobalContext.cpp index c6437e6..d01fc38 100644 --- a/third_party/WebKit/Source/platform/fonts/FontGlobalContext.cpp +++ b/third_party/WebKit/Source/platform/fonts/FontGlobalContext.cpp
@@ -10,12 +10,22 @@ namespace blink { -FontGlobalContext& FontGlobalContext::Get() { - DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<FontGlobalContext>, +FontGlobalContext* FontGlobalContext::Get(CreateIfNeeded create_if_needed) { + DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<FontGlobalContext*>, font_persistent, ()); + if (!*font_persistent && create_if_needed == kCreate) { + *font_persistent = new FontGlobalContext(); + } return *font_persistent; } FontGlobalContext::FontGlobalContext() {} +void FontGlobalContext::ClearMemory() { + if (!Get(kDoNotCreate)) + return; + + GetFontCache().Invalidate(); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/platform/fonts/FontGlobalContext.h b/third_party/WebKit/Source/platform/fonts/FontGlobalContext.h index 5ada4d61..c3fa40e 100644 --- a/third_party/WebKit/Source/platform/fonts/FontGlobalContext.h +++ b/third_party/WebKit/Source/platform/fonts/FontGlobalContext.h
@@ -11,15 +11,20 @@ namespace blink { +enum CreateIfNeeded { kDoNotCreate, kCreate }; + // FontGlobalContext contains non-thread-safe, thread-specific data used for // font formatting. class PLATFORM_EXPORT FontGlobalContext { WTF_MAKE_NONCOPYABLE(FontGlobalContext); public: - static FontGlobalContext& Get(); + static FontGlobalContext* Get(CreateIfNeeded = kCreate); - static inline FontCache& GetFontCache() { return Get().font_cache; } + static inline FontCache& GetFontCache() { return Get()->font_cache; } + + // Called by MemoryCoordinator to clear memory. + static void ClearMemory(); private: friend class WTF::ThreadSpecific<FontGlobalContext>;
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp index 8855635b..a19b255 100644 --- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp +++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
@@ -83,6 +83,9 @@ CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge() { observer_ = nullptr; + if (web_layer_) { + GraphicsLayer::UnregisterContentsLayer(web_layer_.get()); + } } void CanvasSurfaceLayerBridge::CreateSolidColorLayer() {
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp index 826b5b9c..f9a30643 100644 --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -733,9 +733,9 @@ web_view_->ExitFullscreen(frame); } -void ChromeClientImpl::FullscreenElementChanged(Element* from_element, - Element* to_element) { - web_view_->FullscreenElementChanged(from_element, to_element); +void ChromeClientImpl::FullscreenElementChanged(Element* old_element, + Element* new_element) { + web_view_->FullscreenElementChanged(old_element, new_element); } void ChromeClientImpl::ClearCompositedSelection(LocalFrame* frame) {
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.h b/third_party/WebKit/Source/web/ChromeClientImpl.h index 4bbb67e..2ff7b48 100644 --- a/third_party/WebKit/Source/web/ChromeClientImpl.h +++ b/third_party/WebKit/Source/web/ChromeClientImpl.h
@@ -158,7 +158,8 @@ void EnterFullscreen(LocalFrame&) override; void ExitFullscreen(LocalFrame&) override; - void FullscreenElementChanged(Element*, Element*) override; + void FullscreenElementChanged(Element* old_element, + Element* new_element) override; void ClearCompositedSelection(LocalFrame*) override; void UpdateCompositedSelection(LocalFrame*,
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index b78d1351..21a5ee3 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2109,9 +2109,9 @@ fullscreen_controller_->ExitFullscreen(frame); } -void WebViewImpl::FullscreenElementChanged(Element* from_element, - Element* to_element) { - fullscreen_controller_->FullscreenElementChanged(from_element, to_element); +void WebViewImpl::FullscreenElementChanged(Element* old_element, + Element* new_element) { + fullscreen_controller_->FullscreenElementChanged(old_element, new_element); } bool WebViewImpl::HasHorizontalScrollbar() {
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h index 27ab5af4..10123972 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.h +++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -423,7 +423,8 @@ void EnterFullscreen(LocalFrame&) override; void ExitFullscreen(LocalFrame&) override; - void FullscreenElementChanged(Element*, Element*) override; + void FullscreenElementChanged(Element* old_element, + Element* new_element) override; // Exposed for the purpose of overriding device metrics. void SendResizeEventAndRepaint();
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index c7b997a..5f4a0e7 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -97,6 +97,7 @@ #include "platform/DragImage.h" #include "platform/KeyboardCodes.h" #include "platform/RuntimeEnabledFeatures.h" +#include "platform/bindings/Microtask.h" #include "platform/geometry/FloatRect.h" #include "platform/graphics/GraphicsLayer.h" #include "platform/loader/fetch/FetchParameters.h" @@ -7979,15 +7980,10 @@ UserGestureIndicator gesture(UserGestureToken::Create(document)); Element* div_fullscreen = document->getElementById("div1"); Fullscreen::RequestFullscreen(*div_fullscreen); - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*document)); - EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); + EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->DidEnterFullscreen(); - EXPECT_EQ(div_fullscreen, - Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->UpdateAllLifecyclePhases(); - EXPECT_EQ(div_fullscreen, - Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); // Verify that the element is sized to the viewport. @@ -8022,15 +8018,10 @@ UserGestureIndicator gesture(UserGestureToken::Create(document)); Element* div_fullscreen = document->getElementById("div1"); Fullscreen::RequestFullscreen(*div_fullscreen); - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*document)); - EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); + EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->DidEnterFullscreen(); - EXPECT_EQ(div_fullscreen, - Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->UpdateAllLifecyclePhases(); - EXPECT_EQ(div_fullscreen, - Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); // Verify that the viewports are nonscrollable. @@ -8046,14 +8037,10 @@ ASSERT_FALSE(visual_viewport_scroll_layer->UserScrollableVertical()); // Verify that the viewports are scrollable upon exiting fullscreen. - EXPECT_EQ(div_fullscreen, - Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(div_fullscreen, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->DidExitFullscreen(); - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->UpdateAllLifecyclePhases(); - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*document)); EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*document)); ASSERT_TRUE(layout_viewport_scroll_layer->UserScrollableHorizontal()); ASSERT_TRUE(layout_viewport_scroll_layer->UserScrollableVertical()); @@ -8087,19 +8074,13 @@ web_view_impl->MainFrameImpl()->GetFrame()->GetDocument(); UserGestureIndicator gesture(UserGestureToken::Create(document)); Fullscreen::RequestFullscreen(*document->documentElement()); - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*document)); - EXPECT_EQ(document->documentElement(), - Fullscreen::FullscreenElementFrom(*document)); + EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*document)); web_view_impl->DidEnterFullscreen(); EXPECT_EQ(document->documentElement(), - Fullscreen::CurrentFullScreenElementFrom(*document)); - EXPECT_EQ(document->documentElement(), Fullscreen::FullscreenElementFrom(*document)); web_view_impl->UpdateAllLifecyclePhases(); EXPECT_EQ(document->documentElement(), - Fullscreen::CurrentFullScreenElementFrom(*document)); - EXPECT_EQ(document->documentElement(), Fullscreen::FullscreenElementFrom(*document)); // Verify that the main frame is still scrollable. @@ -8191,22 +8172,19 @@ Fullscreen::RequestFullscreen(*iframe_body); } web_view_impl->DidEnterFullscreen(); + Microtask::PerformCheckpoint(V8PerIsolateData::MainThreadIsolate()); web_view_impl->UpdateAllLifecyclePhases(); // We are now in nested fullscreen, with both documents having a non-empty // fullscreen element stack. - EXPECT_EQ(top_body, Fullscreen::CurrentFullScreenElementFrom(*top_doc)); EXPECT_EQ(iframe, Fullscreen::FullscreenElementFrom(*top_doc)); - EXPECT_EQ(iframe_body, Fullscreen::CurrentFullScreenElementFrom(*iframe_doc)); EXPECT_EQ(iframe_body, Fullscreen::FullscreenElementFrom(*iframe_doc)); web_view_impl->DidExitFullscreen(); web_view_impl->UpdateAllLifecyclePhases(); // We should now have fully exited fullscreen. - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*top_doc)); EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*top_doc)); - EXPECT_EQ(nullptr, Fullscreen::CurrentFullScreenElementFrom(*iframe_doc)); EXPECT_EQ(nullptr, Fullscreen::FullscreenElementFrom(*iframe_doc)); }
diff --git a/third_party/WebKit/Tools/Scripts/run-perf-tests b/third_party/WebKit/Tools/Scripts/run-perf-tests deleted file mode 100755 index f85e496..0000000 --- a/third_party/WebKit/Tools/Scripts/run-perf-tests +++ /dev/null
@@ -1,46 +0,0 @@ -#!/usr/bin/env vpython -# Copyright (C) 2012 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Run performance tests.""" - -import logging -import sys - -from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner - -if '__main__' == __name__: - logging.basicConfig(level=logging.INFO, format="%(message)s") - - raw_input( - '\nWARNING: this script will be removed on 6/20/2017. ' - 'Please run "src/tools/perf/run_benchmark blink_perf" instead.\n' - 'For more details, see the announcement in ' - 'https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/mpZmEfeQPps\n' - 'Press enter to keep running this anyway.') - sys.exit(PerfTestsRunner().run())
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/__init__.py b/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/__init__.py deleted file mode 100644 index ef65bee5..0000000 --- a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/__init__.py +++ /dev/null
@@ -1 +0,0 @@ -# Required for Python to search this directory for module files
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py b/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py deleted file mode 100644 index f3afd7e..0000000 --- a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py +++ /dev/null
@@ -1,318 +0,0 @@ -# Copyright (C) 2012 Google Inc. All rights reserved. -# Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import logging -import math -import re - -from webkitpy.layout_tests.port.driver import DriverInput - -DEFAULT_TEST_RUNNER_COUNT = 4 - -_log = logging.getLogger(__name__) - - -class PerfTestMetric(object): - - def __init__(self, metric, unit=None, iterations=None): - # FIXME: Fix runner.js to report correct metric names - self._iterations = iterations or [] - self._unit = unit or self.metric_to_unit(metric) - self._metric = self.time_unit_to_metric(self._unit) if metric == 'Time' else metric - - def name(self): - return self._metric - - def has_values(self): - return bool(self._iterations) - - def append_group(self, group_values): - assert isinstance(group_values, list) - self._iterations.append(group_values) - - def grouped_iteration_values(self): - return self._iterations - - def flattened_iteration_values(self): - return [value for group_values in self._iterations for value in group_values] - - def unit(self): - return self._unit - - @staticmethod - def metric_to_unit(metric): - assert metric in ('Time', 'Malloc', 'JSHeap') - return 'ms' if metric == 'Time' else 'bytes' - - @staticmethod - def time_unit_to_metric(unit): - return {'fps': 'FrameRate', 'runs/s': 'Runs', 'ms': 'Time'}[unit] - - -class PerfTest(object): - - def __init__(self, port, test_name, test_path, test_runner_count=DEFAULT_TEST_RUNNER_COUNT): - self._port = port - self._test_name = test_name - self._test_path = test_path - self._description = None - self._metrics = {} - self._ordered_metrics_name = [] - self._test_runner_count = test_runner_count - - def test_name(self): - return self._test_name - - def test_name_without_file_extension(self): - return re.sub(r'\.\w+$', '', self.test_name()) - - def test_path(self): - return self._test_path - - def description(self): - return self._description - - def _create_driver(self): - return self._port.create_driver(worker_number=0, no_timeout=True) - - def run(self, time_out_ms): - for _ in xrange(self._test_runner_count): - driver = self._create_driver() - try: - if not self._run_with_driver(driver, time_out_ms): - return None - finally: - driver.stop() - - should_log = not self._port.get_option('profile') - if should_log and self._description: - _log.info('DESCRIPTION: %s', self._description) - - results = {} - for metric_name in self._ordered_metrics_name: - metric = self._metrics[metric_name] - results[metric.name()] = metric.grouped_iteration_values() - if should_log: - legacy_chromium_bot_compatible_name = self.test_name_without_file_extension().replace('/', ': ') - self.log_statistics(legacy_chromium_bot_compatible_name + ': ' + metric.name(), - metric.flattened_iteration_values(), metric.unit()) - - return results - - @staticmethod - def log_statistics(test_name, values, unit): - sorted_values = sorted(values) - - # Compute the mean and variance using Knuth's online algorithm (has good numerical stability). - square_sum = 0 - mean = 0 - for i, time in enumerate(sorted_values): - delta = time - mean - sweep = i + 1.0 - mean += delta / sweep - square_sum += delta * (time - mean) - - middle = int(len(sorted_values) / 2) - mean = sum(sorted_values) / len(values) - median = sorted_values[middle] if len(sorted_values) % 2 else (sorted_values[middle - 1] + sorted_values[middle]) / 2 - stdev = math.sqrt(square_sum / (len(sorted_values) - 1)) if len(sorted_values) > 1 else 0 - - _log.info('RESULT %s= %s %s', test_name, mean, unit) - _log.info('median= %s %s, stdev= %s %s, min= %s %s, max= %s %s', - median, unit, stdev, unit, sorted_values[0], unit, sorted_values[-1], unit) - - _description_regex = re.compile(r'^Description: (?P<description>.*)$', re.IGNORECASE) - _metrics_regex = re.compile(r'^(?P<metric>Time|Malloc|JS Heap):') - _statistics_keys = ['avg', 'median', 'stdev', 'min', 'max', 'unit', 'values'] - _score_regex = re.compile(r'^(?P<key>' + r'|'.join(_statistics_keys) + r')\s+(?P<value>([0-9\.]+(,\s+)?)+)\s*(?P<unit>.*)') - _console_regex = re.compile(r'^CONSOLE (MESSAGE|WARNING):') - - def _run_with_driver(self, driver, time_out_ms): - output = self.run_single(driver, self.test_path(), time_out_ms) - self._filter_output(output) - if self.run_failed(output): - return False - - current_metric = None - for line in re.split('\n', output.text): - description_match = self._description_regex.match(line) - metric_match = self._metrics_regex.match(line) - score = self._score_regex.match(line) - console_match = self._console_regex.match(line) - - if description_match: - self._description = description_match.group('description') - elif metric_match: - current_metric = metric_match.group('metric').replace(' ', '') - elif score: - if score.group('key') != 'values': - continue - - metric = self._ensure_metrics(current_metric, score.group('unit')) - metric.append_group(map(lambda value: float(value), score.group('value').split(', '))) - elif console_match: - # Ignore console messages such as deprecation warnings. - continue - else: - _log.error('ERROR: ' + line) - return False - - return True - - def _ensure_metrics(self, metric_name, unit=None): - if metric_name not in self._metrics: - self._metrics[metric_name] = PerfTestMetric(metric_name, unit) - self._ordered_metrics_name.append(metric_name) - return self._metrics[metric_name] - - def run_single(self, driver, test_path, time_out_ms, should_run_pixel_test=False): - return driver.run_test( - DriverInput(test_path, - time_out_ms, - image_hash=None, - should_run_pixel_test=should_run_pixel_test, - args=[]), - stop_when_done=False) - - def run_failed(self, output): - if output.error: - _log.error('error: %s\n%s', self.test_name(), output.error) - - if output.text is None: - pass - elif output.timeout: - _log.error('timeout: %s', self.test_name()) - elif output.crash: - _log.error('crash: %s', self.test_name()) - else: - return False - - return True - - @staticmethod - def _should_ignore_line(regexps, line): - if not line: - return True - for regexp in regexps: - if regexp.search(line): - return True - return False - - _lines_to_ignore_in_stderr = [ - re.compile(r'^Unknown option:'), - re.compile(r'^\[WARNING:proxy_service.cc'), - re.compile(r'^\[INFO:'), - # These stderr messages come from content_shell on Linux. - re.compile(r'INFO:SkFontHost_fontconfig.cpp'), - re.compile(r'Running without the SUID sandbox'), - # crbug.com/345229 - re.compile(r'InitializeSandbox\(\) called with multiple threads in process gpu-process')] - - _lines_to_ignore_in_parser_result = [ - re.compile(r'^\s*Running \d+ times$'), - re.compile(r'^\s*Ignoring warm-up '), - re.compile(r'^\s*Info:'), - re.compile(r'^\s*\d+(.\d+)?(\s*(runs\/s|ms|fps))?$'), - # Following are for handle existing test like Dromaeo - re.compile(re.escape("""main frame - has 1 onunload handler(s)""")), - re.compile(re.escape("""frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)""")), - re.compile(re.escape("""frame "<!--framePath //<!--frame0-->/<!--frame0-->-->" - has 1 onunload handler(s)""")), - # Following is for html5.html - re.compile(re.escape("""Blocked access to external URL http://www.whatwg.org/specs/web-apps/current-work/""")), - re.compile( - r"CONSOLE MESSAGE: (line \d+: )?Blocked script execution in '[A-Za-z0-9\-\.:]+' " - "because the document's frame is sandboxed and the 'allow-scripts' permission is not set."), - re.compile(r"CONSOLE MESSAGE: (line \d+: )?Not allowed to load local resource"), - # Dromaeo reports values for subtests. Ignore them for now. - re.compile(r'(?P<name>.+): \[(?P<values>(\d+(.\d+)?,\s+)*\d+(.\d+)?)\]'), - ] - - def _filter_output(self, output): - if output.error: - output.error = '\n'.join([line for line in re.split('\n', output.error) - if not self._should_ignore_line(self._lines_to_ignore_in_stderr, line)]) - if output.text: - output.text = '\n'.join([line for line in re.split('\n', output.text) - if not self._should_ignore_line(self._lines_to_ignore_in_parser_result, line)]) - - -class SingleProcessPerfTest(PerfTest): - - def __init__(self, port, test_name, test_path, test_runner_count=1): - super(SingleProcessPerfTest, self).__init__(port, test_name, test_path, test_runner_count) - - -class ChromiumStylePerfTest(PerfTest): - _chromium_style_result_regex = re.compile(r'^RESULT\s+(?P<name>[^=]+)\s*=\s+(?P<value>\d+(\.\d+)?)\s*(?P<unit>\w+)$') - - def __init__(self, port, test_name, test_path, test_runner_count=DEFAULT_TEST_RUNNER_COUNT): - super(ChromiumStylePerfTest, self).__init__(port, test_name, test_path, test_runner_count) - - def run(self, time_out_ms): - driver = self._create_driver() - try: - output = self.run_single(driver, self.test_path(), time_out_ms) - finally: - driver.stop() - - self._filter_output(output) - if self.run_failed(output): - return None - - return self.parse_and_log_output(output) - - def parse_and_log_output(self, output): - test_failed = False - results = {} - for line in re.split('\n', output.text): - resultLine = ChromiumStylePerfTest._chromium_style_result_regex.match(line) - if resultLine: - # FIXME: Store the unit - results[resultLine.group('name').replace(' ', '')] = float(resultLine.group('value')) - _log.info(line) - elif not len(line) == 0: - test_failed = True - _log.error(line) - return results if results and not test_failed else None - - -class PerfTestFactory(object): - - _pattern_map = [ - (re.compile(r'^Dromaeo/'), SingleProcessPerfTest), - (re.compile(r'^inspector/'), ChromiumStylePerfTest), - ] - - @classmethod - def create_perf_test(cls, port, test_name, path, test_runner_count=DEFAULT_TEST_RUNNER_COUNT): - for (pattern, test_class) in cls._pattern_map: - if pattern.match(test_name): - return test_class(port, test_name, path, test_runner_count) - return PerfTest(port, test_name, path, test_runner_count)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py deleted file mode 100644 index 0641a19..0000000 --- a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py +++ /dev/null
@@ -1,242 +0,0 @@ -# Copyright (C) 2013 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import unittest - -from webkitpy.common.host_mock import MockHost -from webkitpy.common.system.output_capture import OutputCapture -from webkitpy.layout_tests.port.driver import DriverOutput -from webkitpy.layout_tests.port.test import TestPort -from webkitpy.performance_tests.perftest import ChromiumStylePerfTest -from webkitpy.performance_tests.perftest import PerfTest -from webkitpy.performance_tests.perftest import PerfTestFactory -from webkitpy.performance_tests.perftest import PerfTestMetric -from webkitpy.performance_tests.perftest import SingleProcessPerfTest - - -class MockPort(TestPort): - - def __init__(self, custom_run_test=None): - super(MockPort, self).__init__(host=MockHost(), custom_run_test=custom_run_test) - - -class TestPerfTestMetric(unittest.TestCase): - - def test_init_set_missing_unit(self): - self.assertEqual(PerfTestMetric('Time', iterations=[1, 2, 3, 4, 5]).unit(), 'ms') - self.assertEqual(PerfTestMetric('Malloc', iterations=[1, 2, 3, 4, 5]).unit(), 'bytes') - self.assertEqual(PerfTestMetric('JSHeap', iterations=[1, 2, 3, 4, 5]).unit(), 'bytes') - - def test_init_set_time_metric(self): - self.assertEqual(PerfTestMetric('Time', 'ms').name(), 'Time') - self.assertEqual(PerfTestMetric('Time', 'fps').name(), 'FrameRate') - self.assertEqual(PerfTestMetric('Time', 'runs/s').name(), 'Runs') - - def test_has_values(self): - self.assertFalse(PerfTestMetric('Time').has_values()) - self.assertTrue(PerfTestMetric('Time', iterations=[1]).has_values()) - - def test_append(self): - metric = PerfTestMetric('Time') - metric2 = PerfTestMetric('Time') - self.assertFalse(metric.has_values()) - self.assertFalse(metric2.has_values()) - - metric.append_group([1]) - self.assertTrue(metric.has_values()) - self.assertFalse(metric2.has_values()) - self.assertEqual(metric.grouped_iteration_values(), [[1]]) - self.assertEqual(metric.flattened_iteration_values(), [1]) - - metric.append_group([2]) - self.assertEqual(metric.grouped_iteration_values(), [[1], [2]]) - self.assertEqual(metric.flattened_iteration_values(), [1, 2]) - - metric2.append_group([3]) - self.assertTrue(metric2.has_values()) - self.assertEqual(metric.flattened_iteration_values(), [1, 2]) - self.assertEqual(metric2.flattened_iteration_values(), [3]) - - metric.append_group([4, 5]) - self.assertEqual(metric.grouped_iteration_values(), [[1], [2], [4, 5]]) - self.assertEqual(metric.flattened_iteration_values(), [1, 2, 4, 5]) - - -class TestPerfTest(unittest.TestCase): - - def _assert_results_are_correct(self, test, output): - test.run_single = lambda driver, path, time_out_ms: output - self.assertTrue(test._run_with_driver(None, None)) - self.assertEqual(test._metrics.keys(), ['Time']) - self.assertEqual(test._metrics['Time'].flattened_iteration_values(), [1080, 1120, 1095, 1101, 1104]) - - def test_parse_output(self): - output = DriverOutput(""" -Running 20 times -Ignoring warm-up run (1115) - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50862 ms -min 1080 ms -max 1120 ms -""", image=None, image_hash=None, audio=None) - output_capture = OutputCapture() - output_capture.capture_output() - try: - test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test') - self._assert_results_are_correct(test, output) - finally: - actual_stdout, actual_stderr, actual_logs = output_capture.restore_output() - self.assertEqual(actual_stdout, '') - self.assertEqual(actual_stderr, '') - self.assertEqual(actual_logs, '') - - def test_parse_output_with_failing_line(self): - output = DriverOutput(""" -Running 20 times -Ignoring warm-up run (1115) - -some-unrecognizable-line - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50862 ms -min 1080 ms -max 1120 ms -""", image=None, image_hash=None, audio=None) - output_capture = OutputCapture() - output_capture.capture_output() - try: - test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test') - test.run_single = lambda driver, path, time_out_ms: output - self.assertFalse(test._run_with_driver(None, None)) - finally: - actual_stdout, actual_stderr, actual_logs = output_capture.restore_output() - self.assertEqual(actual_stdout, '') - self.assertEqual(actual_stderr, '') - self.assertEqual(actual_logs, 'ERROR: some-unrecognizable-line\n') - - def test_parse_output_with_description(self): - output = DriverOutput(""" -Description: this is a test description. - -Running 20 times -Ignoring warm-up run (1115) - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50862 ms -min 1080 ms -max 1120 ms""", image=None, image_hash=None, audio=None) - test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test') - self._assert_results_are_correct(test, output) - self.assertEqual(test.description(), 'this is a test description.') - - def test_ignored_stderr_lines(self): - test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test') - output_with_lines_to_ignore = DriverOutput('', image=None, image_hash=None, audio=None, error=""" -Unknown option: --foo-bar -Should not be ignored -[WARNING:proxy_service.cc] bad moon a-rising -[WARNING:chrome.cc] Something went wrong -[INFO:SkFontHost_android.cpp(1158)] Use Test Config File Main /data/local/tmp/drt/android_main_fonts.xml, Fallback /data/local/tmp/drt/android_fallback_fonts.xml, Font Dir /data/local/tmp/drt/fonts/ -[ERROR:main.cc] The sky has fallen""") - test._filter_output(output_with_lines_to_ignore) - self.assertEqual(output_with_lines_to_ignore.error, - 'Should not be ignored\n' - '[WARNING:chrome.cc] Something went wrong\n' - '[ERROR:main.cc] The sky has fallen') - - def test_parse_output_with_subtests(self): - output = DriverOutput(""" -Running 20 times -some test: [1, 2, 3, 4, 5] -other test = else: [6, 7, 8, 9, 10] -Ignoring warm-up run (1115) - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50862 ms -min 1080 ms -max 1120 ms -""", image=None, image_hash=None, audio=None) - output_capture = OutputCapture() - output_capture.capture_output() - try: - test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test') - self._assert_results_are_correct(test, output) - finally: - actual_stdout, actual_stderr, actual_logs = output_capture.restore_output() - self.assertEqual(actual_stdout, '') - self.assertEqual(actual_stderr, '') - self.assertEqual(actual_logs, '') - - -class TestSingleProcessPerfTest(unittest.TestCase): - - def test_use_only_one_process(self): - called = [0] - - def run_single(driver, path, time_out_ms): - called[0] += 1 - return DriverOutput(""" -Running 20 times -Ignoring warm-up run (1115) - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50862 ms -min 1080 ms -max 1120 ms""", image=None, image_hash=None, audio=None) - - test = SingleProcessPerfTest(MockPort(), 'some-test', '/path/some-dir/some-test') - test.run_single = run_single - self.assertTrue(test.run(0)) - self.assertEqual(called[0], 1) - - -class TestPerfTestFactory(unittest.TestCase): - - def test_regular_test(self): - test = PerfTestFactory.create_perf_test(MockPort(), 'some-dir/some-test', '/path/some-dir/some-test') - self.assertEqual(test.__class__, PerfTest) - - def test_inspector_test(self): - test = PerfTestFactory.create_perf_test(MockPort(), 'inspector/some-test', '/path/inspector/some-test') - self.assertEqual(test.__class__, ChromiumStylePerfTest)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py b/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py deleted file mode 100644 index c79a9fc..0000000 --- a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py +++ /dev/null
@@ -1,379 +0,0 @@ -# Copyright (C) 2012 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Run Inspector's perf tests in perf mode.""" - -import os -import json -import logging -import optparse -import time -import datetime - -from webkitpy.common import find_files -from webkitpy.common.host import Host -from webkitpy.common.net.file_uploader import FileUploader -from webkitpy.performance_tests.perftest import PerfTestFactory -from webkitpy.performance_tests.perftest import DEFAULT_TEST_RUNNER_COUNT - - -_log = logging.getLogger(__name__) - - -class PerfTestsRunner(object): - _default_branch = 'webkit-trunk' - EXIT_CODE_BAD_BUILD = -1 - EXIT_CODE_BAD_SOURCE_JSON = -2 - EXIT_CODE_BAD_MERGE = -3 - EXIT_CODE_FAILED_UPLOADING = -4 - EXIT_CODE_BAD_PREPARATION = -5 - - _DEFAULT_JSON_FILENAME = 'PerformanceTestsResults.json' - - def __init__(self, args=None, port=None): - self._options, self._args = PerfTestsRunner._parse_args(args) - if port: - self._port = port - self._host = self._port.host - else: - self._host = Host() - self._port = self._host.port_factory.get(self._options.platform, self._options) - self._base_path = self._port.perf_tests_dir() - self._timestamp = time.time() - self._utc_timestamp = datetime.datetime.utcnow() - - @staticmethod - def _parse_args(args=None): - def _expand_path(option, opt_str, value, parser): - path = os.path.expandvars(os.path.expanduser(value)) - setattr(parser.values, option.dest, path) - perf_option_list = [ - optparse.make_option('--debug', action='store_const', const='Debug', dest="configuration", - help='Set the configuration to Debug'), - optparse.make_option('--release', action='store_const', const='Release', dest="configuration", - help='Set the configuration to Release'), - optparse.make_option('-t', '--target', dest='configuration', - help='Specify the target build subdirectory under src/out/'), - optparse.make_option("--platform", - help="Specify port/platform being tested (e.g. mac)"), - optparse.make_option("--chromium", - action="store_const", const='chromium', dest='platform', help='Alias for --platform=chromium'), - optparse.make_option("--android", - action="store_const", const='android', dest='platform', help='Alias for --platform=android'), - optparse.make_option("--builder-name", - help=("The name of the builder shown on the waterfall running this script e.g. google-mac-2.")), - optparse.make_option("--build-number", - help=("The build number of the builder running this script.")), - optparse.make_option("--build", dest="build", action="store_true", default=True, - help="Check to ensure the DumpRenderTree build is up to date (default)."), - optparse.make_option("--no-build", dest="build", action="store_false", - help="Don't check to see if the DumpRenderTree build is up to date."), - optparse.make_option("--build-directory", - help="Path to the directory under which build files are kept (should not include configuration)"), - optparse.make_option("--time-out-ms", default=600 * 1000, - help="Set the timeout for each test"), - optparse.make_option("--no-results", action="store_false", dest="generate_results", default=True, - help="Do no generate results JSON and results page."), - optparse.make_option("--output-json-path", action='callback', callback=_expand_path, type="str", - help="Path to generate a JSON file at; may contain previous results if it already exists."), - optparse.make_option("--reset-results", action="store_true", - help="Clears the content in the generated JSON file before adding the results."), - optparse.make_option("--slave-config-json-path", action='callback', callback=_expand_path, type="str", - help="Only used on bots. Path to a slave configuration file."), - optparse.make_option("--description", - help="Add a description to the output JSON file if one is generated"), - optparse.make_option("--no-show-results", action="store_false", default=True, dest="show_results", - help="Don't launch a browser with results after the tests are done"), - optparse.make_option("--test-results-server", - help="Upload the generated JSON file to the specified server when --output-json-path is present."), - optparse.make_option("--force", dest="use_skipped_list", action="store_false", default=True, - help="Run all tests, including the ones in the Skipped list."), - optparse.make_option("--profile", action="store_true", - help="Output per-test profile information."), - optparse.make_option("--profiler", action="store", - help="Output per-test profile information, using the specified profiler."), - optparse.make_option("--additional-driver-flag", action="append", - default=[], help="Additional command line flag to pass to DumpRenderTree " - "Specify multiple times to add multiple flags."), - optparse.make_option("--driver-name", type="string", - help="Alternative DumpRenderTree binary to use"), - optparse.make_option("--content-shell", action="store_true", - help="Use Content Shell instead of DumpRenderTree"), - optparse.make_option("--repeat", default=1, type="int", - help="Specify number of times to run test set (default: 1)."), - optparse.make_option("--test-runner-count", default=DEFAULT_TEST_RUNNER_COUNT, type="int", - help="Specify number of times to invoke test runner for each performance test."), - ] - return optparse.OptionParser(option_list=(perf_option_list)).parse_args(args) - - def _collect_tests(self): - test_extensions = ['.html', '.svg'] - - def _is_test_file(filesystem, dirname, filename): - return filesystem.splitext(filename)[1] in test_extensions - - filesystem = self._host.filesystem - - paths = [] - for arg in self._args: - if filesystem.exists(filesystem.join(self._base_path, arg)): - paths.append(arg) - else: - relpath = filesystem.relpath(arg, self._base_path) - if filesystem.exists(filesystem.join(self._base_path, relpath)): - paths.append(filesystem.normpath(relpath)) - else: - _log.warning('Path was not found:' + arg) - - skipped_directories = set(['resources']) - test_files = find_files.find(filesystem, self._base_path, paths, skipped_directories, _is_test_file) - tests = [] - for path in test_files: - relative_path = filesystem.relpath(path, self._base_path).replace('\\', '/') - if self._options.use_skipped_list and self._port.skips_perf_test( - relative_path) and filesystem.normpath(relative_path) not in paths: - continue - test = PerfTestFactory.create_perf_test(self._port, relative_path, path, - test_runner_count=self._options.test_runner_count) - tests.append(test) - - return tests - - def _start_http_servers(self): - self._port.acquire_http_lock() - self._port.start_http_server(number_of_servers=2) - - def _stop_http_servers(self): - self._port.stop_http_server() - self._port.release_http_lock() - - def run(self): - needs_http = self._port.requires_http_server() - - class FakePrinter(object): - - def write_update(self, msg): - print msg - - def write_throttled_update(self, msg): - pass - - if self._port.check_build(needs_http=needs_http, printer=FakePrinter()): - _log.error("Build not up to date for %s" % self._port._path_to_driver()) - return self.EXIT_CODE_BAD_BUILD - - run_count = 0 - repeat = self._options.repeat - while run_count < repeat: - run_count += 1 - - tests = self._collect_tests() - runs = ' (Run %d of %d)' % (run_count, repeat) if repeat > 1 else '' - _log.info("Running %d tests%s", len(tests), runs) - - try: - if needs_http: - self._start_http_servers() - unexpected = self._run_tests_set(sorted(list(tests), key=lambda test: test.test_name())) - - finally: - if needs_http: - self._stop_http_servers() - - if self._options.generate_results and not self._options.profile: - exit_code = self._generate_results() - if exit_code: - return exit_code - - if self._options.generate_results and not self._options.profile: - test_results_server = self._options.test_results_server - if test_results_server and not self._upload_json(test_results_server, self._output_json_path()): - return self.EXIT_CODE_FAILED_UPLOADING - - if self._options.show_results: - self._port.show_results_html_file(self._results_page_path()) - - return unexpected - - def _output_json_path(self): - output_json_path = self._options.output_json_path - if output_json_path: - return output_json_path - return self._host.filesystem.join(self._port.perf_results_directory(), self._DEFAULT_JSON_FILENAME) - - def _results_page_path(self): - return self._host.filesystem.splitext(self._output_json_path())[0] + '.html' - - def _generate_results(self): - options = self._options - output_json_path = self._output_json_path() - output = self._generate_results_dict(self._timestamp, options.description, - options.platform, options.builder_name, options.build_number) - - if options.slave_config_json_path: - output = self._merge_slave_config_json(options.slave_config_json_path, output) - if not output: - return self.EXIT_CODE_BAD_SOURCE_JSON - - output = self._merge_outputs_if_needed(output_json_path, output) - if not output: - return self.EXIT_CODE_BAD_MERGE - - filesystem = self._host.filesystem - json_output = json.dumps(output) - filesystem.write_text_file(output_json_path, json_output) - - template_path = filesystem.join(self._port.perf_tests_dir(), 'resources/results-template.html') - template = filesystem.read_text_file(template_path) - - absolute_path_to_trunk = filesystem.dirname(self._port.perf_tests_dir()) - results_page = template.replace('%AbsolutePathToWebKitTrunk%', absolute_path_to_trunk) - results_page = results_page.replace('%PeformanceTestsResultsJSON%', json_output) - - filesystem.write_text_file(self._results_page_path(), results_page) - - def _generate_results_dict(self, timestamp, description, platform, builder_name, build_number): - revisions = {} - path = self._port.repository_path() - git = self._host.git(path=path) - revision = str(git.commit_position(path)) - revisions['chromium'] = {'revision': revision, 'timestamp': git.timestamp_of_revision(path, revision)} - - meta_info = { - 'description': description, - 'buildTime': self._datetime_in_ES5_compatible_iso_format(self._utc_timestamp), - 'platform': platform, - 'revisions': revisions, - 'builderName': builder_name, - 'buildNumber': int(build_number) if build_number else None} - - contents = {'tests': {}} - for key, value in meta_info.items(): - if value: - contents[key] = value - - for test, metrics in self._results: - for metric_name, iteration_values in metrics.iteritems(): - if not isinstance(iteration_values, list): # We can't reports results without individual measurements. - continue - - tests = contents['tests'] - path = test.test_name_without_file_extension().split('/') - for i in range(0, len(path)): - is_last_token = i + 1 == len(path) - url = self.view_source_url( - 'PerformanceTests/' + (test.test_name() if is_last_token else '/'.join(path[0:i + 1]))) - tests.setdefault(path[i], {'url': url}) - current_test = tests[path[i]] - if is_last_token: - current_test.setdefault('metrics', {}) - assert metric_name not in current_test['metrics'] - current_test['metrics'][metric_name] = {'current': iteration_values} - else: - current_test.setdefault('tests', {}) - tests = current_test['tests'] - - return contents - - @staticmethod - def view_source_url(path_from_blink): - return 'https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/%s' % path_from_blink - - @staticmethod - def _datetime_in_ES5_compatible_iso_format(datetime): - return datetime.strftime('%Y-%m-%dT%H:%M:%S.%f') - - def _merge_slave_config_json(self, slave_config_json_path, contents): - if not self._host.filesystem.isfile(slave_config_json_path): - _log.error("Missing slave configuration JSON file: %s", slave_config_json_path) - return None - - try: - slave_config_json = self._host.filesystem.open_text_file_for_reading(slave_config_json_path) - slave_config = json.load(slave_config_json) - for key in slave_config: - contents['builder' + key.capitalize()] = slave_config[key] - return contents - except Exception as error: - _log.error("Failed to merge slave configuration JSON file %s: %s", slave_config_json_path, error) - return None - - def _merge_outputs_if_needed(self, output_json_path, output): - if self._options.reset_results or not self._host.filesystem.isfile(output_json_path): - return [output] - try: - existing_outputs = json.loads(self._host.filesystem.read_text_file(output_json_path)) - return existing_outputs + [output] - except Exception as error: - _log.error("Failed to merge output JSON file %s: %s", output_json_path, error) - return None - - def _upload_json(self, test_results_server, json_path, host_path="/api/report", file_uploader=FileUploader): - url = "https://%s%s" % (test_results_server, host_path) - uploader = file_uploader(url, 120) - try: - response = uploader.upload_single_text_file(self._host.filesystem, 'application/json', json_path) - except Exception as error: - _log.error("Failed to upload JSON file to %s in 120s: %s", url, error) - return False - - response_body = [line.strip('\n') for line in response] - if response_body != ['OK']: - try: - parsed_response = json.loads('\n'.join(response_body)) - except: - _log.error("Uploaded JSON to %s but got a bad response:", url) - for line in response_body: - _log.error(line) - return False - if parsed_response.get('status') != 'OK': - _log.error("Uploaded JSON to %s but got an error:", url) - _log.error(json.dumps(parsed_response, indent=4)) - return False - - _log.info("JSON file uploaded to %s.", url) - return True - - def _run_tests_set(self, tests): - failures = 0 - self._results = [] - - for i, test in enumerate(tests): - _log.info('Running %s (%d of %d)', test.test_name(), i + 1, len(tests)) - start_time = time.time() - metrics = test.run(self._options.time_out_ms) - if metrics: - self._results.append((test, metrics)) - else: - failures += 1 - _log.error('FAILED') - - _log.info('Finished: %f s', time.time() - start_time) - _log.info('') - - return failures
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py deleted file mode 100644 index cde3eb6..0000000 --- a/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py +++ /dev/null
@@ -1,807 +0,0 @@ -# Copyright (C) 2012 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit tests for run_perf_tests.""" - -import StringIO -import datetime -import json -import re -import unittest - -from webkitpy.common.host_mock import MockHost -from webkitpy.common.system.output_capture import OutputCapture -from webkitpy.layout_tests.port.driver import DriverOutput -from webkitpy.layout_tests.port.test import TestPort -from webkitpy.performance_tests.perftest import ChromiumStylePerfTest -from webkitpy.performance_tests.perftest import DEFAULT_TEST_RUNNER_COUNT -from webkitpy.performance_tests.perftest import PerfTest -from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner - - -class MainTest(unittest.TestCase): - - def create_runner(self, args=[]): - args = args or [] - options, _ = PerfTestsRunner._parse_args(args) - test_port = TestPort(host=MockHost(), options=options) - runner = PerfTestsRunner(args=args, port=test_port) - runner._host.filesystem.maybe_make_directory(runner._base_path, 'inspector') - runner._host.filesystem.maybe_make_directory(runner._base_path, 'Bindings') - runner._host.filesystem.maybe_make_directory(runner._base_path, 'Parser') - return runner, test_port - - def _add_file(self, runner, dirname, filename, content=True): - dirname = runner._host.filesystem.join(runner._base_path, dirname) if dirname else runner._base_path - runner._host.filesystem.maybe_make_directory(dirname) - runner._host.filesystem.files[runner._host.filesystem.join(dirname, filename)] = content - - def test_collect_tests(self): - runner, _ = self.create_runner() - self._add_file(runner, 'inspector', 'a_file.html', 'a content') - tests = runner._collect_tests() - self.assertEqual(len(tests), 1) - - def _collect_tests_and_sort_test_name(self, runner): - return sorted([test.test_name() for test in runner._collect_tests()]) - - def test_collect_tests_with_multile_files(self): - runner, port = self.create_runner(args=['PerformanceTests/test1.html', 'test2.html']) - - def add_file(filename): - port.host.filesystem.files[runner._host.filesystem.join(runner._base_path, filename)] = 'some content' - - add_file('test1.html') - add_file('test2.html') - add_file('test3.html') - port.host.filesystem.chdir(runner._port.perf_tests_dir()[:runner._port.perf_tests_dir().rfind(runner._host.filesystem.sep)]) - self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner), ['test1.html', 'test2.html']) - - def test_collect_tests_with_skipped_list(self): - runner, port = self.create_runner() - - self._add_file(runner, 'inspector', 'test1.html') - self._add_file(runner, 'inspector', 'unsupported_test1.html') - self._add_file(runner, 'inspector', 'test2.html') - self._add_file(runner, 'inspector/resources', 'resource_file.html') - self._add_file(runner, 'unsupported', 'unsupported_test2.html') - port.skipped_perf_tests = lambda: ['inspector/unsupported_test1.html', 'unsupported'] - self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner), ['inspector/test1.html', 'inspector/test2.html']) - - def test_collect_tests_with_skipped_list_and_files(self): - runner, port = self.create_runner(args=['Suite/Test1.html', 'Suite/SkippedTest1.html', 'SkippedSuite/Test1.html']) - - self._add_file(runner, 'SkippedSuite', 'Test1.html') - self._add_file(runner, 'SkippedSuite', 'Test2.html') - self._add_file(runner, 'Suite', 'Test1.html') - self._add_file(runner, 'Suite', 'Test2.html') - self._add_file(runner, 'Suite', 'SkippedTest1.html') - self._add_file(runner, 'Suite', 'SkippedTest2.html') - port.skipped_perf_tests = lambda: ['Suite/SkippedTest1.html', 'Suite/SkippedTest1.html', 'SkippedSuite'] - self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner), - ['SkippedSuite/Test1.html', 'Suite/SkippedTest1.html', 'Suite/Test1.html']) - - def test_collect_tests_with_ignored_skipped_list(self): - runner, port = self.create_runner(args=['--force']) - - self._add_file(runner, 'inspector', 'test1.html') - self._add_file(runner, 'inspector', 'unsupported_test1.html') - self._add_file(runner, 'inspector', 'test2.html') - self._add_file(runner, 'inspector/resources', 'resource_file.html') - self._add_file(runner, 'unsupported', 'unsupported_test2.html') - port.skipped_perf_tests = lambda: ['inspector/unsupported_test1.html', 'unsupported'] - self.assertItemsEqual( - self._collect_tests_and_sort_test_name(runner), - [ - 'inspector/test1.html', - 'inspector/test2.html', - 'inspector/unsupported_test1.html', - 'unsupported/unsupported_test2.html' - ]) - - def test_default_args(self): - options, _ = PerfTestsRunner._parse_args([]) - self.assertTrue(options.build) - self.assertEqual(options.time_out_ms, 600 * 1000) - self.assertTrue(options.generate_results) - self.assertTrue(options.show_results) - self.assertTrue(options.use_skipped_list) - self.assertEqual(options.repeat, 1) - self.assertEqual(options.test_runner_count, DEFAULT_TEST_RUNNER_COUNT) - - def test_parse_args(self): - options, _ = PerfTestsRunner._parse_args([ - '--build-directory=folder42', - '--platform=platform42', - '--builder-name', 'webkit-mac-1', - '--build-number=56', - '--time-out-ms=42', - '--no-show-results', - '--reset-results', - '--output-json-path=a/output.json', - '--slave-config-json-path=a/source.json', - '--test-results-server=somehost', - '--additional-driver-flag=--enable-threaded-parser', - '--additional-driver-flag=--awesomesauce', - '--repeat=5', - '--test-runner-count=5', - '--debug' - ]) - self.assertTrue(options.build) - self.assertEqual(options.build_directory, 'folder42') - self.assertEqual(options.platform, 'platform42') - self.assertEqual(options.builder_name, 'webkit-mac-1') - self.assertEqual(options.build_number, '56') - self.assertEqual(options.time_out_ms, '42') - self.assertEqual(options.configuration, 'Debug') - self.assertFalse(options.show_results) - self.assertTrue(options.reset_results) - self.assertEqual(options.output_json_path, 'a/output.json') - self.assertEqual(options.slave_config_json_path, 'a/source.json') - self.assertEqual(options.test_results_server, 'somehost') - self.assertEqual(options.additional_driver_flag, ['--enable-threaded-parser', '--awesomesauce']) - self.assertEqual(options.repeat, 5) - self.assertEqual(options.test_runner_count, 5) - - def test_upload_json(self): - runner, port = self.create_runner() - port.host.filesystem.files['/mock-checkout/some.json'] = 'some content' - - class MockFileUploader: - called = [] - upload_single_text_file_throws = False - upload_single_text_file_return_value = None - - @classmethod - def reset(cls): - cls.called = [] - cls.upload_single_text_file_throws = False - cls.upload_single_text_file_return_value = None - - def __init__(mock, url, timeout): - self.assertEqual(url, 'https://some.host/some/path') - self.assertTrue(isinstance(timeout, int) and timeout) - mock.called.append('FileUploader') - - def upload_single_text_file(mock, filesystem, content_type, filename): - self.assertEqual(filesystem, port.host.filesystem) - self.assertEqual(content_type, 'application/json') - self.assertEqual(filename, 'some.json') - mock.called.append('upload_single_text_file') - if mock.upload_single_text_file_throws: - raise Exception - return mock.upload_single_text_file_return_value - - MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('OK') - self.assertTrue(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader)) - self.assertEqual(MockFileUploader.called, ['FileUploader', 'upload_single_text_file']) - - MockFileUploader.reset() - MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('Some error') - output = OutputCapture() - output.capture_output() - self.assertFalse(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader)) - _, _, logs = output.restore_output() - self.assertEqual(logs, 'Uploaded JSON to https://some.host/some/path but got a bad response:\nSome error\n') - - # Throwing an exception upload_single_text_file shouldn't blow up _upload_json - MockFileUploader.reset() - MockFileUploader.upload_single_text_file_throws = True - self.assertFalse(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader)) - self.assertEqual(MockFileUploader.called, ['FileUploader', 'upload_single_text_file']) - - MockFileUploader.reset() - MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('{"status": "OK"}') - self.assertTrue(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader)) - self.assertEqual(MockFileUploader.called, ['FileUploader', 'upload_single_text_file']) - - MockFileUploader.reset() - MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO( - '{"status": "SomethingHasFailed", "failureStored": false}') - output = OutputCapture() - output.capture_output() - self.assertFalse(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader)) - _, _, logs = output.restore_output() - serialized_json = json.dumps({'status': 'SomethingHasFailed', 'failureStored': False}, indent=4) - self.assertEqual(logs, 'Uploaded JSON to https://some.host/some/path but got an error:\n%s\n' % serialized_json) - - -class InspectorPassTestData: - text = 'RESULT group_name: test_name= 42 ms' - output = """Running inspector/pass.html (2 of 2) -RESULT group_name: test_name= 42 ms -Finished: 0.1 s - -""" - - -class EventTargetWrapperTestData: - text = """Running 20 times -Ignoring warm-up run (1502) -1504 -1505 -1510 -1504 -1507 -1509 -1510 -1487 -1488 -1472 -1472 -1488 -1473 -1472 -1475 -1487 -1486 -1486 -1475 -1471 - -Time: -values 1486, 1471, 1510, 1505, 1478, 1490 ms -avg 1490 ms -median 1488 ms -stdev 15.13935 ms -min 1471 ms -max 1510 ms -""" - - output = """Running Bindings/event-target-wrapper.html (1 of 2) -RESULT Bindings: event-target-wrapper: Time= 1490.0 ms -median= 1488.0 ms, stdev= 14.11751 ms, min= 1471.0 ms, max= 1510.0 ms -Finished: 0.1 s - -""" - - results = { - 'url': ('https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit' - '/PerformanceTests/Bindings/event-target-wrapper.html'), - 'metrics': {'Time': {'current': [[1486.0, 1471.0, 1510.0, 1505.0, 1478.0, 1490.0]] * 4}} - } - - -class SomeParserTestData: - text = """Running 20 times -Ignoring warm-up run (1115) - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50861 ms -min 1080 ms -max 1120 ms -""" - - output = """Running Parser/some-parser.html (2 of 2) -RESULT Parser: some-parser: Time= 1100.0 ms -median= 1101.0 ms, stdev= 13.31402 ms, min= 1080.0 ms, max= 1120.0 ms -Finished: 0.1 s - -""" - - -class MemoryTestData: - text = """Running 20 times -Ignoring warm-up run (1115) - -Time: -values 1080, 1120, 1095, 1101, 1104 ms -avg 1100 ms -median 1101 ms -stdev 14.50861 ms -min 1080 ms -max 1120 ms - -JS Heap: -values 825000, 811000, 848000, 837000, 829000 bytes -avg 830000 bytes -median 829000 bytes -stdev 13784.04875 bytes -min 811000 bytes -max 848000 bytes - -Malloc: -values 529000, 511000, 548000, 536000, 521000 bytes -avg 529000 bytes -median 529000 bytes -stdev 14124.44689 bytes -min 511000 bytes -max 548000 bytes -""" - - output = """Running 1 tests -Running Parser/memory-test.html (1 of 1) -RESULT Parser: memory-test: Time= 1100.0 ms -median= 1101.0 ms, stdev= 13.31402 ms, min= 1080.0 ms, max= 1120.0 ms -RESULT Parser: memory-test: JSHeap= 830000.0 bytes -median= 829000.0 bytes, stdev= 12649.11064 bytes, min= 811000.0 bytes, max= 848000.0 bytes -RESULT Parser: memory-test: Malloc= 529000.0 bytes -median= 529000.0 bytes, stdev= 12961.48139 bytes, min= 511000.0 bytes, max= 548000.0 bytes -Finished: 0.1 s -""" - - results = {'current': [[1080, 1120, 1095, 1101, 1104]] * 4} - js_heap_results = {'current': [[825000, 811000, 848000, 837000, 829000]] * 4} - malloc_results = {'current': [[529000, 511000, 548000, 536000, 521000]] * 4} - - -class TestDriver: - - def run_test(self, driver_input, stop_when_done): - text = '' - timeout = False - crash = False - if driver_input.test_name.endswith('pass.html'): - text = InspectorPassTestData.text - elif driver_input.test_name.endswith('timeout.html'): - timeout = True - elif driver_input.test_name.endswith('failed.html'): - text = None - elif driver_input.test_name.endswith('tonguey.html'): - text = 'we are not expecting an output from perf tests but RESULT blablabla' - elif driver_input.test_name.endswith('crash.html'): - crash = True - elif driver_input.test_name.endswith('event-target-wrapper.html'): - text = EventTargetWrapperTestData.text - elif driver_input.test_name.endswith('some-parser.html'): - text = SomeParserTestData.text - elif driver_input.test_name.endswith('memory-test.html'): - text = MemoryTestData.text - return DriverOutput(text, '', '', '', crash=crash, timeout=timeout) - - def start(self): - """do nothing""" - - def stop(self): - """do nothing""" - - -class IntegrationTest(unittest.TestCase): - - def _normalize_output(self, log): - return re.sub(r'(stdev=\s+\d+\.\d{5})\d+', r'\1', re.sub(r'Finished: [0-9\.]+ s', 'Finished: 0.1 s', log)) - - def _load_output_json(self, runner): - json_content = runner._host.filesystem.read_text_file(runner._output_json_path()) - return json.loads(re.sub(r'("stdev":\s*\d+\.\d{5})\d+', r'\1', json_content)) - - def create_runner(self, args=None, driver_class=TestDriver): - args = args or [] - options, _ = PerfTestsRunner._parse_args(args) - test_port = TestPort(host=MockHost(), options=options) - test_port.create_driver = lambda worker_number=None, no_timeout=False: driver_class() - - runner = PerfTestsRunner(args=args, port=test_port) - runner._host.filesystem.maybe_make_directory(runner._base_path, 'inspector') - runner._host.filesystem.maybe_make_directory(runner._base_path, 'Bindings') - runner._host.filesystem.maybe_make_directory(runner._base_path, 'Parser') - - return runner, test_port - - def run_test(self, test_name): - runner, port = self.create_runner() - tests = [ChromiumStylePerfTest(port, test_name, runner._host.filesystem.join('some-dir', test_name))] - return runner._run_tests_set(tests) == 0 - - def test_run_passing_test(self): - self.assertTrue(self.run_test('pass.html')) - - def test_run_silent_test(self): - self.assertFalse(self.run_test('silent.html')) - - def test_run_failed_test(self): - self.assertFalse(self.run_test('failed.html')) - - def test_run_tonguey_test(self): - self.assertFalse(self.run_test('tonguey.html')) - - def test_run_timeout_test(self): - self.assertFalse(self.run_test('timeout.html')) - - def test_run_crash_test(self): - self.assertFalse(self.run_test('crash.html')) - - def _tests_for_runner(self, runner, test_names): - filesystem = runner._host.filesystem - tests = [] - for test in test_names: - path = filesystem.join(runner._base_path, test) - if test.startswith('inspector/'): - tests.append(ChromiumStylePerfTest(runner._port, test, path)) - else: - tests.append(PerfTest(runner._port, test, path)) - return tests - - def test_run_test_set(self): - runner, _ = self.create_runner() - tests = self._tests_for_runner(runner, ['inspector/pass.html', 'inspector/silent.html', 'inspector/failed.html', - 'inspector/tonguey.html', 'inspector/timeout.html', 'inspector/crash.html']) - output = OutputCapture() - output.capture_output() - try: - unexpected_result_count = runner._run_tests_set(tests) - finally: - _, _, log = output.restore_output() - self.assertEqual(unexpected_result_count, len(tests) - 1) - self.assertTrue('\nRESULT group_name: test_name= 42 ms\n' in log) - - def test_run_test_set_kills_drt_per_run(self): - - class TestDriverWithStopCount(TestDriver): - stop_count = 0 - - def stop(self): - TestDriverWithStopCount.stop_count += 1 - - runner, _ = self.create_runner(driver_class=TestDriverWithStopCount) - - tests = self._tests_for_runner(runner, ['inspector/pass.html', 'inspector/silent.html', 'inspector/failed.html', - 'inspector/tonguey.html', 'inspector/timeout.html', 'inspector/crash.html']) - runner._run_tests_set(tests) - - self.assertEqual(TestDriverWithStopCount.stop_count, 6) - - def test_run_test_set_for_parser_tests(self): - runner, _ = self.create_runner() - tests = self._tests_for_runner(runner, ['Bindings/event-target-wrapper.html', 'Parser/some-parser.html']) - output = OutputCapture() - output.capture_output() - try: - unexpected_result_count = runner._run_tests_set(tests) - finally: - _, _, log = output.restore_output() - self.assertEqual(unexpected_result_count, 0) - self.assertEqual(self._normalize_output(log), EventTargetWrapperTestData.output + SomeParserTestData.output) - - def test_run_memory_test(self): - runner, port = self.create_runner_and_setup_results_template() - runner._timestamp = 123456789 - port.host.filesystem.write_text_file(runner._base_path + '/Parser/memory-test.html', 'some content') - - output = OutputCapture() - output.capture_output() - try: - unexpected_result_count = runner.run() - finally: - _, _, log = output.restore_output() - self.assertEqual(unexpected_result_count, 0) - self.assertEqual(self._normalize_output(log), MemoryTestData.output + '\nMOCK: user.open_url: file://...\n') - parser_tests = self._load_output_json(runner)[0]['tests']['Parser']['tests'] - self.assertEqual(parser_tests['memory-test']['metrics']['Time'], MemoryTestData.results) - self.assertEqual(parser_tests['memory-test']['metrics']['JSHeap'], MemoryTestData.js_heap_results) - self.assertEqual(parser_tests['memory-test']['metrics']['Malloc'], MemoryTestData.malloc_results) - - def _test_run_with_json_output( - self, runner, filesystem, upload_succeeds=False, results_shown=True, expected_exit_code=0, repeat=1, compare_logs=True): - filesystem.write_text_file(runner._base_path + '/inspector/pass.html', 'some content') - filesystem.write_text_file(runner._base_path + '/Bindings/event-target-wrapper.html', 'some content') - - uploaded = [False] - - def mock_upload_json(hostname, json_path, host_path=None): - # FIXME: Get rid of the hard-coded perf.webkit.org once we've completed the transition. - self.assertIn(hostname, ['some.host']) - self.assertIn(json_path, ['/mock-checkout/output.json']) - self.assertIn(host_path, [None, '/api/report']) - uploaded[0] = upload_succeeds - return upload_succeeds - - runner._upload_json = mock_upload_json - runner._timestamp = 123456789 - runner._utc_timestamp = datetime.datetime(2013, 2, 8, 15, 19, 37, 460000) - output_capture = OutputCapture() - output_capture.capture_output() - try: - self.assertEqual(runner.run(), expected_exit_code) - finally: - _, _, logs = output_capture.restore_output() - - if not expected_exit_code and compare_logs: - expected_logs = '' - for i in xrange(repeat): - runs = ' (Run %d of %d)' % (i + 1, repeat) if repeat > 1 else '' - expected_logs += 'Running 2 tests%s\n' % runs + EventTargetWrapperTestData.output + InspectorPassTestData.output - if results_shown: - expected_logs += 'MOCK: user.open_url: file://...\n' - self.assertEqual(self._normalize_output(logs), expected_logs) - - self.assertEqual(uploaded[0], upload_succeeds) - - return logs - - _event_target_wrapper_and_inspector_results = { - 'Bindings': { - 'url': 'https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/PerformanceTests/Bindings', - 'tests': {'event-target-wrapper': EventTargetWrapperTestData.results} - } - } - - def test_run_with_json_output(self): - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json', - '--test-results-server=some.host']) - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True) - self.assertEqual(self._load_output_json(runner), [{ - 'buildTime': '2013-02-08T15:19:37.460000', 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}]) - - filesystem = port.host.filesystem - self.assertTrue(filesystem.isfile(runner._output_json_path())) - self.assertTrue(filesystem.isfile(filesystem.splitext(runner._output_json_path())[0] + '.html')) - - def test_run_with_description(self): - runner, port = self.create_runner_and_setup_results_template( - args=['--output-json-path=/mock-checkout/output.json', - '--test-results-server=some.host', '--description', 'some description']) - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True) - self.assertEqual(self._load_output_json(runner), [{ - 'buildTime': '2013-02-08T15:19:37.460000', 'description': 'some description', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}]) - - def create_runner_and_setup_results_template(self, args=None): - args = args or [] - runner, port = self.create_runner(args) - filesystem = port.host.filesystem - filesystem.write_text_file( - runner._base_path + '/resources/results-template.html', # pylint: disable=protected-access - ('BEGIN<script src="%AbsolutePathToWebKitTrunk%/some.js"></script>' - '<script src="%AbsolutePathToWebKitTrunk%/other.js"></script><script>%PeformanceTestsResultsJSON%</script>END')) - filesystem.write_text_file(runner._base_path + '/Dromaeo/resources/dromaeo/web/lib/jquery-1.6.4.js', 'jquery content') - return runner, port - - def test_run_respects_no_results(self): - runner, port = self.create_runner(args=['--output-json-path=/mock-checkout/output.json', - '--test-results-server=some.host', '--no-results']) - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=False, results_shown=False) - self.assertFalse(port.host.filesystem.isfile('/mock-checkout/output.json')) - - def test_run_generates_json_by_default(self): - runner, port = self.create_runner_and_setup_results_template() - filesystem = port.host.filesystem - output_json_path = runner._output_json_path() - results_page_path = filesystem.splitext(output_json_path)[0] + '.html' - - self.assertFalse(filesystem.isfile(output_json_path)) - self.assertFalse(filesystem.isfile(results_page_path)) - - self._test_run_with_json_output(runner, port.host.filesystem) - - self.assertEqual( - self._load_output_json(runner), - [ - { - 'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}} - } - ]) - - self.assertTrue(filesystem.isfile(output_json_path)) - self.assertTrue(filesystem.isfile(results_page_path)) - - def test_run_merges_output_by_default(self): - runner, port = self.create_runner_and_setup_results_template() - filesystem = port.host.filesystem - output_json_path = runner._output_json_path() - - filesystem.write_text_file(output_json_path, '[{"previous": "results"}]') - - self._test_run_with_json_output(runner, port.host.filesystem) - - self.assertEqual(self._load_output_json(runner), [{'previous': 'results'}, { - 'buildTime': '2013-02-08T15:19:37.460000', 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}]) - self.assertTrue(filesystem.isfile(filesystem.splitext(output_json_path)[0] + '.html')) - - def test_run_respects_reset_results(self): - runner, port = self.create_runner_and_setup_results_template(args=['--reset-results']) - filesystem = port.host.filesystem - output_json_path = runner._output_json_path() - - filesystem.write_text_file(output_json_path, '[{"previous": "results"}]') - - self._test_run_with_json_output(runner, port.host.filesystem) - - self.assertEqual(self._load_output_json(runner), [{ - 'buildTime': '2013-02-08T15:19:37.460000', 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}]) - self.assertTrue(filesystem.isfile(filesystem.splitext(output_json_path)[0] + '.html')) - - def test_run_generates_and_show_results_page(self): - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json']) - page_shown = [] - port.show_results_html_file = lambda path: page_shown.append(path) - filesystem = port.host.filesystem - self._test_run_with_json_output(runner, filesystem, results_shown=False) - - expected_entry = {'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}} - - self.maxDiff = None - self.assertEqual(runner._output_json_path(), '/mock-checkout/output.json') - self.assertEqual(self._load_output_json(runner), [expected_entry]) - self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'), - 'BEGIN<script src="/test.checkout/some.js"></script><script src="/test.checkout/other.js"></script>' - '<script>%s</script>END' % port.host.filesystem.read_text_file(runner._output_json_path())) - self.assertEqual(page_shown[0], '/mock-checkout/output.html') - - self._test_run_with_json_output(runner, filesystem, results_shown=False) - self.assertEqual(runner._output_json_path(), '/mock-checkout/output.json') - self.assertEqual(self._load_output_json(runner), [expected_entry, expected_entry]) - self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'), - 'BEGIN<script src="/test.checkout/some.js"></script><script src="/test.checkout/other.js"></script>' - '<script>%s</script>END' % port.host.filesystem.read_text_file(runner._output_json_path())) - - def test_run_respects_no_show_results(self): - show_results_html_file = lambda path: page_shown.append(path) - - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json']) - page_shown = [] - port.show_results_html_file = show_results_html_file - self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False) - self.assertEqual(page_shown[0], '/mock-checkout/output.html') - - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json', - '--no-show-results']) - page_shown = [] - port.show_results_html_file = show_results_html_file - self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False) - self.assertEqual(page_shown, []) - - def test_run_with_bad_output_json(self): - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json']) - port.host.filesystem.write_text_file('/mock-checkout/output.json', 'bad json') - self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_MERGE) - port.host.filesystem.write_text_file('/mock-checkout/output.json', '{"another bad json": "1"}') - self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_MERGE) - - def test_run_with_slave_config_json(self): - runner, port = self.create_runner_and_setup_results_template( - args=['--output-json-path=/mock-checkout/output.json', - '--slave-config-json-path=/mock-checkout/slave-config.json', - '--test-results-server=some.host']) - port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '{"key": "value"}') - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True) - self.assertEqual(self._load_output_json(runner), [{ - 'buildTime': '2013-02-08T15:19:37.460000', 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}, 'builderKey': 'value'}]) - - def test_run_with_bad_slave_config_json(self): - runner, port = self.create_runner_and_setup_results_template( - args=['--output-json-path=/mock-checkout/output.json', - '--slave-config-json-path=/mock-checkout/slave-config.json', - '--test-results-server=some.host']) - logs = self._test_run_with_json_output(runner, port.host.filesystem, - expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON) - self.assertTrue('Missing slave configuration JSON file: /mock-checkout/slave-config.json' in logs) - port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', 'bad json') - self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON) - port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '["another bad json"]') - self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON) - - def test_run_with_multiple_repositories(self): - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json', - '--test-results-server=some.host']) - port.repository_path = lambda: '/mock-checkout' - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True) - self.assertEqual(self._load_output_json(runner), [{ - 'buildTime': '2013-02-08T15:19:37.460000', 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}]) - - def test_run_with_upload_json(self): - runner, port = self.create_runner_and_setup_results_template(args=[ - '--output-json-path=/mock-checkout/output.json', - '--test-results-server', 'some.host', - '--platform', 'platform1', - '--builder-name', 'builder1', - '--build-number', '123' - ]) - - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True) - generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json']) - self.assertEqual(generated_json[0]['platform'], 'platform1') - self.assertEqual(generated_json[0]['builderName'], 'builder1') - self.assertEqual(generated_json[0]['buildNumber'], 123) - - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=False, - expected_exit_code=PerfTestsRunner.EXIT_CODE_FAILED_UPLOADING) - - def test_run_with_upload_json_should_generate_perf_webkit_json(self): - runner, port = self.create_runner_and_setup_results_template(args=[ - '--output-json-path=/mock-checkout/output.json', - '--test-results-server', 'some.host', - '--platform', 'platform1', - '--builder-name', 'builder1', - '--build-number', '123', - '--slave-config-json-path=/mock-checkout/slave-config.json' - ]) - port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '{"key": "value1"}') - - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True) - generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json']) - self.assertTrue(isinstance(generated_json, list)) - self.assertEqual(len(generated_json), 1) - - output = generated_json[0] - self.maxDiff = None - self.assertEqual(output['platform'], 'platform1') - self.assertEqual(output['buildNumber'], 123) - self.assertEqual(output['buildTime'], '2013-02-08T15:19:37.460000') - self.assertEqual(output['builderName'], 'builder1') - self.assertEqual(output['builderKey'], 'value1') - self.assertEqual(output['revisions'], {'chromium': {'revision': '5678', 'timestamp': '2013-02-01 08:48:05 +0000'}}) - self.assertEqual(output['tests'].keys(), ['Bindings']) - self.assertEqual(sorted(output['tests']['Bindings'].keys()), ['tests', 'url']) - self.assertEqual(output['tests']['Bindings']['url'], - 'https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/PerformanceTests/Bindings') - self.assertEqual(output['tests']['Bindings']['tests'].keys(), ['event-target-wrapper']) - self.assertEqual(output['tests']['Bindings']['tests']['event-target-wrapper'], { - 'url': ('https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit' - '/PerformanceTests/Bindings/event-target-wrapper.html'), - 'metrics': {'Time': {'current': [[1486.0, 1471.0, 1510.0, 1505.0, 1478.0, 1490.0]] * 4}} - }) - - def test_run_with_repeat(self): - self.maxDiff = None - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json', - '--test-results-server=some.host', '--repeat', '5']) - self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True, repeat=5) - self.assertEqual(self._load_output_json(runner), [ - {'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}, - {'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}, - {'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}, - {'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}, - {'buildTime': '2013-02-08T15:19:37.460000', - 'tests': self._event_target_wrapper_and_inspector_results, - 'revisions': {'chromium': {'timestamp': '2013-02-01 08:48:05 +0000', 'revision': '5678'}}}]) - - def test_run_with_test_runner_count(self): - runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json', - '--test-runner-count=3']) - self._test_run_with_json_output(runner, port.host.filesystem, compare_logs=False) - generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json']) - self.assertTrue(isinstance(generated_json, list)) - self.assertEqual(len(generated_json), 1) - - output = generated_json[0]['tests']['Bindings']['tests']['event-target-wrapper']['metrics']['Time']['current'] - self.assertEqual(len(output), 3) - expectedMetrics = EventTargetWrapperTestData.results['metrics']['Time']['current'][0] - for metrics in output: - self.assertEqual(metrics, expectedMetrics)
diff --git a/third_party/WebKit/public/web/WebAXEnums.h b/third_party/WebKit/public/web/WebAXEnums.h index 1f97e0a..3b241d6 100644 --- a/third_party/WebKit/public/web/WebAXEnums.h +++ b/third_party/WebKit/public/web/WebAXEnums.h
@@ -379,6 +379,7 @@ // sparse attribute the default value must be the null WebAXObject. enum class WebAXObjectAttribute { kAriaActiveDescendant, + kAriaDetails, kAriaErrorMessage, }; @@ -388,7 +389,6 @@ // empty vector. enum class WebAXObjectVectorAttribute { kAriaControls, - kAriaDetails, kAriaFlowTo, };
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp b/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp index b982a7d..f9abd662 100644 --- a/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp +++ b/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp
@@ -146,7 +146,6 @@ virtual void* LookupInWrap(const char* symbol_name, LibraryView* wrap) { if (wrap->IsSystem()) { void* address = ::dlsym(wrap->GetSystem(), symbol_name); -#ifdef __arm__ // Android libm.so defines isnanf as weak. This means that its // address cannot be found by dlsym(), which returns NULL for weak // symbols prior to Android 5.0. However, libm.so contains the real @@ -162,7 +161,6 @@ !strcmp(symbol_name, "isnanf") && !strcmp(wrap->GetName(), "libm.so")) address = ::dlsym(wrap->GetSystem(), "__isnanf"); -#endif return address; }
diff --git a/third_party/crashpad/README.chromium b/third_party/crashpad/README.chromium index 9618664..d4fc62d 100644 --- a/third_party/crashpad/README.chromium +++ b/third_party/crashpad/README.chromium
@@ -2,7 +2,7 @@ Short Name: crashpad URL: https://crashpad.chromium.org/ Version: unknown -Revision: 63ccbd0e4c2fa9e1f69c0b1e5f4627ad66dcc4f1 +Revision: c4f6ca3c6ac50fe4724c126518337972e778f133 License: Apache 2.0 License File: crashpad/LICENSE Security Critical: yes
diff --git a/third_party/crashpad/crashpad/compat/compat.gyp b/third_party/crashpad/crashpad/compat/compat.gyp index 56daa3f8..e2b2df6 100644 --- a/third_party/crashpad/crashpad/compat/compat.gyp +++ b/third_party/crashpad/crashpad/compat/compat.gyp
@@ -23,6 +23,7 @@ 'sources': [ 'mac/AvailabilityMacros.h', 'mac/kern/exc_resource.h', + 'mac/mach/i386/thread_state.h', 'mac/mach/mach.h', 'mac/mach-o/getsect.cc', 'mac/mach-o/getsect.h',
diff --git a/third_party/crashpad/crashpad/compat/mac/mach/i386/thread_state.h b/third_party/crashpad/crashpad/compat/mac/mach/i386/thread_state.h new file mode 100644 index 0000000..de744d6 --- /dev/null +++ b/third_party/crashpad/crashpad/compat/mac/mach/i386/thread_state.h
@@ -0,0 +1,28 @@ +// Copyright 2017 The Crashpad Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef CRASHPAD_COMPAT_MAC_MACH_I386_THREAD_STATE_H_ +#define CRASHPAD_COMPAT_MAC_MACH_I386_THREAD_STATE_H_ + +#include_next <mach/i386/thread_state.h> + +// 10.13 SDK +// +// This was defined as 244 in the 10.7 through 10.12 SDKs, and 144 previously. +#if I386_THREAD_STATE_MAX < 614 +#undef I386_THREAD_STATE_MAX +#define I386_THREAD_STATE_MAX (614) +#endif + +#endif // CRASHPAD_COMPAT_MAC_MACH_I386_THREAD_STATE_H_
diff --git a/third_party/crashpad/crashpad/compat/mac/mach/mach.h b/third_party/crashpad/crashpad/compat/mac/mach/mach.h index 9cfe6b62..55f5fdd 100644 --- a/third_party/crashpad/crashpad/compat/mac/mach/mach.h +++ b/third_party/crashpad/crashpad/compat/mac/mach/mach.h
@@ -93,6 +93,20 @@ #define x86_AVX_STATE 18 #endif +// 10.13 SDK + +#ifndef x86_AVX512_STATE32 +#define x86_AVX512_STATE32 19 +#endif + +#ifndef x86_AVX512_STATE64 +#define x86_AVX512_STATE64 20 +#endif + +#ifndef x86_AVX512_STATE +#define x86_AVX512_STATE 21 +#endif + #endif // defined(__i386__) || defined(__x86_64__) // <mach/thread_status.h>
diff --git a/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc b/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc index 8852e614..143ab6e 100644 --- a/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc +++ b/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
@@ -16,9 +16,6 @@ #include <linux/auxvec.h> #include <stdio.h> -#include <string.h> - -#include <algorithm> #include "base/files/file_path.h" #include "base/logging.h" @@ -62,43 +59,4 @@ return false; } -// static -bool AuxiliaryVector::VariableSizeBitCast(uint64_t data, - char* dest, - size_t dest_size) { - auto data_p = reinterpret_cast<const char*>(&data); - constexpr size_t data_size = sizeof(uint64_t); - - // Verify that any unused bytes from data are zero. - // The unused bytes are at the start of the data buffer for big-endian and the - // end of the buffer for little-endian. - if (dest_size < data_size) { - uint64_t zero = 0; - auto extra_bytes = data_p; -#if defined(ARCH_CPU_LITTLE_ENDIAN) - extra_bytes += dest_size; -#endif // ARCH_CPU_LITTLE_ENDIAN - if (memcmp(extra_bytes, &zero, data_size - dest_size) != 0) { - LOG(ERROR) << "information loss"; - return false; - } - } - - // Zero out the destination, in case it is larger than data. - memset(dest, 0, dest_size); - -#if defined(ARCH_CPU_LITTLE_ENDIAN) - // Copy a prefix of data to a prefix of dest for little-endian - memcpy(dest, data_p, std::min(dest_size, data_size)); -#else - // or the suffix of data to the suffix of dest for big-endian - if (data_size >= dest_size) { - memcpy(dest, data_p + data_size - dest_size, dest_size); - } else { - memcpy(dest + dest_size - data_size, data_p, data_size); - } -#endif // ARCH_CPU_LITTLE_ENDIAN - return true; -} - } // namespace crashpad
diff --git a/third_party/crashpad/crashpad/util/linux/auxiliary_vector.h b/third_party/crashpad/crashpad/util/linux/auxiliary_vector.h index 904eada..65d0e3c 100644 --- a/third_party/crashpad/crashpad/util/linux/auxiliary_vector.h +++ b/third_party/crashpad/crashpad/util/linux/auxiliary_vector.h
@@ -21,6 +21,7 @@ #include "base/logging.h" #include "base/macros.h" +#include "util/misc/reinterpret_bytes.h" namespace crashpad { @@ -55,8 +56,7 @@ LOG(ERROR) << "value not found"; return false; } - return VariableSizeBitCast( - iter->second, reinterpret_cast<char*>(value), sizeof(V)); + return ReinterpretBytes(iter->second, value); } protected: @@ -66,8 +66,6 @@ template <typename ULong> bool Read(pid_t pid); - static bool VariableSizeBitCast(uint64_t data, char* dest, size_t dest_size); - DISALLOW_COPY_AND_ASSIGN(AuxiliaryVector); };
diff --git a/third_party/crashpad/crashpad/util/linux/thread_info.cc b/third_party/crashpad/crashpad/util/linux/thread_info.cc index d389763..300ae7d3 100644 --- a/third_party/crashpad/crashpad/util/linux/thread_info.cc +++ b/third_party/crashpad/crashpad/util/linux/thread_info.cc
@@ -30,6 +30,34 @@ namespace { +#if defined(ARCH_CPU_X86_FAMILY) + +template <typename Destination> +bool GetRegisterSet(pid_t tid, int set, Destination* dest) { + iovec iov; + iov.iov_base = dest; + iov.iov_len = sizeof(*dest); + if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) { + PLOG(ERROR) << "ptrace"; + return false; + } + if (iov.iov_len != sizeof(*dest)) { + LOG(ERROR) << "Unexpected registers size"; + return false; + } + return true; +} + +bool GetFloatingPointRegisters32(pid_t tid, FloatContext* context) { + return GetRegisterSet(tid, NT_PRXFPREG, &context->f32.fxsave); +} + +bool GetFloatingPointRegisters64(pid_t tid, FloatContext* context) { + return GetRegisterSet(tid, NT_PRFPREG, &context->f64.fxsave); +} + +#elif defined(ARCH_CPU_ARM_FAMILY) + #if defined(ARCH_CPU_ARMEL) // PTRACE_GETREGSET, introduced in Linux 2.6.34 (2225a122ae26), requires kernel // support enabled by HAVE_ARCH_TRACEHOOK. This has been set for x86 (including @@ -77,7 +105,6 @@ } #endif // ARCH_CPU_ARMEL -#if defined(ARCH_CPU_ARM_FAMILY) // Normally, the Linux kernel will copy out register sets according to the size // of the struct that contains them. Tracing a 32-bit ARM process running in // compatibility mode on a 64-bit ARM cpu will only copy data for the number of @@ -163,7 +190,9 @@ } return true; } -#endif // ARCH_CPU_ARM_FAMILY +#else +#error Port. +#endif // ARCH_CPU_X86_FAMILY } // namespace @@ -241,31 +270,8 @@ bool ThreadInfo::GetFloatingPointRegisters(FloatContext* context) { INITIALIZATION_STATE_DCHECK_VALID(initialized_); -#if defined(ARCH_CPU_X86_FAMILY) - iovec iov; - iov.iov_base = context; - iov.iov_len = sizeof(*context); - if (ptrace( - PTRACE_GETREGSET, tid_, reinterpret_cast<void*>(NT_PRFPREG), &iov) != - 0) { - PLOG(ERROR) << "ptrace"; - return false; - } - if (is_64_bit_ && iov.iov_len == sizeof(context->f64)) { - return true; - } - if (!is_64_bit_ && iov.iov_len == sizeof(context->f32)) { - return true; - } - LOG(ERROR) << "Unexpected registers size"; - return false; - -#elif defined(ARCH_CPU_ARM_FAMILY) return is_64_bit_ ? GetFloatingPointRegisters64(tid_, context) : GetFloatingPointRegisters32(tid_, context); -#else -#error Port. -#endif // ARCH_CPU_X86_FAMILY } bool ThreadInfo::GetThreadArea(LinuxVMAddress* address) {
diff --git a/third_party/crashpad/crashpad/util/linux/thread_info.h b/third_party/crashpad/crashpad/util/linux/thread_info.h index 6fb2621d..e9eeff3 100644 --- a/third_party/crashpad/crashpad/util/linux/thread_info.h +++ b/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -27,6 +27,10 @@ #include "util/misc/initialization_state_dcheck.h" #include "util/numeric/int128.h" +#if defined(OS_ANDROID) +#include <android/api-level.h> +#endif + namespace crashpad { //! \brief The set of general purpose registers for an architecture family. @@ -140,15 +144,22 @@ //! architecture. struct f32 { #if defined(ARCH_CPU_X86_FAMILY) - // Reflects user_fpregs_struct in sys/user.h. - uint32_t cwd; - uint32_t swd; - uint32_t twd; - uint32_t fip; - uint32_t fcs; - uint32_t foo; - uint32_t fos; - uint32_t st_space[20]; + // Reflects user_fpxregs_struct in sys/user.h + struct fxsave { + uint16_t cwd; + uint16_t swd; + uint16_t twd; + uint16_t fop; + uint32_t fip; + uint32_t fcs; + uint32_t foo; + uint32_t fos; + uint32_t mxcsr; + uint32_t reserved; + uint32_t st_space[32]; + uint32_t xmm_space[32]; + uint32_t padding[56]; + } fxsave; #elif defined(ARCH_CPU_ARM_FAMILY) // Reflects user_fpregs in sys/user.h. struct fpregs { @@ -184,17 +195,20 @@ //! architecture. struct f64 { #if defined(ARCH_CPU_X86_FAMILY) - uint16_t cwd; - uint16_t swd; - uint16_t ftw; - uint16_t fop; - uint64_t rip; - uint64_t rdp; - uint32_t mxcsr; - uint32_t mxcr_mask; - uint32_t st_space[32]; - uint32_t xmm_space[64]; - uint32_t padding[24]; + // Refelects user_fpregs_struct in sys/user.h + struct fxsave { + uint16_t cwd; + uint16_t swd; + uint16_t ftw; + uint16_t fop; + uint64_t rip; + uint64_t rdp; + uint32_t mxcsr; + uint32_t mxcr_mask; + uint32_t st_space[32]; + uint32_t xmm_space[64]; + uint32_t padding[24]; + } fxsave; #elif defined(ARCH_CPU_ARM_FAMILY) uint128_struct vregs[32]; uint32_t fpsr; @@ -206,9 +220,15 @@ } f64; #if defined(ARCH_CPU_X86) - static_assert(sizeof(f32) == sizeof(user_fpregs_struct), "Size mismatch"); +#if defined(OS_ANDROID) && __ANDROID_API__ <= 19 + using NativeFpxregs = user_fxsr_struct; +#else + using NativeFpxregs = user_fpxregs_struct; +#endif // OS_ANDROID + static_assert(sizeof(f32::fxsave) == sizeof(NativeFpxregs), "Size mismatch"); #elif defined(ARCH_CPU_X86_64) - static_assert(sizeof(f64) == sizeof(user_fpregs_struct), "Size mismatch"); + static_assert(sizeof(f64::fxsave) == sizeof(user_fpregs_struct), + "Size mismatch"); #elif defined(ARCH_CPU_ARMEL) static_assert(sizeof(f32::fpregs) == sizeof(user_fpregs), "Size mismatch"); static_assert(sizeof(f32::vfp) == sizeof(user_vfp), "Size mismatch");
diff --git a/third_party/crashpad/crashpad/util/mach/mig.py b/third_party/crashpad/crashpad/util/mach/mig.py index a41c4f89..992f3e1a 100755 --- a/third_party/crashpad/crashpad/util/mach/mig.py +++ b/third_party/crashpad/crashpad/util/mach/mig.py
@@ -111,6 +111,10 @@ parser = argparse.ArgumentParser() parser.add_argument('--developer-dir', help='Path to Xcode') parser.add_argument('--sdk', help='Path to SDK') + parser.add_argument('--include', + default=[], + action='append', + help='Additional include directory') parser.add_argument('defs') parser.add_argument('user_c') parser.add_argument('server_c') @@ -124,10 +128,12 @@ '-header', parsed.user_h, '-sheader', parsed.server_h, ] - if parsed.sdk is not None: - command.extend(['-isysroot', parsed.sdk]) if parsed.developer_dir is not None: os.environ['DEVELOPER_DIR'] = parsed.developer_dir + if parsed.sdk is not None: + command.extend(['-isysroot', parsed.sdk]) + for include in parsed.include: + command.extend(['-I' + include]) command.append(parsed.defs) subprocess.check_call(command) FixUserImplementation(parsed.user_c)
diff --git a/third_party/crashpad/crashpad/util/misc/reinterpret_bytes.cc b/third_party/crashpad/crashpad/util/misc/reinterpret_bytes.cc new file mode 100644 index 0000000..65ec33f3 --- /dev/null +++ b/third_party/crashpad/crashpad/util/misc/reinterpret_bytes.cc
@@ -0,0 +1,70 @@ +// Copyright 2017 The Crashpad Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "util/misc/reinterpret_bytes.h" + +#include <string.h> + +#include <algorithm> + +#include "base/logging.h" + +namespace crashpad { +namespace internal { + +bool ReinterpretBytesImpl(const char* data, + size_t data_size, + char* dest, + size_t dest_size) { + // Verify that any unused bytes from data are zero. + // The unused bytes are at the start of the data buffer for big-endian and the + // end of the buffer for little-endian. + if (dest_size < data_size) { + auto extra_bytes = data; +#if defined(ARCH_CPU_LITTLE_ENDIAN) + extra_bytes += dest_size; +#endif // ARCH_CPU_LITTLE_ENDIAN + + uint64_t zero = 0; + size_t extra_bytes_size = data_size - dest_size; + while (extra_bytes_size > 0) { + size_t to_check = std::min(extra_bytes_size, sizeof(zero)); + if (memcmp(extra_bytes, &zero, to_check) != 0) { + LOG(ERROR) << "information loss"; + return false; + } + extra_bytes += to_check; + extra_bytes_size -= to_check; + } + } + + // Zero out the destination, in case it is larger than data. + memset(dest, 0, dest_size); + +#if defined(ARCH_CPU_LITTLE_ENDIAN) + // Copy a prefix of data to a prefix of dest for little-endian + memcpy(dest, data, std::min(dest_size, data_size)); +#else + // or the suffix of data to the suffix of dest for big-endian + if (data_size >= dest_size) { + memcpy(dest, data + data_size - dest_size, dest_size); + } else { + memcpy(dest + dest_size - data_size, data, data_size); + } +#endif // ARCH_CPU_LITTLE_ENDIAN + return true; +} + +} // namespace internal +} // namespace crashpad
diff --git a/third_party/crashpad/crashpad/util/misc/reinterpret_bytes.h b/third_party/crashpad/crashpad/util/misc/reinterpret_bytes.h new file mode 100644 index 0000000..561180d --- /dev/null +++ b/third_party/crashpad/crashpad/util/misc/reinterpret_bytes.h
@@ -0,0 +1,48 @@ +// Copyright 2017 The Crashpad Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef CRASHPAD_UTIL_MISC_REINTERPRET_BYTES_H_ +#define CRASHPAD_UTIL_MISC_REINTERPRET_BYTES_H_ + +#include <stddef.h> + +namespace crashpad { + +namespace internal { + +bool ReinterpretBytesImpl(const char* from, + size_t from_size, + char* to, + size_t to_size); + +} // namespace internal + +//! \brief Copies the bytes of \a from to \to. +//! +//! This function is similar to `bit_cast`, except that it can operate on +//! differently sized types. +//! +//! \return `true` if the copy is possible without information loss, otherwise +//! `false` with a message logged. +template <typename From, typename To> +bool ReinterpretBytes(const From& from, To* to) { + return internal::ReinterpretBytesImpl(reinterpret_cast<const char*>(&from), + sizeof(From), + reinterpret_cast<char*>(to), + sizeof(To)); +} + +} // namespace crashpad + +#endif // CRASHPAD_UTIL_MISC_REINTERPRET_BYTES_H_
diff --git a/third_party/crashpad/crashpad/util/misc/reinterpret_bytes_test.cc b/third_party/crashpad/crashpad/util/misc/reinterpret_bytes_test.cc new file mode 100644 index 0000000..47badb9 --- /dev/null +++ b/third_party/crashpad/crashpad/util/misc/reinterpret_bytes_test.cc
@@ -0,0 +1,104 @@ +// Copyright 2017 The Crashpad Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "util/misc/reinterpret_bytes.h" + +#include <stdint.h> + +#include <limits> + +#include "base/bit_cast.h" +#include "gtest/gtest.h" +#include "util/numeric/int128.h" + +namespace crashpad { +namespace test { +namespace { + +template <typename From, typename To> +void ExpectReinterpret(From from, To* to, To expected) { + ASSERT_TRUE(ReinterpretBytes(from, to)); + EXPECT_EQ(*to, expected); +} + +template <typename From, typename To> +void ExpectUnsignedEqual(From from, To* to) { + To expected = static_cast<To>(from); + ExpectReinterpret(from, to, expected); +} + +TEST(ReinterpretBytes, ToUnsigned) { + uint64_t from64, to64; + uint32_t from32, to32; + + from32 = 0; + ExpectUnsignedEqual(from32, &to32); + ExpectUnsignedEqual(from32, &to64); + + from32 = std::numeric_limits<uint32_t>::max(); + ExpectUnsignedEqual(from32, &to32); + ExpectUnsignedEqual(from32, &to64); + + from64 = 0; + ExpectUnsignedEqual(from64, &to32); + ExpectUnsignedEqual(from64, &to64); + + from64 = std::numeric_limits<uint64_t>::max(); + ExpectUnsignedEqual(from64, &to64); + EXPECT_FALSE(ReinterpretBytes(from64, &to32)); + + uint8_t to8 = std::numeric_limits<uint8_t>::max(); + uint128_struct from128; + from128.lo = to8; + from128.hi = 0; + ExpectReinterpret(from128, &to8, to8); +} + +TEST(ReinterpretBytes, ToSigned) { + uint64_t from64; + int64_t to64; + int32_t to32; + + from64 = 0; + ExpectReinterpret(from64, &to32, static_cast<int32_t>(0)); + ExpectReinterpret(from64, &to64, static_cast<int64_t>(0)); + + to32 = -1; + from64 = bit_cast<uint32_t>(to32); + ExpectReinterpret(from64, &to32, to32); + + to32 = std::numeric_limits<int32_t>::max(); + from64 = bit_cast<uint32_t>(to32); + ExpectReinterpret(from64, &to32, to32); + + to32 = std::numeric_limits<int32_t>::min(); + from64 = bit_cast<uint32_t>(to32); + ExpectReinterpret(from64, &to32, to32); + + to64 = -1; + from64 = bit_cast<uint64_t>(to64); + ExpectReinterpret(from64, &to64, to64); + + to64 = std::numeric_limits<int64_t>::max(); + from64 = bit_cast<uint64_t>(to64); + ExpectReinterpret(from64, &to64, to64); + + to64 = std::numeric_limits<int64_t>::min(); + from64 = bit_cast<uint64_t>(to64); + ExpectReinterpret(from64, &to64, to64); +} + +} // namespace +} // namespace test +} // namespace crashpad
diff --git a/third_party/crashpad/crashpad/util/util.gyp b/third_party/crashpad/crashpad/util/util.gyp index 8e5c7cfe..6a05227 100644 --- a/third_party/crashpad/crashpad/util/util.gyp +++ b/third_party/crashpad/crashpad/util/util.gyp
@@ -120,6 +120,8 @@ 'misc/pdb_structures.h', 'misc/random_string.cc', 'misc/random_string.h', + 'misc/reinterpret_bytes.cc', + 'misc/reinterpret_bytes.h', 'misc/scoped_forbid_return.cc', 'misc/scoped_forbid_return.h', 'misc/symbolic_constants_common.h', @@ -283,7 +285,11 @@ '<(INTERMEDIATE_DIR)/util/mach/<(RULE_INPUT_ROOT)Server.h', ], 'action': [ - 'python', '<@(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)' + 'python', + '<@(_inputs)', + '<(RULE_INPUT_PATH)', + '<@(_outputs)', + '--include=../compat/mac' ], 'process_outputs_as_sources': 1, },
diff --git a/third_party/crashpad/crashpad/util/util_test.gyp b/third_party/crashpad/crashpad/util/util_test.gyp index ef5a681..1b4cff9 100644 --- a/third_party/crashpad/crashpad/util/util_test.gyp +++ b/third_party/crashpad/crashpad/util/util_test.gyp
@@ -71,6 +71,7 @@ 'misc/paths_test.cc', 'misc/scoped_forbid_return_test.cc', 'misc/random_string_test.cc', + 'misc/reinterpret_bytes_test.cc', 'misc/uuid_test.cc', 'net/http_body_gzip_test.cc', 'net/http_body_test.cc',
diff --git a/tools/chrome_proxy/webdriver/lite_page.py b/tools/chrome_proxy/webdriver/lite_page.py index 11e24f5..3006e57 100644 --- a/tools/chrome_proxy/webdriver/lite_page.py +++ b/tools/chrome_proxy/webdriver/lite_page.py
@@ -11,6 +11,51 @@ class LitePage(IntegrationTest): + # Verifies that a Lite Page is served for slow connection if any copyright + # restricted country blacklist is ignored. + # Note: this test is for the CPAT protocol change in M-61. + @ChromeVersionEqualOrAfterM(61) + def testLitePageWithoutCopyrightRestriction(self): + # If it was attempted to run with another experiment, skip this test. + if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment' + in common.ParseFlags().browser_args): + self.skipTest('This test cannot be run with other experiments.') + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + test_driver.AddChromeArg('--enable-features=' + 'DataReductionProxyDecidesTransform') + test_driver.AddChromeArg( + '--force-fieldtrial-params=NetworkQualityEstimator.Enabled:' + 'force_effective_connection_type/2G,' + 'DataReductionProxyServerExperiments.IgnoreCountryBlacklist:' + 'exp/ignore_preview_blacklist') + test_driver.AddChromeArg( + '--force-fieldtrials=NetworkQualityEstimator/Enabled/' + 'DataReductionProxyServerExperiments/IgnoreCountryBlacklist') + + test_driver.LoadURL('http://check.googlezip.net/test.html') + + lite_page_responses = 0 + for response in test_driver.GetHTTPResponses(): + # Verify client sends ignore directive on every request for session. + self.assertIn('exp=ignore_preview_blacklist', + response.request_headers['chrome-proxy']) + self.assertEqual('2G', response.request_headers['chrome-proxy-ect']) + if response.url.endswith('html'): + self.assertTrue(self.checkLitePageResponse(response)) + lite_page_responses = lite_page_responses + 1 + # Expect no fallback page policy + if 'chrome-proxy' in response.response_headers: + self.assertNotIn('page-policies', + response.response_headers['chrome-proxy']) + else: + # No subresources should accept transforms. + self.assertNotIn('chrome-proxy-accept-transform', + response.request_headers) + + # Verify that a Lite Page response for the main frame was seen. + self.assertEqual(1, lite_page_responses) + # Checks that a Lite Page is served and the force_lite_page experiment # directive is provided when always-on. def testLitePageForcedExperiment(self): @@ -51,7 +96,6 @@ # Verify that a Lite Page response for the main frame was seen. self.assertEqual(1, lite_page_responses) - # Checks that a Lite Page is not served for the Cellular-Only option but # not on cellular connection. def testLitePageNotAcceptedForCellularOnlyFlag(self): @@ -177,12 +221,9 @@ 'DataReductionProxyDecidesTransform') test_driver.AddChromeArg('--force-fieldtrial-params=' 'NetworkQualityEstimator.Enabled:' - 'force_effective_connection_type/Slow2G,' - 'DataCompressionProxyLoFi.Enabled_Preview:' - 'effective_connection_type/2G') + 'force_effective_connection_type/Slow2G') test_driver.AddChromeArg('--force-fieldtrials=' - 'NetworkQualityEstimator/Enabled/' - 'DataCompressionProxyLoFi/Enabled_Preview') + 'NetworkQualityEstimator/Enabled/') test_driver.LoadURL('http://check.googlezip.net/lite-page-fallback') @@ -207,21 +248,20 @@ self.assertNotEqual(0, lofi_resource) self.assertNotEqual(0, lofi_resource) - # Checks that the server provides Lite Page for a 2G connection. + # Checks that the server provides a preview (either Lite Page or fallback + # to LoFi) for a 2G connection. # Note: this test is for the CPAT protocol change in M-61. - def testLitePageProvidedForSlowConnection(self): + @ChromeVersionEqualOrAfterM(61) + def testPreviewProvidedForSlowConnection(self): with TestDriver() as test_driver: test_driver.AddChromeArg('--enable-spdy-proxy-auth') test_driver.AddChromeArg('--enable-features=' 'DataReductionProxyDecidesTransform') test_driver.AddChromeArg('--force-fieldtrial-params=' 'NetworkQualityEstimator.Enabled:' - 'force_effective_connection_type/2G,' - 'DataCompressionProxyLoFi.Enabled_Preview:' - 'effective_connection_type/2G') + 'force_effective_connection_type/2G') test_driver.AddChromeArg('--force-fieldtrials=' - 'NetworkQualityEstimator/Enabled/' - 'DataCompressionProxyLoFi/Enabled_Preview') + 'NetworkQualityEstimator/Enabled/') test_driver.LoadURL('http://check.googlezip.net/test.html') @@ -237,26 +277,22 @@ response.response_headers['chrome-proxy']) page_policies_responses = page_policies_responses + 1 - # TODO(dougarnett): add specific response check if we can control - # whether weblite supported or not for the client (b/62444738). self.assertTrue(lite_page_responses == 1 or page_policies_responses == 1) - # Checks that the server does not provide Lite Page nor fallback - # for a fast connection. + # Checks that the server does not provide a preview (neither Lite Page nor + # fallback to LoFi) for a fast connection. # Note: this test is for the CPAT protocol change in M-61. - def testLitePageNotProvidedForFastConnection(self): + @ChromeVersionEqualOrAfterM(61) + def testPreviewNotProvidedForFastConnection(self): with TestDriver() as test_driver: test_driver.AddChromeArg('--enable-spdy-proxy-auth') test_driver.AddChromeArg('--enable-features=' 'DataReductionProxyDecidesTransform') test_driver.AddChromeArg('--force-fieldtrial-params=' 'NetworkQualityEstimator.Enabled:' - 'force_effective_connection_type/4G,' - 'DataCompressionProxyLoFi.Enabled_Preview:' - 'effective_connection_type/2G') + 'force_effective_connection_type/4G') test_driver.AddChromeArg('--force-fieldtrials=' - 'NetworkQualityEstimator/Enabled/' - 'DataCompressionProxyLoFi/Enabled_Preview') + 'NetworkQualityEstimator/Enabled/') test_driver.LoadURL('http://check.googlezip.net/test.html')
diff --git a/tools/chrome_proxy/webdriver/lofi.py b/tools/chrome_proxy/webdriver/lofi.py index ac1198ad..5325ab9 100644 --- a/tools/chrome_proxy/webdriver/lofi.py +++ b/tools/chrome_proxy/webdriver/lofi.py
@@ -6,7 +6,7 @@ from common import TestDriver from common import IntegrationTest from decorators import ChromeVersionBeforeM - +from decorators import ChromeVersionEqualOrAfterM class LoFi(IntegrationTest): @@ -185,6 +185,7 @@ # Checks that LoFi images are served and the force empty image experiment # directive is provided when LoFi is always-on without Lite Pages enabled. + @ChromeVersionEqualOrAfterM(61) def testLoFiForcedExperiment(self): # If it was attempted to run with another experiment, skip this test. if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment' @@ -193,6 +194,15 @@ with TestDriver() as test_driver: test_driver.AddChromeArg('--enable-spdy-proxy-auth') test_driver.AddChromeArg('--data-reduction-proxy-lo-fi=always-on') + test_driver.AddChromeArg('--enable-features=' + 'DataReductionProxyDecidesTransform') + + # Ensure fast network (4G) to ensure force flag ignores ECT. + test_driver.AddChromeArg('--force-fieldtrial-params=' + 'NetworkQualityEstimator.Enabled:' + 'force_effective_connection_type/4G') + test_driver.AddChromeArg('--force-fieldtrials=NetworkQualityEstimator/' + 'Enabled') test_driver.LoadURL('http://check.googlezip.net/static/index.html') @@ -201,10 +211,12 @@ self.assertIn('exp=force_page_policies_empty_image', response.request_headers['chrome-proxy']) if response.url.endswith('html'): - # TODO(dougarnett): Check page-policies response when server supports + # Verify that the server provides the fallback directive + self.assertIn('chrome-proxy', response.response_headers) + self.assertIn('page-policies=empty-image', + response.response_headers['chrome-proxy']) continue if response.url.endswith('png'): - # TODO(dougarnett): Set 4G ECT when server supports force empty image self.checkLoFiResponse(response, True) lofi_responses = lofi_responses + 1 @@ -213,6 +225,7 @@ # Checks that Client LoFi resource requests have the Intervention header # (in case page has https images that may not be fully loaded). + @ChromeVersionEqualOrAfterM(61) def testClientLoFiInterventionHeader(self): with TestDriver() as test_driver: test_driver.AddChromeArg('--enable-spdy-proxy-auth')
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index 52903356c..3fceb0f 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -5192,7 +5192,9 @@ <action name="InProductHelp.NotifyEvent.IPH_DataSaverPreview"> <owner>nyquist@chromium.org</owner> <owner>xingliu@chromium.org</owner> - <description>The user triggered an event in in-product help.</description> + <description> + A event related to the new tab in-product help experiment. + </description> </action> <action name="InProductHelp.NotifyEvent.IPH_DownloadHome"> @@ -5207,36 +5209,40 @@ <description>The user triggered an event in in-product help.</description> </action> +<action name="InProductHelp.NotifyEvent.IPH_NewTab"> + <owner>nyquist@chromium.org</owner> + <owner>xingliu@chromium.org</owner> + <description>The user triggered an event in in-product help.</description> +</action> + <action name="InProductHelp.NotifyUsedEvent.IPH_DataSaverDetail"> <owner>nyquist@chromium.org</owner> <owner>xingliu@chromium.org</owner> - <description> - The user triggered an used event in in-product help. - </description> + <description>The user triggered a used event in in-product help.</description> </action> <action name="InProductHelp.NotifyUsedEvent.IPH_DataSaverPreview"> <owner>nyquist@chromium.org</owner> <owner>xingliu@chromium.org</owner> - <description> - The user triggered an used event in in-product help. - </description> + <description>The user triggered a used event in in-product help.</description> </action> <action name="InProductHelp.NotifyUsedEvent.IPH_DownloadHome"> <owner>nyquist@chromium.org</owner> <owner>xingliu@chromium.org</owner> - <description> - The user triggered an used event in in-product help. - </description> + <description>The user triggered a used event in in-product help.</description> </action> <action name="InProductHelp.NotifyUsedEvent.IPH_DownloadPage"> <owner>nyquist@chromium.org</owner> <owner>xingliu@chromium.org</owner> - <description> - The user triggered an used event in in-product help. - </description> + <description>The user triggered a used event in in-product help.</description> +</action> + +<action name="InProductHelp.NotifyUsedEvent.IPH_NewTab"> + <owner>nyquist@chromium.org</owner> + <owner>xingliu@chromium.org</owner> + <description>The user triggered a used event in in-product help.</description> </action> <action name="InProductHelp.ShouldTriggerHelpUI.IPH_DataSaverDetail"> @@ -5275,6 +5281,15 @@ </description> </action> +<action name="InProductHelp.ShouldTriggerHelpUI.IPH_NewTab"> + <owner>nyquist@chromium.org</owner> + <owner>xingliu@chromium.org</owner> + <description> + The feature engagement tracker tried to determine whether in-product help + should be shown to the user. + </description> +</action> + <action name="Indent"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index b3245a13..78a757d 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -89722,6 +89722,7 @@ label="In product help data saver detail."/> <suffix name="IPH_DownloadPage" label="In product help download page."/> <suffix name="IPH_DownloadHome" label="In product help download home."/> + <suffix name="IPH_NewTab" label="In product help new tab."/> </histogram_suffixes> <histogram_suffixes name="IPProtocolType" separator="_">
diff --git a/tools/perf/benchmarks/thread_times.py b/tools/perf/benchmarks/thread_times.py index 59ce362..86927de2 100644 --- a/tools/perf/benchmarks/thread_times.py +++ b/tools/perf/benchmarks/thread_times.py
@@ -44,6 +44,9 @@ def Name(cls): return 'thread_times.key_silk_cases' + def GetExpectations(self): + return page_sets.KeySilkCasesStoryExpectations() + @benchmark.Enabled('android', 'linux') class ThreadTimesKeyHitTestCases(_ThreadTimes): @@ -55,6 +58,9 @@ def Name(cls): return 'thread_times.key_hit_test_cases' + def GetExpectations(self): + return page_sets.KeyHitTestCasesStoryExpectations() + @benchmark.Enabled('android') class ThreadTimesFastPathMobileSites(_ThreadTimes): @@ -68,6 +74,9 @@ def Name(cls): return 'thread_times.key_mobile_sites_smooth' + def GetExpectations(self): + return page_sets.KeyMobileSitesStoryExpectations() + @benchmark.Enabled('android') @benchmark.Owner(emails=['vmiura@chromium.org']) @@ -80,6 +89,9 @@ def Name(cls): return 'thread_times.simple_mobile_sites' + def GetExpectations(self): + return page_sets.SimpleMobileSitesStoryExpectations() + @benchmark.Owner(emails=['vmiura@chromium.org']) class ThreadTimesCompositorCases(_ThreadTimes): @@ -97,6 +109,9 @@ def Name(cls): return 'thread_times.tough_compositor_cases' + def GetExpectations(self): + return page_sets.ToughCompositorCaseStoryExpectations() + @benchmark.Enabled('android') @benchmark.Owner(emails=['ykyyip@chromium.org']) @@ -109,6 +124,9 @@ def Name(cls): return 'thread_times.polymer' + def GetExpectations(self): + return page_sets.PolymerThreadTimesStoryExpectations() + @benchmark.Enabled('android') @benchmark.Owner(emails=['skyostil@chromium.org']) @@ -126,6 +144,9 @@ # Only report per-second metrics. return 'per_frame' not in value.name and 'mean_frame' not in value.name + def GetExpectations(self): + return page_sets.KeyIdlePowerCasesStoryExpectations() + @benchmark.Enabled('android') class ThreadTimesKeyNoOpCases(_ThreadTimes): @@ -142,6 +163,9 @@ # Only report per-second metrics. return 'per_frame' not in value.name and 'mean_frame' not in value.name + def GetExpectations(self): + return page_sets.KeyNoOpCasesStoryExpectations() + @benchmark.Owner(emails=['tdresser@chromium.org']) class ThreadTimesToughScrollingCases(_ThreadTimes): @@ -152,3 +176,6 @@ @classmethod def Name(cls): return 'thread_times.tough_scrolling_cases' + + def GetExpectations(self): + return page_sets.ToughScrollingCasesStoryExpectations()
diff --git a/tools/perf/page_sets/key_hit_test_cases.py b/tools/perf/page_sets/key_hit_test_cases.py index d9dd86c..f7bc02b 100644 --- a/tools/perf/page_sets/key_hit_test_cases.py +++ b/tools/perf/page_sets/key_hit_test_cases.py
@@ -43,3 +43,8 @@ super(KeyHitTestCasesPageSet, self).__init__() self.AddStory(PaperCalculatorHitTest(self)) + + +class KeyHitTestCasesStoryExpectations(story.expectations.StoryExpectations): + def SetExpectations(self): + pass
diff --git a/tools/perf/page_sets/key_idle_power_cases.py b/tools/perf/page_sets/key_idle_power_cases.py index 73c90a7..755c0d0 100644 --- a/tools/perf/page_sets/key_idle_power_cases.py +++ b/tools/perf/page_sets/key_idle_power_cases.py
@@ -85,3 +85,8 @@ # Why: Ensure that activity strictly diminishes the longer the idle time. self.AddStory(KeyLongIdlePowerPage( 'file://key_idle_power_cases/set-timeout.html', self, True)) + + +class KeyIdlePowerCasesStoryExpectations(story.expectations.StoryExpectations): + def SetExpectations(self): + pass
diff --git a/tools/perf/page_sets/key_noop_cases.py b/tools/perf/page_sets/key_noop_cases.py index 0d05765..23b921c 100644 --- a/tools/perf/page_sets/key_noop_cases.py +++ b/tools/perf/page_sets/key_noop_cases.py
@@ -60,3 +60,8 @@ # Why: Feeding a stream of touch events to a no-op handler should be cheap. self.AddStory(NoOpTouchScrollPage( 'file://key_noop_cases/no_op_touch_handler.html', self)) + + +class KeyNoOpCasesStoryExpectations(story.expectations.StoryExpectations): + def SetExpectations(self): + pass
diff --git a/tools/perf/page_sets/polymer.py b/tools/perf/page_sets/polymer.py index 853efb99..96cdc4c 100644 --- a/tools/perf/page_sets/polymer.py +++ b/tools/perf/page_sets/polymer.py
@@ -266,3 +266,8 @@ class PolymerRasterizeAndRecordStoryExpectations(story.expectations.StoryExpectations): def SetExpectations(self): pass # No tests disabled. + + +class PolymerThreadTimesStoryExpectations(story.expectations.StoryExpectations): + def SetExpectations(self): + pass # No tests disabled.
diff --git a/tools/perf/page_sets/simple_mobile_sites.py b/tools/perf/page_sets/simple_mobile_sites.py index 0e2b1ea..032e8049d 100644 --- a/tools/perf/page_sets/simple_mobile_sites.py +++ b/tools/perf/page_sets/simple_mobile_sites.py
@@ -31,8 +31,8 @@ with action_runner.CreateGestureInteraction('ScrollAction'): action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300) -class SimpleMobileSitesPageSet(story.StorySet): +class SimpleMobileSitesPageSet(story.StorySet): """ Simple mobile sites """ def __init__(self): @@ -52,3 +52,7 @@ for url in scroll_page_list: self.AddStory(SimpleScrollPage(url, self)) + +class SimpleMobileSitesStoryExpectations(story.expectations.StoryExpectations): + def SetExpectations(self): + pass
diff --git a/tools/perf/page_sets/tough_compositor_cases.py b/tools/perf/page_sets/tough_compositor_cases.py index d49e09e..f5815d1 100644 --- a/tools/perf/page_sets/tough_compositor_cases.py +++ b/tools/perf/page_sets/tough_compositor_cases.py
@@ -77,3 +77,9 @@ for url in wait_urls_list: self.AddStory(ToughCompositorWaitPage(url, self)) + + +class ToughCompositorCaseStoryExpectations( + story.expectations.StoryExpectations): + def SetExpectations(self): + pass
diff --git a/tools/perf/page_sets/tough_scrolling_cases.py b/tools/perf/page_sets/tough_scrolling_cases.py index 0f5e91d..ec62211 100644 --- a/tools/perf/page_sets/tough_scrolling_cases.py +++ b/tools/perf/page_sets/tough_scrolling_cases.py
@@ -55,3 +55,7 @@ speed, self, synthetic_gesture_source)) + +class ToughScrollingCasesStoryExpectations(story.expectations.StoryExpectations): + def SetExpectations(self): + pass
diff --git a/ui/accessibility/ax_enums.idl b/ui/accessibility/ax_enums.idl index f5b0c40..8320bd7 100644 --- a/ui/accessibility/ax_enums.idl +++ b/ui/accessibility/ax_enums.idl
@@ -404,6 +404,7 @@ // Relationships between this element and other elements. activedescendant_id, + details_id, errormessage_id, in_page_link_target_id, member_of_id, @@ -486,7 +487,6 @@ // Relationships between this element and other elements. controls_ids, describedby_ids, - details_ids, flowto_ids, labelledby_ids, radio_group_ids,
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc index 1655b39..35955d2d 100644 --- a/ui/accessibility/ax_node_data.cc +++ b/ui/accessibility/ax_node_data.cc
@@ -92,6 +92,7 @@ bool IsNodeIdIntAttribute(AXIntAttribute attr) { switch (attr) { case AX_ATTR_ACTIVEDESCENDANT_ID: + case AX_ATTR_DETAILS_ID: case AX_ATTR_ERRORMESSAGE_ID: case AX_ATTR_IN_PAGE_LINK_TARGET_ID: case AX_ATTR_MEMBER_OF_ID: @@ -157,7 +158,6 @@ case AX_ATTR_CELL_IDS: case AX_ATTR_CONTROLS_IDS: case AX_ATTR_DESCRIBEDBY_IDS: - case AX_ATTR_DETAILS_IDS: case AX_ATTR_FLOWTO_IDS: case AX_ATTR_INDIRECT_CHILD_IDS: case AX_ATTR_LABELLEDBY_IDS: @@ -624,6 +624,9 @@ case AX_ATTR_ACTIVEDESCENDANT_ID: result += " activedescendant=" + value; break; + case AX_ATTR_DETAILS_ID: + result += " details=" + value; + break; case AX_ATTR_ERRORMESSAGE_ID: result += " errormessage=" + value; break; @@ -892,9 +895,6 @@ case AX_ATTR_DESCRIBEDBY_IDS: result += " describedby_ids=" + IntVectorToString(values); break; - case AX_ATTR_DETAILS_IDS: - result += " details_ids=" + IntVectorToString(values); - break; case AX_ATTR_FLOWTO_IDS: result += " flowto_ids=" + IntVectorToString(values); break;
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc index 07beed6..144b9f93 100644 --- a/ui/accessibility/ax_tree_unittest.cc +++ b/ui/accessibility/ax_tree_unittest.cc
@@ -749,7 +749,7 @@ initial_state.nodes.resize(1); initial_state.nodes[0].id = 1; initial_state.nodes[0].AddIntListAttribute(AX_ATTR_CONTROLS_IDS, one); - initial_state.nodes[0].AddIntListAttribute(AX_ATTR_DETAILS_IDS, two); + initial_state.nodes[0].AddIntListAttribute(AX_ATTR_RADIO_GROUP_IDS, two); AXTree tree(initial_state); FakeAXTreeDelegate fake_delegate; @@ -761,14 +761,14 @@ update0.nodes.resize(1); update0.nodes[0].id = 1; update0.nodes[0].AddIntListAttribute(AX_ATTR_CONTROLS_IDS, two); - update0.nodes[0].AddIntListAttribute(AX_ATTR_DETAILS_IDS, three); + update0.nodes[0].AddIntListAttribute(AX_ATTR_RADIO_GROUP_IDS, three); EXPECT_TRUE(tree.Unserialize(update0)); const std::vector<std::string>& change_log = fake_delegate.attribute_change_log(); ASSERT_EQ(2U, change_log.size()); EXPECT_EQ("controlsIds changed from 1 to 2,2", change_log[0]); - EXPECT_EQ("detailsIds changed from 2,2 to 3", change_log[1]); + EXPECT_EQ("radioGroupIds changed from 2,2 to 3", change_log[1]); FakeAXTreeDelegate fake_delegate2; tree.SetDelegate(&fake_delegate2); @@ -778,7 +778,7 @@ update1.root_id = 1; update1.nodes.resize(1); update1.nodes[0].id = 1; - update1.nodes[0].AddIntListAttribute(AX_ATTR_DETAILS_IDS, two); + update1.nodes[0].AddIntListAttribute(AX_ATTR_RADIO_GROUP_IDS, two); update1.nodes[0].AddIntListAttribute(AX_ATTR_FLOWTO_IDS, three); EXPECT_TRUE(tree.Unserialize(update1)); @@ -786,7 +786,7 @@ fake_delegate2.attribute_change_log(); ASSERT_EQ(3U, change_log2.size()); EXPECT_EQ("controlsIds changed from 2,2 to ", change_log2[0]); - EXPECT_EQ("detailsIds changed from 3 to 2,2", change_log2[1]); + EXPECT_EQ("radioGroupIds changed from 3 to 2,2", change_log2[1]); EXPECT_EQ("flowtoIds changed from to 3", change_log2[2]); tree.SetDelegate(NULL);
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc index 18d5314..414c2c9 100644 --- a/ui/gfx/canvas.cc +++ b/ui/gfx/canvas.cc
@@ -189,8 +189,8 @@ canvas_->translate(SkIntToScalar(offset.x()), SkIntToScalar(offset.y())); } -void Canvas::Scale(int x_scale, int y_scale) { - canvas_->scale(SkIntToScalar(x_scale), SkIntToScalar(y_scale)); +void Canvas::Scale(float x_scale, float y_scale) { + canvas_->scale(SkFloatToScalar(x_scale), SkFloatToScalar(y_scale)); } void Canvas::DrawColor(SkColor color) {
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h index a70ce25f..15248b323 100644 --- a/ui/gfx/canvas.h +++ b/ui/gfx/canvas.h
@@ -191,7 +191,7 @@ void Translate(const Vector2d& offset); - void Scale(int x_scale, int y_scale); + void Scale(float x_scale, float y_scale); // Fills the entire canvas' bitmap (restricted to current clip) with // specified |color| using a transfer mode of SkBlendMode::kSrcOver.