diff --git a/DEPS b/DEPS
index eaa6bee7..80a72c87 100644
--- a/DEPS
+++ b/DEPS
@@ -87,7 +87,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling NaCl
   # and whatever else without interference from each other.
-  'nacl_revision': '5e27c212d3514b77f4fd2c603cb63497ef1b7b4f',
+  'nacl_revision': 'fc99150025783f0e8409f9eff6c04daaf6ccbbeb',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling dEQP
   # and whatever else without interference from each other.
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index 1d9e172..de8cbbad 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -575,6 +575,7 @@
             '../mojo/mojo_edk_tests.gyp:mojo_public_system_unittests_run',
             '../mojo/mojo_edk_tests.gyp:mojo_public_utility_unittests_run',
             '../net/net.gyp:net_unittests_run',
+            '../ppapi/ppapi_internal.gyp:ppapi_unittests_run',
             '../printing/printing.gyp:printing_unittests_run',
             '../remoting/remoting.gyp:remoting_unittests_run',
             '../skia/skia_tests.gyp:skia_unittests_run',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index cf2a5b7..1b357c2 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -3231,6 +3231,36 @@
           ],
         },
         {
+          'target_name': 'gpu_tests_base',
+          'type': 'none',
+          'dependencies': [
+            # depend on icu to fix races. http://crbug.com/417583
+            '../third_party/icu/icu.gyp:icudata',
+          ],
+          # Set this so we aren't included as a target in files that
+          # include this file via a wildcard (such as chrome_tests.gypi).
+          # If we didn't do this the All target ends up with a rule that
+          # makes it unnecessarily compile in certain situations.
+          'suppress_wildcard': 1,
+          'direct_dependent_settings': {
+            'includes': [
+              '../build/isolate.gypi',
+            ],
+          },
+        },
+        {
+          # GN: //gpu:angle_unittests_run
+          'target_name': 'angle_unittests_run',
+          'type': 'none',
+          'dependencies': [
+            '../gpu/gpu.gyp:angle_unittests',
+            'gpu_tests_base',
+          ],
+          'sources': [
+            'angle_unittests.isolate',
+          ],
+        },
+        {
           'target_name': 'browser_tests_run',
           'type': 'none',
           'dependencies': [
@@ -3358,36 +3388,6 @@
         ['archive_gpu_tests==1', {
           'targets': [
             {
-              'target_name': 'gpu_tests_base',
-              'type': 'none',
-              'dependencies': [
-                # depend on icu to fix races. http://crbug.com/417583
-                '../third_party/icu/icu.gyp:icudata',
-              ],
-              # Set this so we aren't included as a target in files that
-              # include this file via a wildcard (such as chrome_tests.gypi).
-              # If we didn't do this the All target ends up with a rule that
-              # makes it unnecessarily compile in certain situations.
-              'suppress_wildcard': 1,
-              'direct_dependent_settings': {
-                'includes': [
-                  '../build/isolate.gypi',
-                ],
-              },
-            },
-            {
-              # GN: //gpu:angle_unittests_run
-              'target_name': 'angle_unittests_run',
-              'type': 'none',
-              'dependencies': [
-                '../gpu/gpu.gyp:angle_unittests',
-                'gpu_tests_base',
-              ],
-              'sources': [
-                'angle_unittests.isolate',
-              ],
-            },
-            {
               # GN: //gpu:gl_tests_run
               'target_name': 'gl_tests_run',
               'type': 'none',
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index f767e77d..acc92f33 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -278,8 +278,6 @@
   if (submitted_form->IsAutofillable())
     ImportFormData(*submitted_form);
 
-  recently_unmasked_cards_.clear();
-
   return true;
 }
 
@@ -835,7 +833,6 @@
   if (!real_pan.empty()) {
     DCHECK_EQ(AutofillClient::SUCCESS, result);
     credit_card_form_event_logger_->OnDidFillSuggestion(unmask_request_.card);
-    recently_unmasked_cards_.push_back(unmask_request_.card);
     unmask_request_.card.set_record_type(CreditCard::FULL_SERVER_CARD);
     unmask_request_.card.SetNumber(base::UTF8ToUTF16(real_pan));
     if (!unmask_request_.user_response.exp_month.empty()) {
@@ -990,13 +987,6 @@
   if (!imported_credit_card)
     return;
 
-  // Don't offer to save any cards that were recently unmasked.
-  for (const CreditCard& unmasked_card : recently_unmasked_cards_) {
-    if (unmasked_card.TypeAndLastFourDigits() ==
-        imported_credit_card->TypeAndLastFourDigits())
-      return;
-  }
-
   if (!IsCreditCardUploadEnabled()) {
     // This block will only be reached if we have observed a new card. In this
     // case, ImportFormData will return false if the card matches one already
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h
index 7f21268..26d8cee 100644
--- a/components/autofill/core/browser/autofill_manager.h
+++ b/components/autofill/core/browser/autofill_manager.h
@@ -493,10 +493,6 @@
   payments::PaymentsClient::UploadRequestDetails upload_request_;
   bool user_did_accept_upload_prompt_;
 
-  // Masked copies of recently unmasked cards, to help avoid double-asking to
-  // save the card (in the unmask prompt and in the save prompt after submit).
-  std::vector<CreditCard> recently_unmasked_cards_;
-
 #ifdef ENABLE_FORM_DEBUG_DUMP
   // The last few autofilled forms (key/value pairs) submitted, for debugging.
   // TODO(brettw) this should be removed. See DumpAutofillData.
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index 7e83d99..7d77bf55 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -901,7 +901,6 @@
                             "2017");
     card->SetTypeForMaskedCard(kVisaCard);
 
-    EXPECT_CALL(autofill_client_, ConfirmSaveCreditCardLocally(_, _)).Times(0);
     EXPECT_CALL(*autofill_driver_, SendFormDataToRenderer(_, _, _))
         .Times(AtLeast(1));
     autofill_manager_->FillOrPreviewCreditCardForm(
@@ -3833,25 +3832,6 @@
   autofill_manager_->OnDidGetRealPan(AutofillClient::SUCCESS,
                                      "4012888888881881");
   autofill_manager_->OnFormSubmitted(form);
-
-  // The rest of this test is a regression test for http://crbug.com/483602.
-  // The goal is not to crash.
-  EXPECT_CALL(*autofill_driver_, SendFormDataToRenderer(_, _, _));
-  for (size_t i = 0; i < form.fields.size(); ++i) {
-    form.fields[i].value.clear();
-  }
-  autofill_manager_->FillOrPreviewCreditCardForm(
-      AutofillDriver::FORM_DATA_ACTION_FILL, kDefaultPageID, form,
-      form.fields[1], card);
-  autofill_manager_->OnUnmaskResponse(response);
-  autofill_manager_->OnDidGetRealPan(AutofillClient::SUCCESS,
-                                     "4012888888881881");
-
-  form = FormData();
-  test::CreateTestAddressFormData(&form);
-  FormsSeen(std::vector<FormData>(1, form));
-  ManuallyFillAddressForm("Flo", "Master", "77401", "US", &form);
-  autofill_manager_->OnFormSubmitted(form);
 }
 
 TEST_F(AutofillManagerTest, FillInUpdatedExpirationDate) {
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index 315cec1..d2e69a1 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -1394,13 +1394,9 @@
     }
   }
 
-  // Also don't offer to save if we already have this stored as a full wallet
-  // card. Note that we will offer to save masked server cards, as long as the
-  // user re-typed the info by hand. See AutofillManager's
-  // |recently_unmasked_cards_|.
+  // Also don't offer to save if we already have this stored as a server card.
   for (const CreditCard* card : server_credit_cards_) {
-    if (card->record_type() == CreditCard::FULL_SERVER_CARD &&
-        candidate_credit_card.IsLocalDuplicateOfServerCard(*card))
+    if (candidate_credit_card.IsLocalDuplicateOfServerCard(*card))
       return false;
   }
 
diff --git a/components/autofill/core/browser/personal_data_manager_unittest.cc b/components/autofill/core/browser/personal_data_manager_unittest.cc
index 33358a5..28deb80 100644
--- a/components/autofill/core/browser/personal_data_manager_unittest.cc
+++ b/components/autofill/core/browser/personal_data_manager_unittest.cc
@@ -3581,8 +3581,10 @@
       .WillOnce(QuitMainMessageLoop());
   base::MessageLoop::current()->Run();
 
-  // A valid credit card form. A user re-types one of their masked cards.
-  // We should offer to save.
+  // A valid credit card form. A user re-enters one of their masked cards.
+  // We shouldn't offer to save. It's possible this is actually a different card
+  // but it's very unlikely. And these circumstances will also arise if the user
+  // has the same card available locally and synced from payments.
   FormData form1;
   FormFieldData field;
   test::CreateTestFormField("Name on card:", "name_on_card", "John Dillinger",
@@ -3599,12 +3601,13 @@
   FormStructure form_structure1(form1);
   form_structure1.DetermineHeuristicTypes();
   scoped_ptr<CreditCard> imported_credit_card;
-  EXPECT_TRUE(personal_data_->ImportFormData(form_structure1, false,
+  EXPECT_FALSE(personal_data_->ImportFormData(form_structure1, false,
                                              &imported_credit_card));
-  EXPECT_TRUE(imported_credit_card);
+  EXPECT_FALSE(imported_credit_card);
 
   // A user re-types (or fills with) an unmasked card. Don't offer to save
-  // again.
+  // here, either. Since it's unmasked, we know for certain that it's the same
+  // card.
   FormData form2;
   test::CreateTestFormField("Name on card:", "name_on_card", "Clyde Barrow",
                             "text", &field);
diff --git a/content/browser/bluetooth/bluetooth_allowed_devices_map.cc b/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
index e2c8ebc..cd2e789 100644
--- a/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
+++ b/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
@@ -10,6 +10,7 @@
 #include "base/logging.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
+#include "content/browser/bluetooth/bluetooth_blacklist.h"
 #include "content/common/bluetooth/bluetooth_scan_filter.h"
 #include "crypto/random.h"
 #include "device/bluetooth/bluetooth_uuid.h"
@@ -140,6 +141,9 @@
     const url::Origin& origin,
     const std::string& device_id,
     const std::string& service_uuid) const {
+  if (BluetoothBlacklist::Get().IsExcluded(BluetoothUUID(service_uuid)))
+    return false;
+
   auto id_map_iter = origin_to_device_id_to_services_map_.find(origin);
   if (id_map_iter == origin_to_device_id_to_services_map_.end()) {
     return false;
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
index c5fca31a..481cdbab 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -20,6 +20,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/browser/bad_message.h"
+#include "content/browser/bluetooth/bluetooth_blacklist.h"
 #include "content/browser/bluetooth/bluetooth_metrics.h"
 #include "content/browser/bluetooth/first_device_bluetooth_chooser.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
@@ -1007,6 +1008,20 @@
   for (const BluetoothUUID& service : optional_services)
     VLOG(1) << "\t" << service.value();
 
+  // Check blacklist to reject invalid filters and adjust optional_services.
+  if (BluetoothBlacklist::Get().IsExcluded(filters)) {
+    RecordRequestDeviceOutcome(
+        UMARequestDeviceOutcome::BLACKLISTED_SERVICE_IN_FILTER);
+    Send(new BluetoothMsg_RequestDeviceError(
+        thread_id, request_id,
+        WebBluetoothError::RequestDeviceWithBlacklistedUUID));
+    return;
+  }
+  std::vector<BluetoothUUID> optional_services_blacklist_filtered(
+      optional_services);
+  BluetoothBlacklist::Get().RemoveExcludedUuids(
+      &optional_services_blacklist_filtered);
+
   RenderFrameHostImpl* render_frame_host =
       RenderFrameHostImpl::FromID(render_process_id_, frame_routing_id);
 
@@ -1050,7 +1065,7 @@
   // chooser.
   RequestDeviceSession* const session = new RequestDeviceSession(
       thread_id, request_id, render_frame_host->GetLastCommittedOrigin(),
-      filters, optional_services);
+      filters, optional_services_blacklist_filtered);
   int chooser_id = request_device_sessions_.Add(session);
 
   BluetoothChooser::EventHandler chooser_event_handler =
diff --git a/content/browser/bluetooth/bluetooth_metrics.h b/content/browser/bluetooth/bluetooth_metrics.h
index 5786ccc..fa621a7f 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -63,6 +63,7 @@
   CHOSEN_DEVICE_VANISHED = 8,
   BLUETOOTH_CHOOSER_CANCELLED = 9,
   BLUETOOTH_CHOOSER_DENIED_PERMISSION = 10,
+  BLACKLISTED_SERVICE_IN_FILTER = 11,
   // NOTE: Add new requestDevice() outcomes immediately above this line. Make
   // sure to update the enum list in
   // tools/metrics/histograms/histograms.xml accordingly.
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 9b1d8de..3a3f7e3 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -40,20 +40,6 @@
 
 namespace content {
 
-namespace {
-
-#if defined(USE_AURA)
-blink::WebGestureEvent CreateFlingCancelEvent(double time_stamp) {
-  blink::WebGestureEvent gesture_event;
-  gesture_event.timeStampSeconds = time_stamp;
-  gesture_event.type = blink::WebGestureEvent::GestureFlingCancel;
-  gesture_event.sourceDevice = blink::WebGestureDeviceTouchscreen;
-  return gesture_event;
-}
-#endif  // defined(USE_AURA)
-
-}  // namespace
-
 RenderWidgetHostViewGuest::RenderWidgetHostViewGuest(
     RenderWidgetHost* widget_host,
     BrowserPluginGuest* guest,
@@ -561,52 +547,6 @@
   base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
 }
 
-bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer(
-    ui::GestureEvent* gesture) {
-#if defined(USE_AURA)
-  if (!host_)
-    return false;
-
-  if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN ||
-      gesture->type() == ui::ET_GESTURE_PINCH_UPDATE ||
-      gesture->type() == ui::ET_GESTURE_PINCH_END) && !pinch_zoom_enabled_) {
-    return true;
-  }
-
-  blink::WebGestureEvent web_gesture =
-      MakeWebGestureEventFromUIEvent(*gesture);
-  const gfx::Point& client_point = gesture->location();
-  const gfx::Point& screen_point = gesture->location();
-
-  web_gesture.x = client_point.x();
-  web_gesture.y = client_point.y();
-  web_gesture.globalX = screen_point.x();
-  web_gesture.globalY = screen_point.y();
-
-  if (web_gesture.type == blink::WebGestureEvent::Undefined)
-    return false;
-  if (web_gesture.type == blink::WebGestureEvent::GestureTapDown) {
-    host_->ForwardGestureEvent(
-        CreateFlingCancelEvent(gesture->time_stamp().InSecondsF()));
-  }
-  host_->ForwardGestureEvent(web_gesture);
-  return true;
-#else
-  return false;
-#endif
-}
-
-void RenderWidgetHostViewGuest::ProcessGestures(
-    ui::GestureRecognizer::Gestures* gestures) {
-  if ((gestures == NULL) || gestures->empty())
-    return;
-  for (ui::GestureRecognizer::Gestures::iterator g_it = gestures->begin();
-      g_it != gestures->end();
-      ++g_it) {
-    ForwardGestureEventToRenderer(*g_it);
-  }
-}
-
 RenderWidgetHostViewBase*
 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
   return static_cast<RenderWidgetHostViewBase*>(
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index a087a011..3c82fcd 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -155,12 +155,6 @@
   // Destroys this view without calling |Destroy| on |platform_view_|.
   void DestroyGuestView();
 
-  // Builds and forwards a WebKitGestureEvent to the renderer.
-  bool ForwardGestureEventToRenderer(ui::GestureEvent* gesture);
-
-  // Process all of the given gestures (passes them on to renderer)
-  void ProcessGestures(ui::GestureRecognizer::Gestures* gestures);
-
   RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const;
 
   void OnHandleInputEvent(RenderWidgetHostImpl* embedder,
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
index 4e62b29..cced25f3d 100644
--- a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
@@ -64,6 +64,7 @@
 const char kGenericAccessServiceUUID[] = "1800";
 const char kGlucoseServiceUUID[] = "1808";
 const char kHeartRateServiceUUID[] = "180d";
+const char kHumanInterfaceDeviceServiceUUID[] = "1812";
 const char kTxPowerServiceUUID[] = "1804";
 const char kHeartRateMeasurementUUID[] = "2a37";
 const char kBodySensorLocation[] = "2a38";
@@ -151,6 +152,8 @@
     return GetMissingCharacteristicHeartRateAdapter();
   if (fake_adapter_name == "HeartRateAdapter")
     return GetHeartRateAdapter();
+  if (fake_adapter_name == "HeartRateAndHIDAdapter")
+    return GetHeartRateAndHIDAdapter();
   if (fake_adapter_name == "FailingConnectionsAdapter")
     return GetFailingConnectionsAdapter();
   if (fake_adapter_name == "FailingGATTOperationsAdapter")
@@ -486,6 +489,27 @@
 
 // static
 scoped_refptr<NiceMockBluetoothAdapter>
+LayoutTestBluetoothAdapterProvider::GetHeartRateAndHIDAdapter() {
+  scoped_refptr<NiceMockBluetoothAdapter> adapter(GetEmptyAdapter());
+
+  BluetoothDevice::UUIDList uuids;
+  uuids.push_back(BluetoothUUID(kHeartRateServiceUUID));
+  uuids.push_back(BluetoothUUID(kHumanInterfaceDeviceServiceUUID));
+
+  scoped_ptr<NiceMockBluetoothDevice> device(
+      GetConnectableDevice(adapter.get(), "Heart Rate And HID Device", uuids));
+
+  device->AddMockService(GetGenericAccessService(adapter.get(), device.get()));
+  device->AddMockService(GetHeartRateService(adapter.get(), device.get()));
+  device->AddMockService(
+      GetBaseGATTService(device.get(), kHumanInterfaceDeviceServiceUUID));
+  adapter->AddMockDevice(std::move(device));
+
+  return adapter;
+}
+
+// static
+scoped_refptr<NiceMockBluetoothAdapter>
 LayoutTestBluetoothAdapterProvider::GetFailingConnectionsAdapter() {
   scoped_refptr<NiceMockBluetoothAdapter> adapter(GetEmptyAdapter());
 
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
index 85b7d78e..2beaf6f 100644
--- a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
@@ -205,6 +205,23 @@
   static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
   GetHeartRateAdapter();
 
+  // |HeartRateAndHIDAdapter|
+  // Inherits from |EmptyAdapter|
+  // Internal Structure:
+  //   - |ConnectableDevice|(adapter, "Heart Rate And HID Device", uuids)
+  //      - Advertised UUIDs:
+  //         - Heart Rate UUID (0x180d)
+  //         - Human Interface Device UUID (0x1812) (a blacklisted service)
+  //      - Services:
+  //         - Generic Access Service - Characteristics as described in
+  //           GetGenericAccessService.
+  //         - Heart Rate Service - Characteristics as described in
+  //           GetHeartRateService.
+  //         - Human Interface Device Service - No characteristics needed
+  //           because the service is blacklisted.
+  static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
+  GetHeartRateAndHIDAdapter();
+
   // |DelayedServicesDiscoveryAdapter|
   // Inherits from |EmptyAdapter|
   // Internal Structure:
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h
index b584fc8..2847438 100644
--- a/net/cookies/cookie_store_unittest.h
+++ b/net/cookies/cookie_store_unittest.h
@@ -41,7 +41,7 @@
 
 // The CookieStoreTestTraits must have the following members:
 // struct CookieStoreTestTraits {
-//   // Factory function.
+//   // Factory function. Will be called at most once per test.
 //   static scoped_refptr<CookieStore> Create();
 //
 //   // The cookie store is a CookieMonster. Only used to test
@@ -275,8 +275,11 @@
     return callback.result();
   }
 
+  // Returns the CookieStore for the test - each test only uses one CookieStore.
   scoped_refptr<CookieStore> GetCookieStore() {
-    return CookieStoreTestTraits::Create();
+    if (!cookie_store_)
+      cookie_store_ = CookieStoreTestTraits::Create();
+    return cookie_store_;
   }
 
   // Compares two cookie lines.
@@ -326,6 +329,8 @@
       EXPECT_TRUE(tokens.insert(tokenizer.token()).second);
     return tokens;
   }
+
+  scoped_refptr<CookieStore> cookie_store_;
 };
 
 TYPED_TEST_CASE_P(CookieStoreTest);
@@ -511,7 +516,6 @@
 }
 
 // Test that cookies can bet set on higher level domains.
-// http://b/issue?id=896491
 TYPED_TEST_P(CookieStoreTest, ValidSubdomainTest) {
   scoped_refptr<CookieStore> cs(this->GetCookieStore());
   GURL url_abcd("http://a.b.c.d.com");
@@ -541,97 +545,88 @@
 // Test that setting a cookie which specifies an invalid domain has
 // no side-effect. An invalid domain in this context is one which does
 // not match the originating domain.
-// http://b/issue?id=896472
 TYPED_TEST_P(CookieStoreTest, InvalidDomainTest) {
-  {
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url_foobar("http://foo.bar.com");
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url_foobar("http://foo.bar.com");
 
-    // More specific sub-domain than allowed.
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "a=1; domain=.yo.foo.bar.com"));
+  // More specific sub-domain than allowed.
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "a=1; domain=.yo.foo.bar.com"));
 
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "b=2; domain=.foo.com"));
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "c=3; domain=.bar.foo.com"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "b=2; domain=.foo.com"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "c=3; domain=.bar.foo.com"));
 
-    // Different TLD, but the rest is a substring.
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "d=4; domain=.foo.bar.com.net"));
+  // Different TLD, but the rest is a substring.
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "d=4; domain=.foo.bar.com.net"));
 
-    // A substring that isn't really a parent domain.
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "e=5; domain=ar.com"));
+  // A substring that isn't really a parent domain.
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "e=5; domain=ar.com"));
 
-    // Completely invalid domains:
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "f=6; domain=."));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "g=7; domain=/"));
-    EXPECT_FALSE(this->SetCookie(
-        cs.get(), url_foobar, "h=8; domain=http://foo.bar.com"));
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "i=9; domain=..foo.bar.com"));
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "j=10; domain=..bar.com"));
+  // Completely invalid domains:
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "f=6; domain=."));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "g=7; domain=/"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "h=8; domain=http://foo.bar.com"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "i=9; domain=..foo.bar.com"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_foobar, "j=10; domain=..bar.com"));
 
-    // Make sure there isn't something quirky in the domain canonicalization
-    // that supports full URL semantics.
-    EXPECT_FALSE(this->SetCookie(
-        cs.get(), url_foobar, "k=11; domain=.foo.bar.com?blah"));
-    EXPECT_FALSE(this->SetCookie(
-        cs.get(), url_foobar, "l=12; domain=.foo.bar.com/blah"));
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "m=13; domain=.foo.bar.com:80"));
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "n=14; domain=.foo.bar.com:"));
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foobar, "o=15; domain=.foo.bar.com#sup"));
+  // Make sure there isn't something quirky in the domain canonicalization
+  // that supports full URL semantics.
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "k=11; domain=.foo.bar.com?blah"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "l=12; domain=.foo.bar.com/blah"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "m=13; domain=.foo.bar.com:80"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "n=14; domain=.foo.bar.com:"));
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foobar, "o=15; domain=.foo.bar.com#sup"));
 
-    this->MatchCookieLines(std::string(),
-                           this->GetCookies(cs.get(), url_foobar));
-  }
-
-  {
-    // Make sure the cookie code hasn't gotten its subdomain string handling
-    // reversed, missed a suffix check, etc.  It's important here that the two
-    // hosts below have the same domain + registry.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url_foocom("http://foo.com.com");
-    EXPECT_FALSE(
-        this->SetCookie(cs.get(), url_foocom, "a=1; domain=.foo.com.com.com"));
-    this->MatchCookieLines(std::string(),
-                           this->GetCookies(cs.get(), url_foocom));
-  }
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url_foobar));
 }
 
-// Test the behavior of omitting dot prefix from domain, should
-// function the same as FireFox.
-// http://b/issue?id=889898
-TYPED_TEST_P(CookieStoreTest, DomainWithoutLeadingDotTest) {
-  {  // The omission of dot results in setting a domain cookie.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url_hosted("http://manage.hosted.filefront.com");
-    GURL url_filefront("http://www.filefront.com");
-    EXPECT_TRUE(
-        this->SetCookie(cs.get(), url_hosted, "sawAd=1; domain=filefront.com"));
-    this->MatchCookieLines("sawAd=1", this->GetCookies(cs.get(), url_hosted));
-    this->MatchCookieLines("sawAd=1",
-                           this->GetCookies(cs.get(), url_filefront));
-  }
+// Make sure the cookie code hasn't gotten its subdomain string handling
+// reversed, missed a suffix check, etc.  It's important here that the two
+// hosts below have the same domain + registry.
+TYPED_TEST_P(CookieStoreTest, InvalidDomainSameDomainAndRegistry) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url_foocom("http://foo.com.com");
+  EXPECT_FALSE(
+      this->SetCookie(cs.get(), url_foocom, "a=1; domain=.foo.com.com.com"));
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url_foocom));
+}
 
-  {  // Even when the domains match exactly, don't consider it host cookie.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://www.google.com");
-    EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1; domain=www.google.com"));
-    this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
-    this->MatchCookieLines(
-        "a=1", this->GetCookies(cs.get(), GURL("http://sub.www.google.com")));
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(), GURL("http://something-else.com")));
-  }
+// Setting the domain without a dot on a parent domain should add a domain
+// cookie.
+TYPED_TEST_P(CookieStoreTest, DomainWithoutLeadingDotParentDomain) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url_hosted("http://manage.hosted.filefront.com");
+  GURL url_filefront("http://www.filefront.com");
+  EXPECT_TRUE(
+      this->SetCookie(cs.get(), url_hosted, "sawAd=1; domain=filefront.com"));
+  this->MatchCookieLines("sawAd=1", this->GetCookies(cs.get(), url_hosted));
+  this->MatchCookieLines("sawAd=1", this->GetCookies(cs.get(), url_filefront));
+}
+
+// Even when the specified domain matches the domain of the URL exactly, treat
+// it as setting a domain cookie.
+TYPED_TEST_P(CookieStoreTest, DomainWithoutLeadingDotSameDomain) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://www.google.com");
+  EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1; domain=www.google.com"));
+  this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
+  this->MatchCookieLines(
+      "a=1", this->GetCookies(cs.get(), GURL("http://sub.www.google.com")));
+  this->MatchCookieLines(
+      std::string(),
+      this->GetCookies(cs.get(), GURL("http://something-else.com")));
 }
 
 // Test that the domain specified in cookie string is treated case-insensitive
-// http://b/issue?id=896475.
 TYPED_TEST_P(CookieStoreTest, CaseInsensitiveDomainTest) {
     scoped_refptr<CookieStore> cs(this->GetCookieStore());
   GURL url("http://www.google.com");
@@ -642,128 +637,121 @@
 
 TYPED_TEST_P(CookieStoreTest, TestIpAddress) {
   GURL url_ip("http://1.2.3.4/weee");
-  {
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    EXPECT_TRUE(this->SetCookie(cs.get(), url_ip, kValidCookieLine));
-    this->MatchCookieLines("A=B", this->GetCookies(cs.get(), url_ip));
-  }
-
-  {  // IP addresses should not be able to set domain cookies.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_ip, "b=2; domain=.1.2.3.4"));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_ip, "c=3; domain=.3.4"));
-    this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url_ip));
-    // It should be allowed to set a cookie if domain= matches the IP address
-    // exactly.  This matches IE/Firefox, even though it seems a bit wrong.
-    EXPECT_FALSE(this->SetCookie(cs.get(), url_ip, "b=2; domain=1.2.3.3"));
-    this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url_ip));
-    EXPECT_TRUE(this->SetCookie(cs.get(), url_ip, "b=2; domain=1.2.3.4"));
-    this->MatchCookieLines("b=2", this->GetCookies(cs.get(), url_ip));
-  }
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  EXPECT_TRUE(this->SetCookie(cs.get(), url_ip, kValidCookieLine));
+  this->MatchCookieLines("A=B", this->GetCookies(cs.get(), url_ip));
 }
 
-// Test host cookies, and setting of cookies on TLD.
-TYPED_TEST_P(CookieStoreTest, TestNonDottedAndTLD) {
-  if (TypeParam::supports_non_dotted_domains) {
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://com/");
-    // Allow setting on "com", (but only as a host cookie).
-    EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1"));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.com"));
+// IP addresses should not be able to set domain cookies.
+TYPED_TEST_P(CookieStoreTest, TestIpAddressNoDomainCookies) {
+  GURL url_ip("http://1.2.3.4/weee");
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_ip, "b=2; domain=.1.2.3.4"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_ip, "c=3; domain=.3.4"));
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url_ip));
+  // It should be allowed to set a cookie if domain= matches the IP address
+  // exactly.  This matches IE/Firefox, even though it seems a bit wrong.
+  EXPECT_FALSE(this->SetCookie(cs.get(), url_ip, "b=2; domain=1.2.3.3"));
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url_ip));
+  EXPECT_TRUE(this->SetCookie(cs.get(), url_ip, "b=2; domain=1.2.3.4"));
+  this->MatchCookieLines("b=2", this->GetCookies(cs.get(), url_ip));
+}
 
-    this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
-    // Make sure it doesn't show up for a normal .com, it should be a host
-    // not a domain cookie.
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(), GURL("http://hopefully-no-cookies.com/")));
-    this->MatchCookieLines(std::string(),
-                           this->GetCookies(cs.get(), GURL("http://.com/")));
-  }
+// Test a TLD setting cookies on itself.
+TYPED_TEST_P(CookieStoreTest, TestTLD) {
+  if (!TypeParam::supports_non_dotted_domains)
+    return;
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://com/");
 
-  if (TypeParam::supports_non_dotted_domains) {
-    // Exact matches between the domain attribute and the host are treated as
-    // host cookies, not domain cookies.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://com/");
-    EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1; domain=com"));
+  // Allow setting on "com", (but only as a host cookie).
+  EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1"));
+  // Domain cookies can't be set.
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.com"));
+  // Exact matches between the domain attribute and the host are treated as
+  // host cookies, not domain cookies.
+  EXPECT_TRUE(this->SetCookie(cs.get(), url, "c=3; domain=com"));
 
-    this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
-    // Make sure it doesn't show up for a normal .com, it should be a host
-    // not a domain cookie.
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(), GURL("http://hopefully-no-cookies.com/")));
-    this->MatchCookieLines(std::string(),
-                           this->GetCookies(cs.get(), GURL("http://.com/")));
-  }
+  this->MatchCookieLines("a=1; c=3", this->GetCookies(cs.get(), url));
 
-  {
-    // http://com. should be treated the same as http://com.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://com./index.html");
-    EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1"));
-    this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(),
-                         GURL("http://hopefully-no-cookies.com./")));
-  }
+  // Make sure they don't show up for a normal .com, they should be host,
+  // domain, cookies.
+  this->MatchCookieLines(
+      std::string(),
+      this->GetCookies(cs.get(), GURL("http://hopefully-no-cookies.com/")));
+  this->MatchCookieLines(std::string(),
+                         this->GetCookies(cs.get(), GURL("http://.com/")));
+}
 
-  {  // Should not be able to set host cookie from a subdomain.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://a.b");
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "a=1; domain=.b"));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=b"));
-    this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url));
-  }
+// http://com. should be treated the same as http://com.
+TYPED_TEST_P(CookieStoreTest, TestTLDWithTerminalDot) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://com./index.html");
+  EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.com."));
+  this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
+  this->MatchCookieLines(
+      std::string(),
+      this->GetCookies(cs.get(), GURL("http://hopefully-no-cookies.com./")));
+}
 
-  {  // Same test as above, but explicitly on a known TLD (com).
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://google.com");
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "a=1; domain=.com"));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=com"));
-    this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url));
-  }
+TYPED_TEST_P(CookieStoreTest, TestSubdomainSettingCookiesOnUnknownTLD) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://a.b");
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "a=1; domain=.b"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=b"));
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url));
+}
 
-  {  // Make sure can't set cookie on TLD which is dotted.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://google.co.uk");
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "a=1; domain=.co.uk"));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.uk"));
-    this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url));
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(), GURL("http://something-else.co.uk")));
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(), GURL("http://something-else.uk")));
-  }
+TYPED_TEST_P(CookieStoreTest, TestSubdomainSettingCookiesOnKnownTLD) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://google.com");
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "a=1; domain=.com"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=com"));
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url));
+}
 
-  {  // Intranet URLs should only be able to set host cookies.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://b");
-    EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1"));
-    EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.b"));
-    this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
-  }
+TYPED_TEST_P(CookieStoreTest, TestSubdomainSettingCookiesOnKnownDottedTLD) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://google.co.uk");
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "a=1; domain=.co.uk"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.uk"));
+  this->MatchCookieLines(std::string(), this->GetCookies(cs.get(), url));
+  this->MatchCookieLines(
+      std::string(),
+      this->GetCookies(cs.get(), GURL("http://something-else.co.uk")));
+  this->MatchCookieLines(
+      std::string(),
+      this->GetCookies(cs.get(), GURL("http://something-else.uk")));
+}
 
-  if (TypeParam::supports_non_dotted_domains) {
-    // Exact matches between the domain attribute and an intranet host are
-    // treated as host cookies, not domain cookies.
-    scoped_refptr<CookieStore> cs(this->GetCookieStore());
-    GURL url("http://b/");
-    EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1; domain=b"));
+// Intranet URLs should only be able to set host cookies.
+TYPED_TEST_P(CookieStoreTest, TestSettingCookiesOnUnknownTLD) {
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://b");
+  EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1"));
+  EXPECT_FALSE(this->SetCookie(cs.get(), url, "b=2; domain=.b"));
+  this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
+}
 
-    this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
-    // Make sure it doesn't show up for an intranet subdomain, it should be a
-    // host not a domain cookie.
-    this->MatchCookieLines(
-        std::string(),
-        this->GetCookies(cs.get(), GURL("http://hopefully-no-cookies.b/")));
-    this->MatchCookieLines(std::string(),
-                           this->GetCookies(cs.get(), GURL("http://.b/")));
-  }
+// Exact matches between the domain attribute and an intranet host are
+// treated as host cookies, not domain cookies.
+TYPED_TEST_P(CookieStoreTest, TestSettingCookiesWithHostDomainOnUnknownTLD) {
+  if (!TypeParam::supports_non_dotted_domains)
+    return;
+  scoped_refptr<CookieStore> cs(this->GetCookieStore());
+  GURL url("http://b");
+  EXPECT_TRUE(this->SetCookie(cs.get(), url, "a=1; domain=b"));
+
+  this->MatchCookieLines("a=1", this->GetCookies(cs.get(), url));
+
+  // Make sure it doesn't show up for an intranet subdomain, it should be
+  // a host, not domain, cookie.
+  this->MatchCookieLines(
+      std::string(),
+      this->GetCookies(cs.get(), GURL("http://hopefully-no-cookies.b/")));
+  this->MatchCookieLines(std::string(),
+                         this->GetCookies(cs.get(), GURL("http://.b/")));
 }
 
 // Test reading/writing cookies when the domain ends with a period,
@@ -1336,10 +1324,19 @@
                            DomainWithTrailingDotTest,
                            ValidSubdomainTest,
                            InvalidDomainTest,
-                           DomainWithoutLeadingDotTest,
+                           InvalidDomainSameDomainAndRegistry,
+                           DomainWithoutLeadingDotParentDomain,
+                           DomainWithoutLeadingDotSameDomain,
                            CaseInsensitiveDomainTest,
                            TestIpAddress,
-                           TestNonDottedAndTLD,
+                           TestIpAddressNoDomainCookies,
+                           TestTLD,
+                           TestTLDWithTerminalDot,
+                           TestSubdomainSettingCookiesOnUnknownTLD,
+                           TestSubdomainSettingCookiesOnKnownTLD,
+                           TestSubdomainSettingCookiesOnKnownDottedTLD,
+                           TestSettingCookiesOnUnknownTLD,
+                           TestSettingCookiesWithHostDomainOnUnknownTLD,
                            TestHostEndsWithDot,
                            InvalidScheme,
                            InvalidScheme_Read,
diff --git a/ppapi/ppapi_tests.gypi b/ppapi/ppapi_tests.gypi
index cf09030..b168b11 100644
--- a/ppapi/ppapi_tests.gypi
+++ b/ppapi/ppapi_tests.gypi
@@ -664,4 +664,19 @@
     # Adding a new PPAPI example? Don't forget to update the GN build.
     # See //ppapi/examples/BUILD.gn
   ],
+  'conditions': [
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'ppapi_unittests_run',
+          'type': 'none',
+          'dependencies': [
+            'ppapi_unittests',
+          ],
+          'includes': [ '../build/isolate.gypi' ],
+          'sources': [ 'ppapi_unittests.isolate' ],
+        },
+      ],
+    }],
+  ],
 }
diff --git a/ppapi/ppapi_unittests.isolate b/ppapi/ppapi_unittests.isolate
new file mode 100644
index 0000000..c77d6e53
--- /dev/null
+++ b/ppapi/ppapi_unittests.isolate
@@ -0,0 +1,17 @@
+# Copyright (c) 2015 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.
+{
+  'conditions': [
+    ['OS=="linux" or OS=="mac" or OS=="win"', {
+      'variables': {
+        'command': [
+          '<(PRODUCT_DIR)/ppapi_unittests<(EXECUTABLE_SUFFIX)',
+        ],
+      },
+    }],
+  ],
+  'includes': [
+    '../base/base.isolate',
+  ],
+}
diff --git a/testing/buildbot/chromium.angle.json b/testing/buildbot/chromium.angle.json
index d42e46e6..10b345e2 100644
--- a/testing/buildbot/chromium.angle.json
+++ b/testing/buildbot/chromium.angle.json
@@ -2,6 +2,9 @@
   "Linux Tests (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -9,6 +12,9 @@
   "Linux Tests (dbg) (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -16,6 +22,9 @@
   "Mac10.8 Tests (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -23,6 +32,9 @@
   "Mac10.8 Tests (dbg) (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -30,6 +42,9 @@
   "Win7 Tests (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -37,6 +52,9 @@
   "Win7 Tests (dbg) (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -44,6 +62,9 @@
   "Win7 Tests x64 (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
@@ -51,6 +72,9 @@
   "Win7 Tests x64 (dbg) (ANGLE)": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       }
     ]
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 1b928fc..79342d5 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -253,6 +253,9 @@
         "test": "accessibility_unittests"
       },
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -776,6 +779,9 @@
   "Chromium Win 10": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -997,6 +1003,9 @@
         "test": "accessibility_unittests"
       },
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -1281,6 +1290,9 @@
         "test": "accessibility_unittests"
       },
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -1504,6 +1516,9 @@
         "test": "accessibility_unittests"
       },
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -1650,6 +1665,9 @@
         "test": "accessibility_unittests"
       },
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -1940,6 +1958,9 @@
         "test": "accessibility_unittests"
       },
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -2185,6 +2206,9 @@
   "ClangToTWin tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -2424,6 +2448,9 @@
   "ClangToTWin(dbg) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -2663,6 +2690,9 @@
   "ClangToTWin(dll) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -2902,6 +2932,9 @@
   "ClangToTWin64 tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -3141,6 +3174,9 @@
   "ClangToTWin64(dbg) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -3380,6 +3416,9 @@
   "ClangToTWin64(dll) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -3619,6 +3658,9 @@
   "CrWinAsan tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -3834,6 +3876,9 @@
   "CrWinAsan(dll) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -4049,6 +4094,9 @@
   "CrWinAsanCov tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -4245,6 +4293,9 @@
   "CrWinClang tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -4484,6 +4535,9 @@
   "CrWinClang(dbg) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -4723,6 +4777,9 @@
   "CrWinClang(shared) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -4962,6 +5019,9 @@
   "CrWinClang64 tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -5201,6 +5261,9 @@
   "CrWinClang64(dbg) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -5440,6 +5503,9 @@
   "CrWinClang64(dll) tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
@@ -5679,6 +5745,9 @@
   "CrWinClangLLD tester": {
     "gtest_tests": [
       {
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
         "test": "angle_unittests"
       },
       {
diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice-blacklist.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice-blacklist.html
new file mode 100644
index 0000000..33527d2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice-blacklist.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharness-helpers.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="resources/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+
+test(t => { assert_true(window.testRunner instanceof Object); t.done(); },
+     'window.testRunner is required for the following tests.');
+
+promise_test(() => {
+  testRunner.setBluetoothMockDataSet('HeartRateAdapter');
+  return assert_promise_rejects_with_message(
+    requestDeviceWithKeyDown(
+      {filters: [{services: ['human_interface_device']}]}),
+    new DOMException(
+      'requestDevice() called with a filter containing a blacklisted UUID. ' +
+        'https://goo.gl/4NeimX',
+      'SecurityError'),
+    'Requesting blacklisted service rejects.');
+}, 'Reject with SecurityError if requesting a blacklisted service.');
+
+promise_test(() => {
+  testRunner.setBluetoothMockDataSet('HeartRateAndHIDAdapter');
+  return requestDeviceWithKeyDown(
+    {
+      filters: [{services: ['heart_rate']}],
+      optionalServices: ['human_interface_device']
+    })
+    .then(device => device.gatt.connect())
+    .then(gattServer => {
+      return assert_promise_rejects_with_message(
+        gattServer.getPrimaryService('human_interface_device'),
+        new DOMException(
+          'Origin is not allowed to access the service. Remember to add the ' +
+          'service to a filter or to optionalServices in requestDevice().',
+          'SecurityError'),
+        'Blacklisted service not accessible.');
+    });
+}, 'Blacklisted UUID in optionalServices is removed and access not granted.');
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt
index 78a071f0..411170e 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/video-mute-repaint-expected.txt
@@ -23,11 +23,11 @@
               "bounds": [700, 520],
               "drawsContent": true,
               "repaintRects": [
-                [628, 492, 24, 25],
-                [570, 492, 89, 25],
-                [570, 492, 89, 25],
-                [570, 492, 24, 25],
-                [535, 489, 35, 31]
+                [628, 493, 24, 24],
+                [570, 493, 89, 24],
+                [570, 493, 89, 24],
+                [570, 493, 24, 24],
+                [535, 490, 35, 30]
               ],
               "paintInvalidationClients": [
                 "LayoutButton INPUT",
diff --git a/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt b/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt
index 5c3ac11..d45b4b8 100644
--- a/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/repaint/video-unmute-repaint-expected.txt
@@ -23,11 +23,11 @@
               "bounds": [700, 520],
               "drawsContent": true,
               "repaintRects": [
-                [599, 492, 24, 25],
-                [570, 492, 89, 25],
-                [570, 492, 89, 25],
-                [570, 492, 24, 25],
-                [535, 489, 35, 31]
+                [599, 493, 24, 24],
+                [570, 493, 89, 24],
+                [570, 493, 89, 24],
+                [570, 493, 24, 24],
+                [535, 490, 35, 30]
               ],
               "paintInvalidationClients": [
                 "LayoutButton INPUT",
diff --git a/third_party/WebKit/LayoutTests/platform/android/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/android/compositing/video-frame-size-change-expected.txt
new file mode 100644
index 0000000..16fefb4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/compositing/video-frame-size-change-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x245
+  LayoutBlockFlow {HTML} at (0,0) size 800x245
+    LayoutBlockFlow {BODY} at (8,16) size 784x221
+      LayoutBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 457x19
+          text run at (0,0) width 457: "Tests decoding and rendering a video element that has a changing resolution."
+      LayoutBlockFlow (anonymous) at (0,36) size 784x185
+        LayoutText {#text} at (320,165) size 4x19
+          text run at (320,165) width 4: " "
+        LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,52) size 320x180
+  LayoutVideo {VIDEO} at (0,0) size 320x179.98
+layer at (332,52) size 320x180
+  LayoutVideo {VIDEO} at (324,0) size 320x179.98
+layer at (8,52) size 320x180
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
+    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+layer at (8,52) size 320x145
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+layer at (332,52) size 320x180
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
+    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+layer at (332,52) size 320x145
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/repaint/video-mute-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/android/fast/repaint/video-mute-repaint-expected.txt
new file mode 100644
index 0000000..78a071f0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/fast/repaint/video-mute-repaint-expected.txt
@@ -0,0 +1,45 @@
+{
+  "bounds": [800, 600],
+  "children": [
+    {
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "drawsContent": true,
+      "children": [
+        {
+          "position": [8, 8],
+          "bounds": [700, 525]
+        },
+        {
+          "shouldFlattenTransform": false,
+          "children": [
+            {
+              "position": [8, 8],
+              "bounds": [700, 525],
+              "drawsContent": true
+            },
+            {
+              "position": [8, 8],
+              "bounds": [700, 520],
+              "drawsContent": true,
+              "repaintRects": [
+                [628, 492, 24, 25],
+                [570, 492, 89, 25],
+                [570, 492, 89, 25],
+                [570, 492, 24, 25],
+                [535, 489, 35, 31]
+              ],
+              "paintInvalidationClients": [
+                "LayoutButton INPUT",
+                "LayoutSlider INPUT",
+                "LayoutFlexibleBox DIV",
+                "LayoutBlockFlow DIV id='thumb'"
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/repaint/video-unmute-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/android/fast/repaint/video-unmute-repaint-expected.txt
new file mode 100644
index 0000000..5c3ac11
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/fast/repaint/video-unmute-repaint-expected.txt
@@ -0,0 +1,45 @@
+{
+  "bounds": [800, 600],
+  "children": [
+    {
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "drawsContent": true,
+      "children": [
+        {
+          "position": [8, 8],
+          "bounds": [700, 525]
+        },
+        {
+          "shouldFlattenTransform": false,
+          "children": [
+            {
+              "position": [8, 8],
+              "bounds": [700, 525],
+              "drawsContent": true
+            },
+            {
+              "position": [8, 8],
+              "bounds": [700, 520],
+              "drawsContent": true,
+              "repaintRects": [
+                [599, 492, 24, 25],
+                [570, 492, 89, 25],
+                [570, 492, 89, 25],
+                [570, 492, 24, 25],
+                [535, 489, 35, 31]
+              ],
+              "paintInvalidationClients": [
+                "LayoutButton INPUT",
+                "LayoutSlider INPUT",
+                "LayoutFlexibleBox DIV",
+                "LayoutBlockFlow DIV id='thumb'"
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/replaced/width100percent-image-expected.txt b/third_party/WebKit/LayoutTests/platform/android/fast/replaced/width100percent-image-expected.txt
new file mode 100644
index 0000000..5bb86231
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/fast/replaced/width100percent-image-expected.txt
@@ -0,0 +1,37 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow (anonymous) at (0,0) size 784x40
+        LayoutText {#text} at (0,0) size 779x39
+          text run at (0,0) width 676: "The following elements behave differently in different browsers. Our current behavior will cause them to overlap, "
+          text run at (675,0) width 104: "but we may need"
+          text run at (0,20) width 160: "to change this in the future."
+      LayoutTable {TABLE} at (0,40) size 784x24
+        LayoutTableSection {TBODY} at (0,0) size 784x24
+          LayoutTableRow {TR} at (0,1) size 784x22
+            LayoutTableCell {TD} at (1,11) size 2x2 [r=0 c=0 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 0x0
+            LayoutTableCell {TD} at (4,11) size 2x2 [r=0 c=1 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 0x0
+            LayoutTableCell {TD} at (7,11) size 2x2 [r=0 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 0x0
+            LayoutTableCell {TD} at (10,1) size 773x22 [r=0 c=3 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 4x19
+                text run at (1,1) width 4: " "
+      LayoutBlockFlow (anonymous) at (0,64) size 784x40
+        LayoutBR {BR} at (0,0) size 0x19
+        LayoutBR {BR} at (0,20) size 0x19
+      LayoutTable {TABLE} at (0,104) size 784x279
+        LayoutTableSection {TBODY} at (0,0) size 784x279
+          LayoutTableRow {TR} at (0,1) size 784x277
+            LayoutTableCell {TD} at (1,1) size 216x277 [r=0 c=0 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 213.98x275
+            LayoutTableCell {TD} at (218,1) size 216x277 [r=0 c=1 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 213.98x275
+            LayoutTableCell {TD} at (435,1) size 216x277 [r=0 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (1,1) size 213.98x275
+            LayoutTableCell {TD} at (652,128) size 131x22 [r=0 c=3 rs=1 cs=1]
+              LayoutText {#text} at (1,1) size 4x19
+                text run at (1,1) width 4: " "
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-aspect-ratio-expected.txt
new file mode 100644
index 0000000..4fccfb7c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-aspect-ratio-expected.txt
@@ -0,0 +1,73 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 589x19
+          text run at (0,0) width 589: "Test video sizing. You should see one bigger image (paused video) and 7 small ones of 1/4 its size."
+      LayoutBlockFlow (anonymous) at (0,36) size 784x480
+        LayoutBR {BR} at (320,240) size 0x0
+        LayoutBlockFlow {DIV} at (160,240) size 320x120
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutBlockFlow {DIV} at (0,360) size 320x120
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutText {#text} at (0,0) size 0x0
+layer at (8,44) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x240
+layer at (8,284) size 160x120
+  LayoutVideo {VIDEO} at (0,240) size 160x120
+layer at (168,284) size 160x120
+  LayoutVideo {VIDEO} at (0,0) size 160x119.98
+layer at (328,284) size 160x120
+  LayoutVideo {VIDEO} at (160,0) size 160x120
+layer at (8,404) size 160x120
+  LayoutVideo {VIDEO} at (0,0) size 160x120
+layer at (168,404) size 160x120
+  LayoutVideo {VIDEO} at (160,0) size 160x119.98
+layer at (8,44) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
+layer at (8,44) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
+layer at (8,284) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
+layer at (8,284) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
+layer at (168,284) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
+    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+layer at (168,284) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+layer at (328,284) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
+layer at (328,284) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
+layer at (8,404) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
+layer at (8,404) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
+layer at (168,404) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
+    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+layer at (168,404) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+layer at (328,404) size 320x120
+  LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120
+layer at (328,404) size 160x120
+  LayoutVideo (positioned) {VIDEO} at (0,0) size 160x120
+layer at (328,404) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
+layer at (328,404) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
+layer at (488,404) size 160x120
+  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x119.98
+layer at (488,404) size 160x120
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
+    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+layer at (488,404) size 160x85
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-colorspace-yuv420-expected.txt
new file mode 100644
index 0000000..01ea82b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-colorspace-yuv420-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "Test correct colorspace for yuv420, i.e. YU12 video"
+      LayoutBlockFlow (anonymous) at (0,36) size 784x156
+layer at (8,44) size 206x156
+  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (11,47) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (11,47) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-colorspace-yuv422-expected.txt
new file mode 100644
index 0000000..6c5fa26
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-colorspace-yuv422-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 317x19
+          text run at (0,0) width 317: "Test correct colorspace for yuv422, i.e. YU16 video"
+      LayoutBlockFlow (anonymous) at (0,36) size 784x156
+layer at (8,44) size 206x156
+  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (11,47) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (11,47) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-controls-rendering-expected.txt
new file mode 100644
index 0000000..fd0a1a67
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-controls-rendering-expected.txt
@@ -0,0 +1,85 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 764
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x600
+  LayoutBlockFlow {HTML} at (0,0) size 785x600
+    LayoutBlockFlow {BODY} at (8,8) size 769x584
+      LayoutBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 146x19
+          text run at (0,0) width 146: "Test controls placement."
+      LayoutBlockFlow {DIV} at (0,36) size 769x240
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutBlockFlow {DIV} at (0,276) size 769x240
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutBlockFlow {DIV} at (0,516) size 769x0
+layer at (8,44) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x240
+layer at (8,284) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+layer at (8,44) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
+layer at (8,44) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
+layer at (13,249) size 310x30
+  LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
+    LayoutButton {INPUT} at (9,0) size 30x30
+    LayoutSlider {INPUT} at (48,11) size 91.58x8
+      LayoutFlexibleBox {DIV} at (0,0) size 91.58x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 103.58x24
+          LayoutBlockFlow {DIV} at (-7,0) size 32x24
+    LayoutFlexibleBox {DIV} at (154.58,0) size 25x30 [color=#FFFFFF]
+      LayoutBlockFlow (anonymous) at (0,0) size 25x30
+        LayoutText {#text} at (0,7) size 25x16
+          text run at (0,7) width 25: "0:00"
+    LayoutButton {INPUT} at (188.58,0) size 35x30
+    LayoutSlider {INPUT} at (229.58,11) size 31.42x8
+      LayoutFlexibleBox {DIV} at (0,0) size 31.42x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 43.42x24
+          LayoutBlockFlow {DIV} at (12.42,0) size 24x24
+    LayoutButton {INPUT} at (271,0) size 30x30
+layer at (8,284) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
+    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+layer at (8,284) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+layer at (13,489) size 310x30
+  LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
+    LayoutButton {INPUT} at (9,0) size 30x30
+    LayoutSlider {INPUT} at (48,11) size 91.58x8
+      LayoutFlexibleBox {DIV} at (0,0) size 91.58x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 103.58x24
+          LayoutBlockFlow {DIV} at (-7,0) size 32x24
+    LayoutFlexibleBox {DIV} at (154.58,0) size 25x30 [color=#FFFFFF]
+      LayoutBlockFlow (anonymous) at (0,0) size 25x30
+        LayoutText {#text} at (0,7) size 25x16
+          text run at (0,7) width 25: "0:00"
+    LayoutButton {INPUT} at (188.58,0) size 35x30
+    LayoutSlider {INPUT} at (229.58,11) size 31.42x8
+      LayoutFlexibleBox {DIV} at (0,0) size 31.42x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 43.42x24
+          LayoutBlockFlow {DIV} at (12.42,0) size 24x24
+    LayoutButton {INPUT} at (271,0) size 30x30
+layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo (positioned) {VIDEO} at (8,524) size 320x239.98
+layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
+    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+layer at (8,524) size 320x205 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+layer at (13,729) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
+    LayoutButton {INPUT} at (9,0) size 30x30
+    LayoutSlider {INPUT} at (48,11) size 91.58x8
+      LayoutFlexibleBox {DIV} at (0,0) size 91.58x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 103.58x24
+          LayoutBlockFlow {DIV} at (-7,0) size 32x24
+    LayoutFlexibleBox {DIV} at (154.58,0) size 25x30 [color=#FFFFFF]
+      LayoutBlockFlow (anonymous) at (0,0) size 25x30
+        LayoutText {#text} at (0,7) size 25x16
+          text run at (0,7) width 25: "0:00"
+    LayoutButton {INPUT} at (188.58,0) size 35x30
+    LayoutSlider {INPUT} at (229.58,11) size 31.42x8
+      LayoutFlexibleBox {DIV} at (0,0) size 31.42x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 43.42x24
+          LayoutBlockFlow {DIV} at (12.42,0) size 24x24
+    LayoutButton {INPUT} at (271,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-controls-with-cast-rendering-expected.txt
new file mode 100644
index 0000000..9e70781c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-controls-with-cast-rendering-expected.txt
@@ -0,0 +1,88 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 782
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x550
+  LayoutBlockFlow {HTML} at (0,0) size 785x550
+    LayoutBlockFlow {BODY} at (8,16) size 769x526
+      LayoutBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 240x19
+          text run at (0,0) width 240: "Test controls rendering with cast button."
+      LayoutBlockFlow {DIV} at (0,36) size 769x245
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutBlockFlow {DIV} at (0,281) size 769x245
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutBlockFlow {DIV} at (0,526) size 769x0
+layer at (8,52) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x240
+layer at (8,297) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+layer at (8,52) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
+layer at (8,52) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
+layer at (13,257) size 310x30
+  LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
+    LayoutButton {INPUT} at (9,0) size 30x30
+    LayoutSlider {INPUT} at (48,11) size 74x8
+      LayoutFlexibleBox {DIV} at (0,0) size 74x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 86x24
+          LayoutBlockFlow {DIV} at (-7,0) size 32x24
+    LayoutFlexibleBox {DIV} at (137,0) size 25x30 [color=#FFFFFF]
+      LayoutBlockFlow (anonymous) at (0,0) size 25x30
+        LayoutText {#text} at (0,7) size 25x16
+          text run at (0,7) width 25: "0:00"
+    LayoutButton {INPUT} at (171,0) size 35x30
+    LayoutSlider {INPUT} at (212,11) size 15x8
+      LayoutFlexibleBox {DIV} at (0,0) size 15x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 27x24
+          LayoutBlockFlow {DIV} at (-4,0) size 24x24
+    LayoutButton {INPUT} at (237,0) size 30x30
+    LayoutButton {INPUT} at (271,0) size 30x30
+layer at (8,297) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
+    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+layer at (8,297) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+layer at (13,502) size 310x30
+  LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
+    LayoutButton {INPUT} at (9,0) size 30x30
+    LayoutSlider {INPUT} at (48,11) size 74x8
+      LayoutFlexibleBox {DIV} at (0,0) size 74x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 86x24
+          LayoutBlockFlow {DIV} at (-7,0) size 32x24
+    LayoutFlexibleBox {DIV} at (137,0) size 25x30 [color=#FFFFFF]
+      LayoutBlockFlow (anonymous) at (0,0) size 25x30
+        LayoutText {#text} at (0,7) size 25x16
+          text run at (0,7) width 25: "0:00"
+    LayoutButton {INPUT} at (171,0) size 35x30
+    LayoutSlider {INPUT} at (212,11) size 15x8
+      LayoutFlexibleBox {DIV} at (0,0) size 15x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 27x24
+          LayoutBlockFlow {DIV} at (-4,0) size 24x24
+    LayoutButton {INPUT} at (237,0) size 30x30
+    LayoutButton {INPUT} at (271,0) size 30x30
+layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo (positioned) {VIDEO} at (8,542) size 320x239.98
+layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
+    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+layer at (8,542) size 320x205 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+layer at (13,747) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
+  LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
+    LayoutButton {INPUT} at (9,0) size 30x30
+    LayoutSlider {INPUT} at (48,11) size 74x8
+      LayoutFlexibleBox {DIV} at (0,0) size 74x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 86x24
+          LayoutBlockFlow {DIV} at (-7,0) size 32x24
+    LayoutFlexibleBox {DIV} at (137,0) size 25x30 [color=#FFFFFF]
+      LayoutBlockFlow (anonymous) at (0,0) size 25x30
+        LayoutText {#text} at (0,7) size 25x16
+          text run at (0,7) width 25: "0:00"
+    LayoutButton {INPUT} at (171,0) size 35x30
+    LayoutSlider {INPUT} at (212,11) size 15x8
+      LayoutFlexibleBox {DIV} at (0,0) size 15x8 [border: (1px solid #E6E6E659)]
+        LayoutBlockFlow {DIV} at (1,-8) size 27x24
+          LayoutBlockFlow {DIV} at (-4,0) size 24x24
+    LayoutButton {INPUT} at (237,0) size 30x30
+    LayoutButton {INPUT} at (271,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-layer-crash-expected.txt
new file mode 100644
index 0000000..21f9ddb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-layer-crash-expected.txt
@@ -0,0 +1,32 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 342x19
+          text run at (0,0) width 342: "Test dynamic removal of transformed and reflected video"
+      LayoutBlockFlow (anonymous) at (0,36) size 784x342
+        LayoutText {#text} at (0,0) size 4x19
+          text run at (0,0) width 4: " "
+        LayoutBR {BR} at (4,15) size 0x0
+        LayoutText {#text} at (0,161) size 4x19
+          text run at (0,161) width 4: " "
+        LayoutBR {BR} at (210,176) size 0x0
+        LayoutText {#text} at (0,322) size 4x19
+          text run at (0,322) width 4: " "
+        LayoutBR {BR} at (210,337) size 0x0
+layer at (12,64) size 206x156
+  LayoutVideo {VIDEO} at (4,20) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (15,67) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (15,67) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+layer at (12,225) size 206x156
+  LayoutVideo {VIDEO} at (4,181) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (15,228) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (15,228) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-overlay-cast-dark-rendering-expected.txt
new file mode 100644
index 0000000..c188edc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-overlay-cast-dark-rendering-expected.txt
@@ -0,0 +1,40 @@
+layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 782
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 785x550
+  LayoutBlockFlow {HTML} at (0,0) size 785x550
+    LayoutBlockFlow {BODY} at (8,16) size 769x526
+      LayoutBlockFlow {P} at (0,0) size 769x20
+        LayoutText {#text} at (0,0) size 334x19
+          text run at (0,0) width 334: "Test overlay cast button rendering on dark background."
+      LayoutBlockFlow {DIV} at (0,36) size 769x245
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutBlockFlow {DIV} at (0,281) size 769x245
+        LayoutText {#text} at (0,0) size 0x0
+      LayoutBlockFlow {DIV} at (0,526) size 769x0
+layer at (8,52) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x240
+layer at (8,297) size 320x240
+  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+layer at (8,52) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
+layer at (8,52) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
+layer at (24,62) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
+layer at (8,297) size 320x240
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
+    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+layer at (8,297) size 320x205
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+layer at (24,307) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutVideo (positioned) {VIDEO} at (8,542) size 320x239.98
+layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
+    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+layer at (8,542) size 320x205 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+layer at (24,552) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/android/media/video-transformed-expected.txt b/third_party/WebKit/LayoutTests/platform/android/media/video-transformed-expected.txt
new file mode 100644
index 0000000..731b9cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/media/video-transformed-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (8,8) size 784x584
+      LayoutBlockFlow {P} at (0,0) size 784x20
+        LayoutText {#text} at (0,0) size 204x19
+          text run at (0,0) width 204: "Test painting of transformed video"
+      LayoutBlockFlow (anonymous) at (0,36) size 784x483
+        LayoutText {#text} at (0,141) size 4x19
+          text run at (0,141) width 4: " "
+        LayoutBR {BR} at (210,156) size 0x0
+        LayoutText {#text} at (0,302) size 4x19
+          text run at (0,302) width 4: " "
+        LayoutBR {BR} at (210,317) size 0x0
+        LayoutText {#text} at (0,463) size 4x19
+          text run at (0,463) width 4: " "
+        LayoutBR {BR} at (210,478) size 0x0
+layer at (12,44) size 206x156
+  LayoutVideo {VIDEO} at (4,0) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (15,47) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (15,47) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+layer at (12,205) size 206x156
+  LayoutVideo {VIDEO} at (4,161) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (15,208) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (15,208) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+layer at (12,366) size 206x156
+  LayoutVideo {VIDEO} at (4,322) size 206x155.98 [border: (3px solid #FF0000)]
+layer at (15,369) size 200x150
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
+    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+layer at (15,369) size 200x115
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
diff --git a/third_party/WebKit/LayoutTests/platform/android/svg/wicd/test-rightsizing-a-expected.txt b/third_party/WebKit/LayoutTests/platform/android/svg/wicd/test-rightsizing-a-expected.txt
new file mode 100644
index 0000000..91c7979
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/svg/wicd/test-rightsizing-a-expected.txt
@@ -0,0 +1,69 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x550
+  LayoutBlockFlow {html} at (0,0) size 800x549.86
+    LayoutBlockFlow {body} at (48,30.72) size 752x511.14
+      LayoutBlockFlow {div} at (0,0) size 752x511.14
+        LayoutBlockFlow {h1} at (0,0) size 691.83x31
+          LayoutText {#text} at (0,0) size 219x30
+            text run at (0,0) width 219: "rightsizing to box"
+        LayoutBlockFlow {h4} at (0,31) size 752x16
+          LayoutText {#text} at (0,0) size 138x16
+            text run at (0,0) width 138: "WICD Core 1.0 #20-1"
+        LayoutBlockFlow {div} at (0,66.14) size 176x62 [bgcolor=#FF0000]
+          LayoutImage {object} at (0,0) size 176x62
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutBlockFlow (anonymous) at (0,128.14) size 752x19
+          LayoutBR {br} at (0,0) size 0x18
+        LayoutBlockFlow {div} at (0,147.14) size 176x62 [bgcolor=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutBlockFlow {p} at (0,212.02) size 691.83x34
+          LayoutText {#text} at (0,0) size 675x34
+            text run at (0,0) width 675: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (width:100%,"
+            text run at (0,17) width 506: "no defined height) and each nested into a div element (width:176px, height:62px)."
+        LayoutBlockFlow {div} at (0,251.77) size 176x62 [bgcolor=#FF0000]
+          LayoutImage {object} at (0,0) size 175.98x62
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutBlockFlow (anonymous) at (0,313.77) size 752x19
+          LayoutBR {br} at (0,0) size 0x18
+        LayoutBlockFlow {div} at (0,332.77) size 176x62 [bgcolor=#FF0000]
+          LayoutText {#text} at (0,0) size 0x0
+        LayoutBlockFlow {p} at (0,397.64) size 691.83x34
+          LayoutText {#text} at (0,0) size 661x34
+            text run at (0,0) width 661: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (no defined"
+            text run at (0,17) width 520: "width, height:100%) and each nested into a div element (width:176px, height:62px)."
+        LayoutBlockFlow {p} at (0,437.39) size 691.83x34
+          LayoutText {#text} at (0,0) size 678x34
+            text run at (0,0) width 678: "This tests have succeeded, if in both cases, the look (dimensions) of the SVG and the GIF are exactly the same"
+            text run at (0,17) width 418: "(except the text apparently) and no red background color is visible."
+        LayoutBlockFlow {p} at (0,477.14) size 691.83x34
+          LayoutBR {br} at (0,0) size 0x17
+          LayoutInline {a} at (0,0) size 31x17 [color=#000066]
+            LayoutText {#text} at (0,17) size 31x17
+              text run at (0,17) width 31: "Back"
+layer at (48,178) size 176x62
+  LayoutEmbeddedObject {object} at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutView at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutSVGRoot {svg} at (0,0) size 176x62
+        LayoutSVGRect {rect} at (0,0) size 176x62 [fill={[type=SOLID] [color=#CCCCCC]}] [x=0.00] [y=0.00] [width=176.00] [height=62.00]
+        LayoutSVGRect {rect} at (2,2) size 174x60 [fill={[type=SOLID] [color=#333333]}] [x=2.00] [y=2.00] [width=174.00] [height=60.00]
+        LayoutSVGRect {rect} at (2,2) size 172x58 [fill={[type=SOLID] [color=#FFFFFF]}] [x=2.00] [y=2.00] [width=172.00] [height=58.00]
+        LayoutSVGRect {rect} at (86,2) size 88x58 [fill={[type=SOLID] [color=#FFCC33]}] [x=86.00] [y=2.00] [width=88.00] [height=58.00]
+        LayoutSVGText {text} at (46,10) size 80x46 contains 1 chunk(s)
+          LayoutSVGInlineText {#text} at (0,0) size 79x46
+            chunk 1 (middle anchor) text run 1 at (46.50,46.00) startOffset 0 endOffset 3 width 79.00: "SVG"
+layer at (48,363) size 176x62
+  LayoutEmbeddedObject {object} at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutView at (0,0) size 176x62
+    layer at (0,0) size 176x62
+      LayoutSVGRoot {svg} at (0,0) size 176x62
+        LayoutSVGRect {rect} at (0,0) size 176x62 [fill={[type=SOLID] [color=#CCCCCC]}] [x=0.00] [y=0.00] [width=176.00] [height=62.00]
+        LayoutSVGRect {rect} at (2,2) size 174x60 [fill={[type=SOLID] [color=#333333]}] [x=2.00] [y=2.00] [width=174.00] [height=60.00]
+        LayoutSVGRect {rect} at (2,2) size 172x58 [fill={[type=SOLID] [color=#FFFFFF]}] [x=2.00] [y=2.00] [width=172.00] [height=58.00]
+        LayoutSVGRect {rect} at (86,2) size 88x58 [fill={[type=SOLID] [color=#FFCC33]}] [x=86.00] [y=2.00] [width=88.00] [height=58.00]
+        LayoutSVGText {text} at (46,10) size 80x46 contains 1 chunk(s)
+          LayoutSVGInlineText {#text} at (0,0) size 79x46
+            chunk 1 (middle anchor) text run 1 at (46.50,46.00) startOffset 0 endOffset 3 width 79.00: "SVG"
diff --git a/third_party/WebKit/LayoutTests/platform/android/tables/mozilla/bugs/bug12910-2-expected.txt b/third_party/WebKit/LayoutTests/platform/android/tables/mozilla/bugs/bug12910-2-expected.txt
new file mode 100644
index 0000000..2446bd8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/android/tables/mozilla/bugs/bug12910-2-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  LayoutBlockFlow {HTML} at (0,0) size 800x600
+    LayoutBlockFlow {BODY} at (0,0) size 800x600 [bgcolor=#000000]
+      LayoutTable {TABLE} at (0,0) size 800x20
+        LayoutTableSection {TBODY} at (0,0) size 800x20
+          LayoutTableRow {TR} at (0,0) size 800x20
+            LayoutTableCell {TD} at (0,0) size 4x20 [r=0 c=0 rs=1 cs=1]
+              LayoutImage {IMG} at (0,0) size 4x19.98
+            LayoutTableCell {TD} at (4,6) size 672x14 [r=0 c=1 rs=1 cs=1]
+              LayoutImage {IMG} at (0,0) size 672x14
+            LayoutTableCell {TD} at (676,3) size 105x14 [r=0 c=2 rs=1 cs=1]
+              LayoutImage {IMG} at (0,0) size 14x14
+              LayoutImage {IMG} at (14,0) size 14x14
+              LayoutImage {IMG} at (28,0) size 14x14
+              LayoutImage {IMG} at (42,0) size 14x14
+              LayoutImage {IMG} at (56,0) size 14x14
+              LayoutImage {IMG} at (70,0) size 7x14
+              LayoutImage {IMG} at (77,0) size 14x14
+              LayoutImage {IMG} at (91,0) size 14x14
+              LayoutText {#text} at (0,0) size 0x0
+            LayoutTableCell {TD} at (781,6) size 15x14 [r=0 c=3 rs=1 cs=1]
+              LayoutImage {IMG} at (0,0) size 15x14
+            LayoutTableCell {TD} at (796,0) size 4x20 [r=0 c=4 rs=1 cs=1]
+              LayoutImage {IMG} at (0,0) size 4x20
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt
index 16fefb4..ba32ef09 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt
@@ -12,16 +12,16 @@
         LayoutText {#text} at (0,0) size 0x0
         LayoutText {#text} at (0,0) size 0x0
 layer at (8,52) size 320x180
-  LayoutVideo {VIDEO} at (0,0) size 320x179.98
+  LayoutVideo {VIDEO} at (0,0) size 320x180
 layer at (332,52) size 320x180
-  LayoutVideo {VIDEO} at (324,0) size 320x179.98
+  LayoutVideo {VIDEO} at (324,0) size 320x180
 layer at (8,52) size 320x180
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
-    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180
+    LayoutBlockFlow {DIV} at (0,145) size 320x35
 layer at (8,52) size 320x145
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x145
 layer at (332,52) size 320x180
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
-    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180
+    LayoutBlockFlow {DIV} at (0,145) size 320x35
 layer at (332,52) size 320x145
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x145
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/replaced/width100percent-image-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/replaced/width100percent-image-expected.txt
index 5bb86231..82ec6418 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/replaced/width100percent-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/replaced/width100percent-image-expected.txt
@@ -27,11 +27,11 @@
         LayoutTableSection {TBODY} at (0,0) size 784x279
           LayoutTableRow {TR} at (0,1) size 784x277
             LayoutTableCell {TD} at (1,1) size 216x277 [r=0 c=0 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (218,1) size 216x277 [r=0 c=1 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (435,1) size 216x277 [r=0 c=2 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (652,128) size 131x22 [r=0 c=3 rs=1 cs=1]
               LayoutText {#text} at (1,1) size 4x19
                 text run at (1,1) width 4: " "
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt
index 4fccfb7c..7f998da 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt
@@ -18,13 +18,13 @@
 layer at (8,284) size 160x120
   LayoutVideo {VIDEO} at (0,240) size 160x120
 layer at (168,284) size 160x120
-  LayoutVideo {VIDEO} at (0,0) size 160x119.98
+  LayoutVideo {VIDEO} at (0,0) size 160x120
 layer at (328,284) size 160x120
   LayoutVideo {VIDEO} at (160,0) size 160x120
 layer at (8,404) size 160x120
   LayoutVideo {VIDEO} at (0,0) size 160x120
 layer at (168,404) size 160x120
-  LayoutVideo {VIDEO} at (160,0) size 160x119.98
+  LayoutVideo {VIDEO} at (160,0) size 160x120
 layer at (8,44) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -36,10 +36,10 @@
 layer at (8,284) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (168,284) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (168,284) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (328,284) size 160x120
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
     LayoutBlockFlow {DIV} at (0,85) size 160x35
@@ -51,10 +51,10 @@
 layer at (8,404) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (168,404) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (168,404) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (328,404) size 320x120
   LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120
 layer at (328,404) size 160x120
@@ -65,9 +65,9 @@
 layer at (328,404) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (488,404) size 160x120
-  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x119.98
+  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120
 layer at (488,404) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (488,404) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt
index 01ea82b..f210fbf 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt
@@ -8,9 +8,9 @@
           text run at (0,0) width 317: "Test correct colorspace for yuv420, i.e. YU12 video"
       LayoutBlockFlow (anonymous) at (0,36) size 784x156
 layer at (8,44) size 206x156
-  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (11,47) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (11,47) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt
index 6c5fa26..502f7ae 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt
@@ -8,9 +8,9 @@
           text run at (0,0) width 317: "Test correct colorspace for yuv422, i.e. YU16 video"
       LayoutBlockFlow (anonymous) at (0,36) size 784x156
 layer at (8,44) size 206x156
-  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (11,47) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (11,47) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt
index fd0a1a67..2dd0a57 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,44) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,284) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,44) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -38,10 +38,10 @@
           LayoutBlockFlow {DIV} at (12.42,0) size 24x24
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,284) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,284) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,489) size 310x30
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
@@ -60,12 +60,12 @@
           LayoutBlockFlow {DIV} at (12.42,0) size 24x24
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,524) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240
 layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,524) size 320x205 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,729) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-with-cast-rendering-expected.txt
index 9e70781c..d0bf892 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-with-cast-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-with-cast-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,52) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,297) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,52) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -39,10 +39,10 @@
     LayoutButton {INPUT} at (237,0) size 30x30
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,297) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,297) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,502) size 310x30
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
@@ -62,12 +62,12 @@
     LayoutButton {INPUT} at (237,0) size 30x30
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,542) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240
 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,542) size 320x205 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,747) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt
index 21f9ddb..613f2c2f1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt
@@ -17,16 +17,16 @@
           text run at (0,322) width 4: " "
         LayoutBR {BR} at (210,337) size 0x0
 layer at (12,64) size 206x156
-  LayoutVideo {VIDEO} at (4,20) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,20) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,67) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,67) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,225) size 206x156
-  LayoutVideo {VIDEO} at (4,181) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,181) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,228) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,228) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-overlay-cast-dark-rendering-expected.txt
index c188edc..d881552 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-overlay-cast-dark-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-overlay-cast-dark-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,52) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,297) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,52) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -23,18 +23,18 @@
 layer at (24,62) size 30x30
   LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
 layer at (8,297) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,297) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (24,307) size 30x30
-  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,542) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240
 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,542) size 320x205 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (24,552) size 30x30
-  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-transformed-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-transformed-expected.txt
index 731b9cf..33cf546 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-transformed-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-transformed-expected.txt
@@ -17,23 +17,23 @@
           text run at (0,463) width 4: " "
         LayoutBR {BR} at (210,478) size 0x0
 layer at (12,44) size 206x156
-  LayoutVideo {VIDEO} at (4,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,47) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,47) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,205) size 206x156
-  LayoutVideo {VIDEO} at (4,161) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,161) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,208) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,208) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,366) size 206x156
-  LayoutVideo {VIDEO} at (4,322) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,322) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,369) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,369) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/wicd/test-rightsizing-a-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/wicd/test-rightsizing-a-expected.txt
index 91c7979..6f98460 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/wicd/test-rightsizing-a-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/wicd/test-rightsizing-a-expected.txt
@@ -22,7 +22,7 @@
             text run at (0,0) width 675: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (width:100%,"
             text run at (0,17) width 506: "no defined height) and each nested into a div element (width:176px, height:62px)."
         LayoutBlockFlow {div} at (0,251.77) size 176x62 [bgcolor=#FF0000]
-          LayoutImage {object} at (0,0) size 175.98x62
+          LayoutImage {object} at (0,0) size 176x62
           LayoutText {#text} at (0,0) size 0x0
         LayoutBlockFlow (anonymous) at (0,313.77) size 752x19
           LayoutBR {br} at (0,0) size 0x18
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt
index 4110a3d..7ef8b75 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt
@@ -12,16 +12,16 @@
         LayoutText {#text} at (0,0) size 0x0
         LayoutText {#text} at (0,0) size 0x0
 layer at (8,50) size 320x180
-  LayoutVideo {VIDEO} at (0,0) size 320x179.98
+  LayoutVideo {VIDEO} at (0,0) size 320x180
 layer at (332,50) size 320x180
-  LayoutVideo {VIDEO} at (324,0) size 320x179.98
+  LayoutVideo {VIDEO} at (324,0) size 320x180
 layer at (8,50) size 320x180
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
-    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180
+    LayoutBlockFlow {DIV} at (0,145) size 320x35
 layer at (8,50) size 320x145
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x145
 layer at (332,50) size 320x180
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
-    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180
+    LayoutBlockFlow {DIV} at (0,145) size 320x35
 layer at (332,50) size 320x145
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x145
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/replaced/width100percent-image-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/replaced/width100percent-image-expected.txt
index 2362483d..d16cec86 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/replaced/width100percent-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/replaced/width100percent-image-expected.txt
@@ -27,11 +27,11 @@
         LayoutTableSection {TBODY} at (0,0) size 784x279
           LayoutTableRow {TR} at (0,1) size 784x277
             LayoutTableCell {TD} at (1,1) size 216x277 [r=0 c=0 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (218,1) size 216x277 [r=0 c=1 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (435,1) size 216x277 [r=0 c=2 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (652,129) size 131x20 [r=0 c=3 rs=1 cs=1]
               LayoutText {#text} at (1,1) size 4x18
                 text run at (1,1) width 4: " "
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt
index 8847e3b..1a1dc37 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt
@@ -18,13 +18,13 @@
 layer at (8,282) size 160x120
   LayoutVideo {VIDEO} at (0,240) size 160x120
 layer at (168,282) size 160x120
-  LayoutVideo {VIDEO} at (0,0) size 160x119.98
+  LayoutVideo {VIDEO} at (0,0) size 160x120
 layer at (328,282) size 160x120
   LayoutVideo {VIDEO} at (160,0) size 160x120
 layer at (8,402) size 160x120
   LayoutVideo {VIDEO} at (0,0) size 160x120
 layer at (168,402) size 160x120
-  LayoutVideo {VIDEO} at (160,0) size 160x119.98
+  LayoutVideo {VIDEO} at (160,0) size 160x120
 layer at (8,42) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -36,10 +36,10 @@
 layer at (8,282) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (168,282) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (168,282) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (328,282) size 160x120
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
     LayoutBlockFlow {DIV} at (0,85) size 160x35
@@ -51,10 +51,10 @@
 layer at (8,402) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (168,402) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (168,402) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (328,402) size 320x120
   LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120
 layer at (328,402) size 160x120
@@ -65,9 +65,9 @@
 layer at (328,402) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (488,402) size 160x120
-  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x119.98
+  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120
 layer at (488,402) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (488,402) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt
index 7dc440c..38a602f7 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt
@@ -8,9 +8,9 @@
           text run at (0,0) width 333: "Test correct colorspace for yuv420, i.e. YU12 video"
       LayoutBlockFlow (anonymous) at (0,34) size 784x156
 layer at (8,42) size 206x156
-  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (11,45) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (11,45) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt
index a2f942e..917355b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt
@@ -8,9 +8,9 @@
           text run at (0,0) width 333: "Test correct colorspace for yuv422, i.e. YU16 video"
       LayoutBlockFlow (anonymous) at (0,34) size 784x156
 layer at (8,42) size 206x156
-  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (11,45) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (11,45) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt
index b566e4fa..dd079e53 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,42) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,282) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,42) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -38,10 +38,10 @@
           LayoutBlockFlow {DIV} at (11.89,0) size 24x24
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,282) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,282) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,487) size 310x30
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
@@ -60,12 +60,12 @@
           LayoutBlockFlow {DIV} at (11.89,0) size 24x24
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,522) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,522) size 320x240
 layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,522) size 320x205 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,727) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-with-cast-rendering-expected.txt
index a06fdf81..26f08dd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-with-cast-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-with-cast-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,50) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,294) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,50) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -39,10 +39,10 @@
     LayoutButton {INPUT} at (237,0) size 30x30
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,294) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,294) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,499) size 310x30
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
@@ -62,12 +62,12 @@
     LayoutButton {INPUT} at (237,0) size 30x30
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x240
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,538) size 320x205 backgroundClip at (8,538) size 320x62 clip at (8,538) size 320x62
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,743) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt
index 1560ae3..d8587df1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt
@@ -17,16 +17,16 @@
           text run at (0,320) width 4: " "
         LayoutBR {BR} at (210,334) size 0x0
 layer at (12,60) size 206x156
-  LayoutVideo {VIDEO} at (4,18) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,18) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,63) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,63) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,220) size 206x156
-  LayoutVideo {VIDEO} at (4,178) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,178) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,223) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,223) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-overlay-cast-dark-rendering-expected.txt
index a9cf5c8e..d65a713 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-overlay-cast-dark-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-overlay-cast-dark-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,50) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,294) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,50) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -23,18 +23,18 @@
 layer at (24,60) size 30x30
   LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
 layer at (8,294) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,294) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (24,304) size 30x30
-  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x240
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,538) size 320x205 backgroundClip at (8,538) size 320x62 clip at (8,538) size 320x62
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (24,548) size 30x30
-  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-transformed-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-transformed-expected.txt
index 8e667f6..db600a3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-transformed-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-transformed-expected.txt
@@ -17,23 +17,23 @@
           text run at (0,462) width 4: " "
         LayoutBR {BR} at (210,476) size 0x0
 layer at (12,42) size 206x156
-  LayoutVideo {VIDEO} at (4,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,45) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,45) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,202) size 206x156
-  LayoutVideo {VIDEO} at (4,160) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,160) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,205) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,205) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,362) size 206x156
-  LayoutVideo {VIDEO} at (4,320) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,320) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,365) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,365) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/wicd/test-rightsizing-a-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/wicd/test-rightsizing-a-expected.txt
index e5b00c7..32cd242 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/wicd/test-rightsizing-a-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/wicd/test-rightsizing-a-expected.txt
@@ -22,7 +22,7 @@
             text run at (0,0) width 690: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (width:100%,"
             text run at (0,16) width 520: "no defined height) and each nested into a div element (width:176px, height:62px)."
         LayoutBlockFlow {div} at (0,246.77) size 176x62 [bgcolor=#FF0000]
-          LayoutImage {object} at (0,0) size 175.98x62
+          LayoutImage {object} at (0,0) size 176x62
           LayoutText {#text} at (0,0) size 0x0
         LayoutBlockFlow (anonymous) at (0,308.77) size 752x18
           LayoutBR {br} at (0,0) size 0x17
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt
index 740727a9..e6a9969 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt
@@ -12,16 +12,16 @@
         LayoutText {#text} at (0,0) size 0x0
         LayoutText {#text} at (0,0) size 0x0
 layer at (8,50) size 320x180
-  LayoutVideo {VIDEO} at (0,0) size 320x179.98
+  LayoutVideo {VIDEO} at (0,0) size 320x180
 layer at (332,50) size 320x180
-  LayoutVideo {VIDEO} at (324,0) size 320x179.98
+  LayoutVideo {VIDEO} at (324,0) size 320x180
 layer at (8,50) size 320x180
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
-    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180
+    LayoutBlockFlow {DIV} at (0,145) size 320x35
 layer at (8,50) size 320x145
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x145
 layer at (332,50) size 320x180
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x179.98
-    LayoutBlockFlow {DIV} at (0,144.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180
+    LayoutBlockFlow {DIV} at (0,145) size 320x35
 layer at (332,50) size 320x145
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x144.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x145
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/replaced/width100percent-image-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/replaced/width100percent-image-expected.txt
index 3eed87f4..d357f5f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/replaced/width100percent-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/replaced/width100percent-image-expected.txt
@@ -27,11 +27,11 @@
         LayoutTableSection {TBODY} at (0,0) size 784x279
           LayoutTableRow {TR} at (0,1) size 784x277
             LayoutTableCell {TD} at (1,1) size 216x277 [r=0 c=0 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (218,1) size 216x277 [r=0 c=1 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (435,1) size 216x277 [r=0 c=2 rs=1 cs=1]
-              LayoutImage {IMG} at (1,1) size 213.98x275
+              LayoutImage {IMG} at (1,1) size 214x275
             LayoutTableCell {TD} at (652,129) size 131x20 [r=0 c=3 rs=1 cs=1]
               LayoutText {#text} at (1,1) size 4x17
                 text run at (1,1) width 4: " "
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt
index 11abe702..84e7c562 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt
@@ -18,13 +18,13 @@
 layer at (8,282) size 160x120
   LayoutVideo {VIDEO} at (0,240) size 160x120
 layer at (168,282) size 160x120
-  LayoutVideo {VIDEO} at (0,0) size 160x119.98
+  LayoutVideo {VIDEO} at (0,0) size 160x120
 layer at (328,282) size 160x120
   LayoutVideo {VIDEO} at (160,0) size 160x120
 layer at (8,402) size 160x120
   LayoutVideo {VIDEO} at (0,0) size 160x120
 layer at (168,402) size 160x120
-  LayoutVideo {VIDEO} at (160,0) size 160x119.98
+  LayoutVideo {VIDEO} at (160,0) size 160x120
 layer at (8,42) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -36,10 +36,10 @@
 layer at (8,282) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (168,282) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (168,282) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (328,282) size 160x120
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
     LayoutBlockFlow {DIV} at (0,85) size 160x35
@@ -51,10 +51,10 @@
 layer at (8,402) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (168,402) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (168,402) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (328,402) size 320x120
   LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120
 layer at (328,402) size 160x120
@@ -65,9 +65,9 @@
 layer at (328,402) size 160x85
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
 layer at (488,402) size 160x120
-  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x119.98
+  LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120
 layer at (488,402) size 160x120
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x119.98
-    LayoutBlockFlow {DIV} at (0,84.98) size 160x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120
+    LayoutBlockFlow {DIV} at (0,85) size 160x35
 layer at (488,402) size 160x85
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x84.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x85
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt
index 2556ea378c..ccc435e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt
@@ -8,9 +8,9 @@
           text run at (0,0) width 333: "Test correct colorspace for yuv420, i.e. YU12 video"
       LayoutBlockFlow (anonymous) at (0,34) size 784x156
 layer at (8,42) size 206x156
-  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (11,45) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (11,45) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt
index 76389f59..b3755c30 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt
@@ -8,9 +8,9 @@
           text run at (0,0) width 333: "Test correct colorspace for yuv422, i.e. YU16 video"
       LayoutBlockFlow (anonymous) at (0,34) size 784x156
 layer at (8,42) size 206x156
-  LayoutVideo {VIDEO} at (0,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (11,45) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (11,45) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt
index e6deb8e..3a6e954 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,42) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,282) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,42) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -38,10 +38,10 @@
           LayoutBlockFlow {DIV} at (12.42,0) size 24x24
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,282) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,282) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,487) size 310x30
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
@@ -60,12 +60,12 @@
           LayoutBlockFlow {DIV} at (12.42,0) size 24x24
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,522) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,522) size 320x240
 layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,522) size 320x205 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,727) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-with-cast-rendering-expected.txt
index 91a6ef1..efc639f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-with-cast-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-with-cast-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,50) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,294) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,50) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -39,10 +39,10 @@
     LayoutButton {INPUT} at (237,0) size 30x30
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,294) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,294) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,499) size 310x30
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
@@ -62,12 +62,12 @@
     LayoutButton {INPUT} at (237,0) size 30x30
     LayoutButton {INPUT} at (271,0) size 30x30
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x240
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,538) size 320x205 backgroundClip at (8,538) size 320x62 clip at (8,538) size 320x62
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (13,743) size 310x30 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0
   LayoutFlexibleBox (relative positioned) {DIV} at (5,0) size 310x30 [bgcolor=#141414CC]
     LayoutButton {INPUT} at (9,0) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt
index b4f1b6d..9ac79c6 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt
@@ -17,16 +17,16 @@
           text run at (0,320) width 4: " "
         LayoutBR {BR} at (210,334) size 0x0
 layer at (12,60) size 206x156
-  LayoutVideo {VIDEO} at (4,18) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,18) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,63) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,63) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,220) size 206x156
-  LayoutVideo {VIDEO} at (4,178) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,178) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,223) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,223) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-overlay-cast-dark-rendering-expected.txt
index 0f58331..82091537 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-overlay-cast-dark-rendering-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-overlay-cast-dark-rendering-expected.txt
@@ -14,7 +14,7 @@
 layer at (8,50) size 320x240
   LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,294) size 320x240
-  LayoutVideo {VIDEO} at (0,0) size 320x239.98
+  LayoutVideo {VIDEO} at (0,0) size 320x240
 layer at (8,50) size 320x240
   LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
     LayoutBlockFlow {DIV} at (0,205) size 320x35
@@ -23,18 +23,18 @@
 layer at (24,60) size 30x30
   LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
 layer at (8,294) size 320x240
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,294) size 320x205
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (24,304) size 30x30
-  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x239.98
+  LayoutVideo (positioned) {VIDEO} at (8,538) size 320x240
 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x239.98
-    LayoutBlockFlow {DIV} at (0,204.98) size 320x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
+    LayoutBlockFlow {DIV} at (0,205) size 320x35
 layer at (8,538) size 320x205 backgroundClip at (8,538) size 320x62 clip at (8,538) size 320x62
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x204.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x205
 layer at (24,548) size 30x30
-  LayoutButton (positioned) {INPUT} at (16,10.23) size 30x30
+  LayoutButton (positioned) {INPUT} at (16,10.25) size 30x30
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-transformed-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-transformed-expected.txt
index 0d58d842..84c1526 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-transformed-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-transformed-expected.txt
@@ -17,23 +17,23 @@
           text run at (0,462) width 4: " "
         LayoutBR {BR} at (210,476) size 0x0
 layer at (12,42) size 206x156
-  LayoutVideo {VIDEO} at (4,0) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,0) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,45) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,45) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,202) size 206x156
-  LayoutVideo {VIDEO} at (4,160) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,160) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,205) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,205) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
 layer at (12,362) size 206x156
-  LayoutVideo {VIDEO} at (4,320) size 206x155.98 [border: (3px solid #FF0000)]
+  LayoutVideo {VIDEO} at (4,320) size 206x156 [border: (3px solid #FF0000)]
 layer at (15,365) size 200x150
-  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x149.98
-    LayoutBlockFlow {DIV} at (0,114.98) size 200x35
+  LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150
+    LayoutBlockFlow {DIV} at (0,115) size 200x35
 layer at (15,365) size 200x115
-  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x114.98
+  LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 200x115
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/wicd/test-rightsizing-a-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/wicd/test-rightsizing-a-expected.txt
index b4e9ada..400fb23 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/wicd/test-rightsizing-a-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/wicd/test-rightsizing-a-expected.txt
@@ -22,7 +22,7 @@
             text run at (0,0) width 675: "Above there must be a GIF- and a SVG-image visible. Both are referenced by an object element (width:100%,"
             text run at (0,17) width 506: "no defined height) and each nested into a div element (width:176px, height:62px)."
         LayoutBlockFlow {div} at (0,248.77) size 176x62 [bgcolor=#FF0000]
-          LayoutImage {object} at (0,0) size 175.98x62
+          LayoutImage {object} at (0,0) size 176x62
           LayoutText {#text} at (0,0) size 0x0
         LayoutBlockFlow (anonymous) at (0,310.77) size 752x18
           LayoutBR {br} at (0,0) size 0x17
diff --git a/third_party/WebKit/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.txt b/third_party/WebKit/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.txt
index 2446bd8..2b2ad90a 100644
--- a/third_party/WebKit/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/tables/mozilla/bugs/bug12910-2-expected.txt
@@ -7,7 +7,7 @@
         LayoutTableSection {TBODY} at (0,0) size 800x20
           LayoutTableRow {TR} at (0,0) size 800x20
             LayoutTableCell {TD} at (0,0) size 4x20 [r=0 c=0 rs=1 cs=1]
-              LayoutImage {IMG} at (0,0) size 4x19.98
+              LayoutImage {IMG} at (0,0) size 4x20
             LayoutTableCell {TD} at (4,6) size 672x14 [r=0 c=1 rs=1 cs=1]
               LayoutImage {IMG} at (0,0) size 672x14
             LayoutTableCell {TD} at (676,3) size 105x14 [r=0 c=2 rs=1 cs=1]
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.cpp
index 722fd69..5c57a9a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.cpp
@@ -96,16 +96,6 @@
     return exception;
 }
 
-v8::Local<v8::Value> V8ThrowException::throwDOMException(int ec, const String& sanitizedMessage, const String& unsanitizedMessage, const v8::Local<v8::Object>& creationContext, v8::Isolate* isolate)
-{
-    ASSERT(ec == SecurityError || unsanitizedMessage.isEmpty());
-    v8::Local<v8::Value> exception = createDOMException(isolate, ec, sanitizedMessage, unsanitizedMessage, creationContext);
-    if (exception.IsEmpty())
-        return v8Undefined();
-
-    return V8ThrowException::throwException(exception, isolate);
-}
-
 v8::Local<v8::Value> V8ThrowException::createGeneralError(v8::Isolate* isolate, const String& message)
 {
     return v8::Exception::Error(v8String(isolate, message.isNull() ? "Error" : message));
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.h b/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.h
index 489f304..2eaaa25d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ThrowException.h
@@ -42,12 +42,6 @@
     }
     static v8::Local<v8::Value> createDOMException(v8::Isolate*, int, const String& sanitizedMessage, const String& unsanitizedMessage, const v8::Local<v8::Object>& creationContext);
 
-    static v8::Local<v8::Value> throwDOMException(int ec, const String& message, const v8::Local<v8::Object>& creationContext, v8::Isolate* isolate)
-    {
-        return throwDOMException(ec, message, String(), creationContext, isolate);
-    }
-    static v8::Local<v8::Value> throwDOMException(int, const String& sanitizedMessage, const String& unsanitizedMessage, const v8::Local<v8::Object>& creationContext, v8::Isolate*);
-
     static v8::Local<v8::Value> throwException(v8::Local<v8::Value>, v8::Isolate*);
 
     static v8::Local<v8::Value> createGeneralError(v8::Isolate*, const String&);
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index a92787a..bee8429 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4723,7 +4723,7 @@
 void LayoutBox::IntrinsicSizingInfo::transpose()
 {
     size = size.transposedSize();
-    aspectRatio = aspectRatio ? 1 / aspectRatio : 0;
+    aspectRatio = aspectRatio.transposedSize();
     std::swap(hasWidth, hasHeight);
 }
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index 62727dde..4b6a376 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -826,10 +826,10 @@
 
     struct IntrinsicSizingInfo {
         STACK_ALLOCATED();
-        IntrinsicSizingInfo() : aspectRatio(0), hasWidth(true), hasHeight(true) {}
+        IntrinsicSizingInfo() : hasWidth(true), hasHeight(true) {}
 
         FloatSize size;
-        double aspectRatio;
+        FloatSize aspectRatio;
         bool hasWidth;
         bool hasHeight;
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
index 66d430fc..d5c340de 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
@@ -300,7 +300,7 @@
     // Don't compute an intrinsic ratio to preserve historical WebKit behavior if we're painting alt text and/or a broken image.
     // Video is excluded from this behavior because video elements have a default aspect ratio that a failed poster image load should not override.
     if (m_imageResource && m_imageResource->errorOccurred() && !isVideo()) {
-        intrinsicSizingInfo.aspectRatio = 1;
+        intrinsicSizingInfo.aspectRatio = FloatSize(1, 1);
         return;
     }
 }
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
index 9927165b..be5b49a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
@@ -159,14 +159,14 @@
         // Update our intrinsic size to match what the content layoutObject has computed, so that when we
         // constrain the size below, the correct intrinsic size will be obtained for comparison against
         // min and max widths.
-        if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty())
+        if (!intrinsicSizingInfo.aspectRatio.isEmpty() && !intrinsicSizingInfo.size.isEmpty())
             m_intrinsicSize = LayoutSize(intrinsicSizingInfo.size);
 
         if (!isHorizontalWritingMode())
             intrinsicSizingInfo.transpose();
     } else {
         computeIntrinsicSizingInfo(intrinsicSizingInfo);
-        if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty())
+        if (!intrinsicSizingInfo.aspectRatio.isEmpty() && !intrinsicSizingInfo.size.isEmpty())
             m_intrinsicSize = LayoutSize(isHorizontalWritingMode() ? intrinsicSizingInfo.size : intrinsicSizingInfo.size.transposedSize());
     }
 }
@@ -177,8 +177,9 @@
     // axis. So for example a maximum width that shrinks our width will result in the height we compute here having
     // to shrink in order to preserve the aspect ratio. Because we compute these values independently along each
     // axis, the final returned size may in fact not preserve the aspect ratio.
+    // TODO(davve): Investigate using only the intrinsic aspect ratio here.
     FloatSize constrainedSize = intrinsicSizingInfo.size;
-    if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty() && style()->logicalWidth().isAuto() && style()->logicalHeight().isAuto()) {
+    if (!intrinsicSizingInfo.aspectRatio.isEmpty() && !intrinsicSizingInfo.size.isEmpty() && style()->logicalWidth().isAuto() && style()->logicalHeight().isAuto()) {
         // We can't multiply or divide by 'intrinsicSizingInfo.aspectRatio' here, it breaks tests, like fast/images/zoomed-img-size.html, which
         // can only be fixed once subpixel precision is available for things like intrinsicWidth/Height - which include zoom!
         constrainedSize.setWidth(LayoutBox::computeReplacedLogicalHeight() * intrinsicSizingInfo.size.width() / intrinsicSizingInfo.size.height());
@@ -537,7 +538,17 @@
     if (intrinsicSizingInfo.size.isEmpty() || !layoutObjectHasAspectRatio(this))
         return;
 
-    intrinsicSizingInfo.aspectRatio = intrinsicSizingInfo.size.width() / intrinsicSizingInfo.size.height();
+    intrinsicSizingInfo.aspectRatio = intrinsicSizingInfo.size;
+}
+
+static inline LayoutUnit resolveWidthForRatio(LayoutUnit height, const FloatSize& aspectRatio)
+{
+    return LayoutUnit(height * aspectRatio.width() / aspectRatio.height());
+}
+
+static inline LayoutUnit resolveHeightForRatio(LayoutUnit width, const FloatSize& aspectRatio)
+{
+    return LayoutUnit(width * aspectRatio.height() / aspectRatio.width());
 }
 
 LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const
@@ -559,13 +570,13 @@
         if (computedHeightIsAuto && intrinsicSizingInfo.hasWidth)
             return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit(constrainedSize.width()), shouldComputePreferred);
 
-        if (intrinsicSizingInfo.aspectRatio) {
+        if (!intrinsicSizingInfo.aspectRatio.isEmpty()) {
             // If 'height' and 'width' both have computed values of 'auto' and the element has no intrinsic width, but does have an intrinsic height and intrinsic ratio;
             // or if 'width' has a computed value of 'auto', 'height' has some other computed value, and the element does have an intrinsic ratio; then the used value
             // of 'width' is: (used height) * (intrinsic ratio)
             if ((computedHeightIsAuto && !intrinsicSizingInfo.hasWidth && intrinsicSizingInfo.hasHeight) || !computedHeightIsAuto) {
                 LayoutUnit logicalHeight = computeReplacedLogicalHeight();
-                return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit(logicalHeight * intrinsicSizingInfo.aspectRatio), shouldComputePreferred);
+                return computeReplacedLogicalWidthRespectingMinMaxWidth(resolveWidthForRatio(logicalHeight, intrinsicSizingInfo.aspectRatio), shouldComputePreferred);
             }
 
             // If 'height' and 'width' both have computed values of 'auto' and the element has an intrinsic ratio but no intrinsic height or width, then the used value of
@@ -621,8 +632,8 @@
 
     // Otherwise, if 'height' has a computed value of 'auto', and the element has an intrinsic ratio then the used value of 'height' is:
     // (used width) / (intrinsic ratio)
-    if (intrinsicSizingInfo.aspectRatio)
-        return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(availableLogicalWidth() / intrinsicSizingInfo.aspectRatio));
+    if (!intrinsicSizingInfo.aspectRatio.isEmpty())
+        return computeReplacedLogicalHeightRespectingMinMaxHeight(resolveHeightForRatio(availableLogicalWidth(), intrinsicSizingInfo.aspectRatio));
 
     // Otherwise, if 'height' has a computed value of 'auto', and the element has an intrinsic height, then that intrinsic height is the used value of 'height'.
     if (intrinsicSizingInfo.hasHeight)
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
index 6a16ef6e..0fc5ba0 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -84,12 +84,12 @@
     intrinsicSizingInfo.hasHeight = svg->hasIntrinsicHeight();
 
     if (!intrinsicSizingInfo.size.isEmpty()) {
-        intrinsicSizingInfo.aspectRatio = intrinsicSizingInfo.size.width() / static_cast<double>(intrinsicSizingInfo.size.height());
+        intrinsicSizingInfo.aspectRatio = intrinsicSizingInfo.size;
     } else {
         FloatSize viewBoxSize = svg->viewBox()->currentValue()->value().size();
         if (!viewBoxSize.isEmpty()) {
             // The viewBox can only yield an intrinsic ratio, not an intrinsic size.
-            intrinsicSizingInfo.aspectRatio = viewBoxSize.width() / static_cast<double>(viewBoxSize.height());
+            intrinsicSizingInfo.aspectRatio = viewBoxSize;
         }
     }
 
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
index 90a75246..1059150 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -156,11 +156,14 @@
     LayoutBox::IntrinsicSizingInfo intrinsicSizingInfo;
     layoutObject->computeIntrinsicSizingInfo(intrinsicSizingInfo);
 
-    if (intrinsicSizingInfo.size.isEmpty() && intrinsicSizingInfo.aspectRatio) {
-        if (!intrinsicSizingInfo.size.width() && intrinsicSizingInfo.size.height())
-            intrinsicSizingInfo.size.setWidth(intrinsicSizingInfo.size.height() * intrinsicSizingInfo.aspectRatio);
-        else if (intrinsicSizingInfo.size.width() && !intrinsicSizingInfo.size.height())
-            intrinsicSizingInfo.size.setHeight(intrinsicSizingInfo.size.width() / intrinsicSizingInfo.aspectRatio);
+    if (intrinsicSizingInfo.size.isEmpty() && !intrinsicSizingInfo.aspectRatio.isEmpty()) {
+        if (!intrinsicSizingInfo.size.width() && intrinsicSizingInfo.size.height()) {
+            intrinsicSizingInfo.size.setWidth(
+                intrinsicSizingInfo.size.height() * intrinsicSizingInfo.aspectRatio.width() / intrinsicSizingInfo.aspectRatio.height());
+        } else if (intrinsicSizingInfo.size.width() && !intrinsicSizingInfo.size.height()) {
+            intrinsicSizingInfo.size.setHeight(
+                intrinsicSizingInfo.size.width() * intrinsicSizingInfo.aspectRatio.height() / intrinsicSizingInfo.aspectRatio.width());
+        }
     }
 
     // TODO(davve): In order to maintain aspect ratio the intrinsic
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
index 560e4c1f..991d2719 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
@@ -62,6 +62,7 @@
         // SecurityErrors:
         MAP_ERROR(GATTNotAuthorized, SecurityError, "GATT operation not authorized.");
         MAP_ERROR(NotAllowedToAccessService, SecurityError, "Origin is not allowed to access the service. Remember to add the service to a filter or to optionalServices in requestDevice().");
+        MAP_ERROR(RequestDeviceWithBlacklistedUUID, SecurityError, "requestDevice() called with a filter containing a blacklisted UUID. https://goo.gl/4NeimX");
         MAP_ERROR(RequestDeviceWithUniqueOrigin, SecurityError, "requestDevice() called from sandboxed or otherwise unique origin.");
         MAP_ERROR(RequestDeviceWithoutFrame, SecurityError, "No window to show the requestDevice() dialog.");
 
diff --git a/third_party/WebKit/Tools/Scripts/debug-webkit-test b/third_party/WebKit/Tools/Scripts/debug-webkit-test
new file mode 100755
index 0000000..c396e37
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/debug-webkit-test
@@ -0,0 +1,57 @@
+#!/bin/bash
+# Copyright 2016 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.
+
+# Runs run-webkit-tests and attaches a debugger to the first renderer process.
+
+if [ $# -eq 0 ]; then
+  echo "usage: $(basename $0) [run-webkit-tests args...] test-path/test-name.html"
+  exit 1
+fi
+
+OS=$(uname)
+SCRIPTS_DIR=$(dirname $0)
+if [[ "$OS" == "Darwin" ]]; then
+  CONTENT_SHELL="Content Shell.app"
+elif [[ "$OS" == "Linux" ]]; then
+  CONTENT_SHELL="content_shell"
+else
+  echo "Support for $OS has not been tested yet."
+  exit 1
+fi
+RENDERER_REGEX="/$CONTENT_SHELL.* --type=renderer .*--renderer-startup-dialog"
+
+if [ -z "$DEBUGGER" ]; then
+  if which lldb > /dev/null; then
+    DEBUGGER="lldb"
+    CONTINUE="continue"
+  elif which gdb > /dev/null; then
+    DEBUGGER="gdb -q"
+    CONTINUE="signal SIGUSR1"
+  else
+    echo "No debugger found"
+    exit 1
+  fi
+fi
+
+# Kill existing matching renderers before we begin to ensure a clean run.
+pkill -f "$RENDERER_REGEX"
+$SCRIPTS_DIR/run-webkit-tests --time-out-ms=100000000 --additional-driver-flag=--no-sandbox --additional-driver-flag=--renderer-startup-dialog $* &
+
+wait_renderer_pid() {
+  for i in {1..200}; do
+    sleep 0.2
+    RENDERER_PID=$(pgrep -f "$RENDERER_REGEX")
+    [ -n "$RENDERER_PID" ] && return
+  done
+}
+
+wait_renderer_pid
+if [ -n "$RENDERER_PID" ]; then
+  # print yellow message
+  echo -e "\n\033[1;33mDebugging renderer, use '$CONTINUE' to run.\033[0m\n"
+  $DEBUGGER -p $RENDERER_PID
+else
+  echo "Timed out waiting for renderer."
+fi
\ No newline at end of file
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h
index 5f5ef5fa..db987e5 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h
+++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h
@@ -56,6 +56,7 @@
     // SecurityError:
     GATTNotAuthorized,
     NotAllowedToAccessService,
+    RequestDeviceWithBlacklistedUUID,
     RequestDeviceWithUniqueOrigin,
     RequestDeviceWithoutFrame,
     // SyntaxError:
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index a2fdd73..5d4f1d8 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -81846,6 +81846,7 @@
   <int value="10"
       label="Chooser insta-closed because Chrome isn't allowed to ask for
              permission to scan for BT devices"/>
+  <int value="11" label="Blacklisted service UUID in filter"/>
 </enum>
 
 <enum name="WebCertVerifyAgreement" type="int">
diff --git a/ui/ozone/BUILD.gn b/ui/ozone/BUILD.gn
index fb647e0..c8c0b5b 100644
--- a/ui/ozone/BUILD.gn
+++ b/ui/ozone/BUILD.gn
@@ -46,6 +46,7 @@
 if (ozone_platform_wayland) {
   ozone_platforms += [ "wayland" ]
   ozone_platform_deps += [ "platform/wayland" ]
+  ozone_platform_test_deps += [ "platform/wayland:wayland_unittests" ]
 }
 
 if (ozone_platform_x11) {
diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn
index 98c74a4..a2a8aa14 100644
--- a/ui/ozone/platform/wayland/BUILD.gn
+++ b/ui/ozone/platform/wayland/BUILD.gn
@@ -22,6 +22,31 @@
     "//skia",
     "//third_party/wayland:wayland_client",
     "//third_party/wayland-protocols:xdg_shell_protocol",
+    "//ui/events/platform",
     "//ui/ozone:ozone_base",
   ]
+
+  defines = [ "OZONE_IMPLEMENTATION" ]
+}
+
+source_set("wayland_unittests") {
+  testonly = true
+
+  sources = [
+    "fake_server.cc",
+    "fake_server.h",
+    "mock_platform_window_delegate.cc",
+    "wayland_display_unittest.cc",
+    "wayland_surface_factory_unittest.cc",
+    "wayland_window_unittest.cc",
+  ]
+
+  deps = [
+    "//testing/gmock",
+    "//testing/gtest",
+    "//third_party/wayland:wayland_server",
+    "//third_party/wayland-protocols:xdg_shell_protocol",
+    "//ui/gfx:test_support",
+    "//ui/ozone",
+  ]
 }
diff --git a/ui/ozone/platform/wayland/fake_server.cc b/ui/ozone/platform/wayland/fake_server.cc
new file mode 100644
index 0000000..fbabc1d2
--- /dev/null
+++ b/ui/ozone/platform/wayland/fake_server.cc
@@ -0,0 +1,350 @@
+// Copyright 2016 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 "ui/ozone/platform/wayland/fake_server.h"
+
+#include <sys/socket.h>
+#include <wayland-server.h>
+#include <xdg-shell-unstable-v5-server-protocol.h>
+
+#include "base/bind.h"
+#include "base/files/scoped_file.h"
+#include "base/strings/string_number_conversions.h"
+
+namespace wl {
+namespace {
+
+const uint32_t kCompositorVersion = 4;
+const uint32_t kSurfaceVersion = 4;
+const uint32_t kXdgShellVersion = 1;
+const uint32_t kXdgSurfaceVersion = 1;
+
+void DestroyResource(wl_client* client, wl_resource* resource) {
+  wl_resource_destroy(resource);
+}
+
+// wl_compositor
+
+void CreateSurface(wl_client* client, wl_resource* resource, uint32_t id) {
+  auto compositor =
+      static_cast<MockCompositor*>(wl_resource_get_user_data(resource));
+  wl_resource* surface_resource =
+      wl_resource_create(client, &wl_surface_interface, kSurfaceVersion, id);
+  if (!surface_resource) {
+    wl_client_post_no_memory(client);
+    return;
+  }
+  compositor->AddSurface(make_scoped_ptr(new MockSurface(surface_resource)));
+}
+
+const struct wl_compositor_interface compositor_impl = {
+    &CreateSurface,  // create_surface
+    nullptr,         // create_region
+};
+
+// wl_surface
+
+void Attach(wl_client* client,
+            wl_resource* resource,
+            wl_resource* buffer_resource,
+            int32_t x,
+            int32_t y) {
+  static_cast<MockSurface*>(wl_resource_get_user_data(resource))
+      ->Attach(buffer_resource, x, y);
+}
+
+void Damage(wl_client* client,
+            wl_resource* resource,
+            int32_t x,
+            int32_t y,
+            int32_t width,
+            int32_t height) {
+  static_cast<MockSurface*>(wl_resource_get_user_data(resource))
+      ->Damage(x, y, width, height);
+}
+
+void Commit(wl_client* client, wl_resource* resource) {
+  static_cast<MockSurface*>(wl_resource_get_user_data(resource))->Commit();
+}
+
+const struct wl_surface_interface surface_impl = {
+    &DestroyResource,  // destroy
+    &Attach,           // attach
+    &Damage,           // damage
+    nullptr,           // frame
+    nullptr,           // set_opaque_region
+    nullptr,           // set_input_region
+    &Commit,           // commit
+    nullptr,           // set_buffer_transform
+    nullptr,           // set_buffer_scale
+};
+
+// xdg_shell
+
+void UseUnstableVersion(wl_client* client,
+                        wl_resource* resource,
+                        int32_t version) {
+  static_cast<MockXdgShell*>(wl_resource_get_user_data(resource))
+      ->UseUnstableVersion(version);
+}
+
+void GetXdgSurface(wl_client* client,
+                   wl_resource* resource,
+                   uint32_t id,
+                   wl_resource* surface_resource) {
+  auto surface =
+      static_cast<MockSurface*>(wl_resource_get_user_data(surface_resource));
+  if (surface->xdg_surface) {
+    wl_resource_post_error(resource, XDG_SHELL_ERROR_ROLE,
+                           "surface already has a role");
+    return;
+  }
+  wl_resource* xdg_surface_resource = wl_resource_create(
+      client, &xdg_surface_interface, kXdgSurfaceVersion, id);
+  if (!xdg_surface_resource) {
+    wl_client_post_no_memory(client);
+    return;
+  }
+  surface->xdg_surface.reset(new MockXdgSurface(xdg_surface_resource));
+}
+
+void Pong(wl_client* client, wl_resource* resource, uint32_t serial) {
+  static_cast<MockXdgShell*>(wl_resource_get_user_data(resource))->Pong(serial);
+}
+
+const struct xdg_shell_interface xdg_shell_impl = {
+    &DestroyResource,     // destroy
+    &UseUnstableVersion,  // use_unstable_version
+    &GetXdgSurface,       // get_xdg_surface
+    nullptr,              // get_xdg_popup
+    &Pong,                // pong
+};
+
+// xdg_surface
+
+void SetTitle(wl_client* client, wl_resource* resource, const char* title) {
+  static_cast<MockXdgSurface*>(wl_resource_get_user_data(resource))
+      ->SetTitle(title);
+}
+
+void SetAppId(wl_client* client, wl_resource* resource, const char* app_id) {
+  static_cast<MockXdgSurface*>(wl_resource_get_user_data(resource))
+      ->SetAppId(app_id);
+}
+
+void AckConfigure(wl_client* client, wl_resource* resource, uint32_t serial) {
+  static_cast<MockXdgSurface*>(wl_resource_get_user_data(resource))
+      ->AckConfigure(serial);
+}
+
+void SetMaximized(wl_client* client, wl_resource* resource) {
+  static_cast<MockXdgSurface*>(wl_resource_get_user_data(resource))
+      ->SetMaximized();
+}
+
+void UnsetMaximized(wl_client* client, wl_resource* resource) {
+  static_cast<MockXdgSurface*>(wl_resource_get_user_data(resource))
+      ->UnsetMaximized();
+}
+
+void SetMinimized(wl_client* client, wl_resource* resource) {
+  static_cast<MockXdgSurface*>(wl_resource_get_user_data(resource))
+      ->SetMinimized();
+}
+
+const struct xdg_surface_interface xdg_surface_impl = {
+    &DestroyResource,  // destroy
+    nullptr,           // set_parent
+    &SetTitle,         // set_title
+    &SetAppId,         // set_app_id
+    nullptr,           // show_window_menu
+    nullptr,           // move
+    nullptr,           // resize
+    &AckConfigure,     // ack_configure
+    nullptr,           // set_window_geometry
+    &SetMaximized,     // set_maximized
+    &UnsetMaximized,   // set_unmaximized
+    nullptr,           // set_fullscreen
+    nullptr,           // unset_fullscreen
+    &SetMinimized,     // set_minimized
+};
+
+}  // namespace
+
+ServerObject::ServerObject(wl_resource* resource) : resource_(resource) {}
+
+ServerObject::~ServerObject() {
+  if (resource_)
+    wl_resource_destroy(resource_);
+}
+
+// static
+void ServerObject::OnResourceDestroyed(wl_resource* resource) {
+  auto obj = static_cast<ServerObject*>(wl_resource_get_user_data(resource));
+  obj->resource_ = nullptr;
+}
+
+MockXdgSurface::MockXdgSurface(wl_resource* resource) : ServerObject(resource) {
+  wl_resource_set_implementation(resource, &xdg_surface_impl, this,
+                                 &ServerObject::OnResourceDestroyed);
+}
+
+MockXdgSurface::~MockXdgSurface() {}
+
+MockSurface::MockSurface(wl_resource* resource) : ServerObject(resource) {
+  wl_resource_set_implementation(resource, &surface_impl, this,
+                                 &ServerObject::OnResourceDestroyed);
+}
+
+MockSurface::~MockSurface() {
+  if (xdg_surface && xdg_surface->resource())
+    wl_resource_destroy(xdg_surface->resource());
+}
+
+MockSurface* MockSurface::FromResource(wl_resource* resource) {
+  if (!wl_resource_instance_of(resource, &wl_surface_interface, &surface_impl))
+    return nullptr;
+  return static_cast<MockSurface*>(wl_resource_get_user_data(resource));
+}
+
+void GlobalDeleter::operator()(wl_global* global) {
+  wl_global_destroy(global);
+}
+
+Global::Global(const wl_interface* interface,
+               const void* implementation,
+               uint32_t version)
+    : interface_(interface),
+      implementation_(implementation),
+      version_(version) {}
+
+Global::~Global() {}
+
+bool Global::Initialize(wl_display* display) {
+  global_.reset(wl_global_create(display, interface_, version_, this, &Bind));
+  return global_;
+}
+
+// static
+void Global::Bind(wl_client* client,
+                  void* data,
+                  uint32_t version,
+                  uint32_t id) {
+  auto global = static_cast<Global*>(data);
+  wl_resource* resource =
+      wl_resource_create(client, global->interface_, global->version_, id);
+  if (!resource) {
+    wl_client_post_no_memory(client);
+    return;
+  }
+  if (!global->resource_)
+    global->resource_ = resource;
+  wl_resource_set_implementation(resource, global->implementation_, global,
+                                 &Global::OnResourceDestroyed);
+}
+
+// static
+void Global::OnResourceDestroyed(wl_resource* resource) {
+  auto global = static_cast<Global*>(wl_resource_get_user_data(resource));
+  if (global->resource_ == resource)
+    global->resource_ = nullptr;
+}
+
+MockCompositor::MockCompositor()
+    : Global(&wl_compositor_interface, &compositor_impl, kCompositorVersion) {}
+
+MockCompositor::~MockCompositor() {}
+
+void MockCompositor::AddSurface(scoped_ptr<MockSurface> surface) {
+  surfaces_.push_back(std::move(surface));
+}
+
+MockXdgShell::MockXdgShell()
+    : Global(&xdg_shell_interface, &xdg_shell_impl, kXdgShellVersion) {}
+
+MockXdgShell::~MockXdgShell() {}
+
+void DisplayDeleter::operator()(wl_display* display) {
+  wl_display_destroy(display);
+}
+
+FakeServer::FakeServer()
+    : Thread("fake_wayland_server"),
+      pause_event_(false, false),
+      resume_event_(false, false) {}
+
+FakeServer::~FakeServer() {
+  Stop();
+}
+
+bool FakeServer::Start() {
+  display_.reset(wl_display_create());
+  if (!display_)
+    return false;
+  event_loop_ = wl_display_get_event_loop(display_.get());
+
+  int fd[2];
+  if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, fd) < 0)
+    return false;
+  base::ScopedFD server_fd(fd[0]);
+  base::ScopedFD client_fd(fd[1]);
+
+  if (wl_display_init_shm(display_.get()) < 0)
+    return false;
+  if (!compositor_.Initialize(display_.get()))
+    return false;
+  if (!xdg_shell_.Initialize(display_.get()))
+    return false;
+
+  client_ = wl_client_create(display_.get(), server_fd.get());
+  if (!client_)
+    return false;
+  (void)server_fd.release();
+
+  base::Thread::Options options;
+  options.message_pump_factory =
+      base::Bind(&FakeServer::CreateMessagePump, base::Unretained(this));
+  if (!base::Thread::StartWithOptions(options))
+    return false;
+
+  setenv("WAYLAND_SOCKET", base::UintToString(client_fd.release()).c_str(), 1);
+
+  return true;
+}
+
+void FakeServer::Flush() {
+  wl_display_flush_clients(display_.get());
+}
+
+void FakeServer::Pause() {
+  task_runner()->PostTask(
+      FROM_HERE, base::Bind(&FakeServer::DoPause, base::Unretained(this)));
+  pause_event_.Wait();
+}
+
+void FakeServer::Resume() {
+  resume_event_.Signal();
+}
+
+void FakeServer::DoPause() {
+  pause_event_.Signal();
+  resume_event_.Wait();
+}
+
+scoped_ptr<base::MessagePump> FakeServer::CreateMessagePump() {
+  auto pump = make_scoped_ptr(new base::MessagePumpLibevent);
+  pump->WatchFileDescriptor(wl_event_loop_get_fd(event_loop_), true,
+                            base::MessagePumpLibevent::WATCH_READ, &controller_,
+                            this);
+  return std::move(pump);
+}
+
+void FakeServer::OnFileCanReadWithoutBlocking(int fd) {
+  wl_event_loop_dispatch(event_loop_, 0);
+  wl_display_flush_clients(display_.get());
+}
+
+void FakeServer::OnFileCanWriteWithoutBlocking(int fd) {}
+
+}  // namespace wl
diff --git a/ui/ozone/platform/wayland/fake_server.h b/ui/ozone/platform/wayland/fake_server.h
new file mode 100644
index 0000000..befde1c
--- /dev/null
+++ b/ui/ozone/platform/wayland/fake_server.h
@@ -0,0 +1,189 @@
+// Copyright 2016 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 UI_OZONE_PLATFORM_WAYLAND_FAKE_SERVER_H_
+#define UI_OZONE_PLATFORM_WAYLAND_FAKE_SERVER_H_
+
+#include <wayland-server-core.h>
+
+#include "base/bind.h"
+#include "base/message_loop/message_pump_libevent.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+struct wl_client;
+struct wl_display;
+struct wl_event_loop;
+struct wl_global;
+struct wl_resource;
+
+namespace wl {
+
+class ServerObject {
+ public:
+  ServerObject(wl_resource* resource);
+  virtual ~ServerObject();
+
+  wl_resource* resource() { return resource_; }
+
+  static void OnResourceDestroyed(wl_resource* resource);
+
+ private:
+  wl_resource* resource_;
+
+  DISALLOW_COPY_AND_ASSIGN(ServerObject);
+};
+
+class MockXdgSurface : public ServerObject {
+ public:
+  MockXdgSurface(wl_resource* resource);
+  ~MockXdgSurface() override;
+
+  MOCK_METHOD1(SetParent, void(wl_resource* parent));
+  MOCK_METHOD1(SetTitle, void(const char* title));
+  MOCK_METHOD1(SetAppId, void(const char* app_id));
+  MOCK_METHOD1(AckConfigure, void(uint32_t serial));
+  MOCK_METHOD0(SetMaximized, void());
+  MOCK_METHOD0(UnsetMaximized, void());
+  MOCK_METHOD0(SetMinimized, void());
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockXdgSurface);
+};
+
+class MockSurface : public ServerObject {
+ public:
+  MockSurface(wl_resource* resource);
+  ~MockSurface() override;
+
+  static MockSurface* FromResource(wl_resource* resource);
+
+  MOCK_METHOD3(Attach, void(wl_resource* buffer, int32_t x, int32_t y));
+  MOCK_METHOD4(Damage,
+               void(int32_t x, int32_t y, int32_t width, int32_t height));
+  MOCK_METHOD0(Commit, void());
+
+  scoped_ptr<MockXdgSurface> xdg_surface;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockSurface);
+};
+
+struct GlobalDeleter {
+  void operator()(wl_global* global);
+};
+
+class Global {
+ public:
+  Global(const wl_interface* interface,
+         const void* implementation,
+         uint32_t version);
+  virtual ~Global();
+
+  bool Initialize(wl_display* display);
+
+  // The first bound resource to this global, which is usually all that is
+  // useful when testing a simple client.
+  wl_resource* resource() { return resource_; }
+
+  static void Bind(wl_client* client,
+                   void* data,
+                   uint32_t version,
+                   uint32_t id);
+  static void OnResourceDestroyed(wl_resource* resource);
+
+ private:
+  scoped_ptr<wl_global, GlobalDeleter> global_;
+
+  const wl_interface* interface_;
+  const void* implementation_;
+  const uint32_t version_;
+  wl_resource* resource_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(Global);
+};
+
+class MockCompositor : public Global {
+ public:
+  MockCompositor();
+  ~MockCompositor() override;
+
+  void AddSurface(scoped_ptr<MockSurface> surface);
+
+ private:
+  std::vector<scoped_ptr<MockSurface>> surfaces_;
+
+  DISALLOW_COPY_AND_ASSIGN(MockCompositor);
+};
+
+class MockXdgShell : public Global {
+ public:
+  MockXdgShell();
+  ~MockXdgShell() override;
+
+  MOCK_METHOD1(UseUnstableVersion, void(int32_t version));
+  MOCK_METHOD1(Pong, void(uint32_t serial));
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockXdgShell);
+};
+
+struct DisplayDeleter {
+  void operator()(wl_display* display);
+};
+
+class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher {
+ public:
+  FakeServer();
+  ~FakeServer() override;
+
+  // Start the fake Wayland server. If this succeeds, the WAYLAND_SOCKET
+  // environment variable will be set to the string representation of a file
+  // descriptor that a client can connect to. The caller is responsible for
+  // ensuring that this file descriptor gets closed (for example, by calling
+  // wl_display_connect).
+  bool Start();
+
+  void Flush();
+
+  void Pause();
+  void Resume();
+
+  template <typename T>
+  T* GetObject(uint32_t id) {
+    wl_resource* resource = wl_client_get_object(client_, id);
+    return resource ? T::FromResource(resource) : nullptr;
+  }
+
+  MockXdgShell* xdg_shell() { return &xdg_shell_; }
+
+ private:
+  void DoPause();
+
+  scoped_ptr<base::MessagePump> CreateMessagePump();
+
+  // base::MessagePumpLibevent::Watcher
+  void OnFileCanReadWithoutBlocking(int fd) override;
+  void OnFileCanWriteWithoutBlocking(int fd) override;
+
+  scoped_ptr<wl_display, DisplayDeleter> display_;
+  wl_client* client_ = nullptr;
+  wl_event_loop* event_loop_ = nullptr;
+
+  base::WaitableEvent pause_event_;
+  base::WaitableEvent resume_event_;
+  bool paused_ = false;
+
+  MockCompositor compositor_;
+  MockXdgShell xdg_shell_;
+
+  base::MessagePumpLibevent::FileDescriptorWatcher controller_;
+
+  DISALLOW_COPY_AND_ASSIGN(FakeServer);
+};
+
+}  // namespace wl
+
+#endif  // UI_OZONE_PLATFORM_WAYLAND_FAKE_SERVER_H_
diff --git a/ui/ozone/platform/wayland/mock_platform_window_delegate.cc b/ui/ozone/platform/wayland/mock_platform_window_delegate.cc
new file mode 100644
index 0000000..aeb57a5
--- /dev/null
+++ b/ui/ozone/platform/wayland/mock_platform_window_delegate.cc
@@ -0,0 +1,13 @@
+// Copyright 2016 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 "ui/ozone/platform/wayland/mock_platform_window_delegate.h"
+
+namespace ui {
+
+MockPlatformWindowDelegate::MockPlatformWindowDelegate() {}
+
+MockPlatformWindowDelegate::~MockPlatformWindowDelegate() {}
+
+}  // namespace ui
diff --git a/ui/ozone/platform/wayland/mock_platform_window_delegate.h b/ui/ozone/platform/wayland/mock_platform_window_delegate.h
new file mode 100644
index 0000000..7b8967df
--- /dev/null
+++ b/ui/ozone/platform/wayland/mock_platform_window_delegate.h
@@ -0,0 +1,32 @@
+// Copyright 2016 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 "ui/platform_window/platform_window_delegate.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "ui/gfx/geometry/rect.h"
+
+namespace ui {
+
+class MockPlatformWindowDelegate : public PlatformWindowDelegate {
+ public:
+  MockPlatformWindowDelegate();
+  ~MockPlatformWindowDelegate();
+
+  MOCK_METHOD1(OnBoundsChanged, void(const gfx::Rect& new_bounds));
+  MOCK_METHOD1(OnDamageRect, void(const gfx::Rect& damaged_region));
+  MOCK_METHOD1(DispatchEvent, void(Event* event));
+  MOCK_METHOD0(OnCloseRequest, void());
+  MOCK_METHOD0(OnClosed, void());
+  MOCK_METHOD1(OnWindowStateChanged, void(PlatformWindowState new_state));
+  MOCK_METHOD0(OnLostCapture, void());
+  MOCK_METHOD2(OnAcceleratedWidgetAvailable,
+               void(gfx::AcceleratedWidget widget, float device_pixel_ratio));
+  MOCK_METHOD0(OnAcceleratedWidgetDestroyed, void());
+  MOCK_METHOD1(OnActivationChanged, void(bool active));
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockPlatformWindowDelegate);
+};
+
+}  // namespace ui
diff --git a/ui/ozone/platform/wayland/wayland.gypi b/ui/ozone/platform/wayland/wayland.gypi
index cd4bb85..ec11e42 100644
--- a/ui/ozone/platform/wayland/wayland.gypi
+++ b/ui/ozone/platform/wayland/wayland.gypi
@@ -7,6 +7,9 @@
     'internal_ozone_platform_deps': [
       'ozone_platform_wayland',
     ],
+    'internal_ozone_platform_unittest_deps': [
+      'ozone_platform_wayland_unittests',
+    ],
     'internal_ozone_platforms': [
       'wayland'
     ],
@@ -26,18 +29,46 @@
         '../events/platform/events_platform.gyp:events_platform',
       ],
       'sources': [
-        "client_native_pixmap_factory_wayland.cc",
-        "client_native_pixmap_factory_wayland.h",
-        "ozone_platform_wayland.cc",
-        "ozone_platform_wayland.h",
-        "wayland_display.cc",
-        "wayland_display.h",
-        "wayland_object.h",
-        "wayland_surface_factory.cc",
-        "wayland_surface_factory.h",
-        "wayland_window.cc",
-        "wayland_window.h",
+        'client_native_pixmap_factory_wayland.cc',
+        'client_native_pixmap_factory_wayland.h',
+        'ozone_platform_wayland.cc',
+        'ozone_platform_wayland.h',
+        'wayland_display.cc',
+        'wayland_display.h',
+        'wayland_object.h',
+        'wayland_surface_factory.cc',
+        'wayland_surface_factory.h',
+        'wayland_window.cc',
+        'wayland_window.h',
       ],
     },
+    {
+      'target_name': 'ozone_platform_wayland_unittests',
+      'type': 'none',
+      'dependencies': [
+        '../../skia/skia.gyp:skia',
+        '../../testing/gmock.gyp:gmock',
+        '../../third_party/wayland-protocols/wayland-protocols.gyp:xdg_shell_protocol',
+        '../../third_party/wayland/wayland.gyp:wayland_server',
+        '../gfx/gfx.gyp:gfx_test_support',
+      ],
+      'export_dependent_settings': [
+        '../../skia/skia.gyp:skia',
+        '../../testing/gmock.gyp:gmock',
+        '../../third_party/wayland-protocols/wayland-protocols.gyp:xdg_shell_protocol',
+        '../../third_party/wayland/wayland.gyp:wayland_server',
+        '../gfx/gfx.gyp:gfx_test_support',
+      ],
+      'direct_dependent_settings': {
+        'sources': [
+          'fake_server.cc',
+          'fake_server.h',
+          'mock_platform_window_delegate.cc',
+          'wayland_display_unittest.cc',
+          'wayland_surface_factory_unittest.cc',
+          'wayland_window_unittest.cc',
+        ],
+      },
+    },
   ],
 }
diff --git a/ui/ozone/platform/wayland/wayland_display.h b/ui/ozone/platform/wayland/wayland_display.h
index 99b1366..3864f19 100644
--- a/ui/ozone/platform/wayland/wayland_display.h
+++ b/ui/ozone/platform/wayland/wayland_display.h
@@ -10,14 +10,15 @@
 #include "base/message_loop/message_pump_libevent.h"
 #include "ui/events/platform/platform_event_source.h"
 #include "ui/gfx/native_widget_types.h"
+#include "ui/ozone/ozone_export.h"
 #include "ui/ozone/platform/wayland/wayland_object.h"
 
 namespace ui {
 
 class WaylandWindow;
 
-class WaylandDisplay : public PlatformEventSource,
-                       public base::MessagePumpLibevent::Watcher {
+class OZONE_EXPORT WaylandDisplay : public PlatformEventSource,
+                                    public base::MessagePumpLibevent::Watcher {
  public:
   WaylandDisplay();
   ~WaylandDisplay() override;
@@ -27,6 +28,7 @@
   // Flushes the Wayland connection.
   void Flush();
 
+  wl_display* display() { return display_.get(); }
   wl_compositor* compositor() { return compositor_.get(); }
   wl_shm* shm() { return shm_.get(); }
   xdg_shell* shell() { return shell_.get(); }
diff --git a/ui/ozone/platform/wayland/wayland_display_unittest.cc b/ui/ozone/platform/wayland/wayland_display_unittest.cc
new file mode 100644
index 0000000..a50f83f
--- /dev/null
+++ b/ui/ozone/platform/wayland/wayland_display_unittest.cc
@@ -0,0 +1,42 @@
+// Copyright 2016 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 <wayland-server-core.h>
+#include <xdg-shell-unstable-v5-server-protocol.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/ozone/platform/wayland/fake_server.h"
+#include "ui/ozone/platform/wayland/wayland_display.h"
+
+namespace ui {
+
+TEST(WaylandDisplayTest, UseUnstableVersion) {
+  wl::FakeServer server;
+  EXPECT_CALL(*server.xdg_shell(),
+              UseUnstableVersion(XDG_SHELL_VERSION_CURRENT));
+  ASSERT_TRUE(server.Start());
+  WaylandDisplay display;
+  ASSERT_TRUE(display.Initialize());
+  wl_display_roundtrip(display.display());
+}
+
+TEST(WaylandDisplayTest, Ping) {
+  wl::FakeServer server;
+  ASSERT_TRUE(server.Start());
+  WaylandDisplay display;
+  ASSERT_TRUE(display.Initialize());
+  wl_display_roundtrip(display.display());
+
+  server.Pause();
+
+  xdg_shell_send_ping(server.xdg_shell()->resource(), 1234);
+  EXPECT_CALL(*server.xdg_shell(), Pong(1234));
+  server.Flush();
+
+  server.Resume();
+
+  wl_display_roundtrip(display.display());
+}
+
+}  // namespace ui
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.cc b/ui/ozone/platform/wayland/wayland_surface_factory.cc
index afb44829..6294c9c 100644
--- a/ui/ozone/platform/wayland/wayland_surface_factory.cc
+++ b/ui/ozone/platform/wayland/wayland_surface_factory.cc
@@ -47,7 +47,7 @@
 
 WaylandCanvasSurface::WaylandCanvasSurface(WaylandDisplay* display,
                                            WaylandWindow* window)
-    : display_(display), window_(window) {}
+    : display_(display), window_(window), size_(window->GetBounds().size()) {}
 
 WaylandCanvasSurface::~WaylandCanvasSurface() {}
 
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.h b/ui/ozone/platform/wayland/wayland_surface_factory.h
index bfcc32f..3b43f27 100644
--- a/ui/ozone/platform/wayland/wayland_surface_factory.h
+++ b/ui/ozone/platform/wayland/wayland_surface_factory.h
@@ -5,13 +5,14 @@
 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_SURFACE_FACTORY_H_
 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_SURFACE_FACTORY_H_
 
+#include "ui/ozone/ozone_export.h"
 #include "ui/ozone/public/surface_factory_ozone.h"
 
 namespace ui {
 
 class WaylandDisplay;
 
-class WaylandSurfaceFactory : public SurfaceFactoryOzone {
+class OZONE_EXPORT WaylandSurfaceFactory : public SurfaceFactoryOzone {
  public:
   explicit WaylandSurfaceFactory(WaylandDisplay* display);
   ~WaylandSurfaceFactory() override;
diff --git a/ui/ozone/platform/wayland/wayland_surface_factory_unittest.cc b/ui/ozone/platform/wayland/wayland_surface_factory_unittest.cc
new file mode 100644
index 0000000..36e31131
--- /dev/null
+++ b/ui/ozone/platform/wayland/wayland_surface_factory_unittest.cc
@@ -0,0 +1,118 @@
+// Copyright 2016 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 "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkSurface.h"
+#include "ui/ozone/platform/wayland/fake_server.h"
+#include "ui/ozone/platform/wayland/mock_platform_window_delegate.h"
+#include "ui/ozone/platform/wayland/wayland_display.h"
+#include "ui/ozone/platform/wayland/wayland_surface_factory.h"
+#include "ui/ozone/platform/wayland/wayland_window.h"
+#include "ui/ozone/public/surface_ozone_canvas.h"
+
+using ::testing::Expectation;
+using ::testing::Mock;
+using ::testing::SaveArg;
+using ::testing::_;
+
+namespace ui {
+
+class WaylandSurfaceFactoryTest : public testing::Test {
+ public:
+  WaylandSurfaceFactoryTest()
+      : surface_factory(&display),
+        window(&delegate, &display, gfx::Rect(0, 0, 80, 60)) {}
+
+  ~WaylandSurfaceFactoryTest() override {}
+
+  void SetUp() override {
+    ASSERT_TRUE(server.Start());
+    ASSERT_TRUE(display.Initialize());
+    ASSERT_TRUE(window.Initialize());
+    wl_display_roundtrip(display.display());
+
+    server.Pause();
+
+    surface = server.GetObject<wl::MockSurface>(window.GetWidget());
+    ASSERT_TRUE(surface);
+    initialized = true;
+  }
+
+  void TearDown() override {
+    server.Resume();
+    if (initialized)
+      wl_display_roundtrip(display.display());
+  }
+
+  void Sync() {
+    server.Resume();
+    wl_display_roundtrip(display.display());
+    server.Pause();
+  }
+
+ private:
+  wl::FakeServer server;
+  bool initialized = false;
+
+ protected:
+  WaylandDisplay display;
+  WaylandSurfaceFactory surface_factory;
+  MockPlatformWindowDelegate delegate;
+  WaylandWindow window;
+  wl::MockSurface* surface;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(WaylandSurfaceFactoryTest);
+};
+
+TEST_F(WaylandSurfaceFactoryTest, Canvas) {
+  auto canvas = surface_factory.CreateCanvasForWidget(window.GetWidget());
+  ASSERT_TRUE(canvas);
+
+  canvas->GetSurface();
+  canvas->PresentCanvas(gfx::Rect(5, 10, 20, 15));
+
+  Expectation damage = EXPECT_CALL(*surface, Damage(5, 10, 20, 15));
+  wl_resource* buffer_resource = nullptr;
+  Expectation attach = EXPECT_CALL(*surface, Attach(_, 0, 0))
+                           .WillOnce(SaveArg<0>(&buffer_resource));
+  EXPECT_CALL(*surface, Commit()).After(damage, attach);
+
+  Sync();
+
+  ASSERT_TRUE(buffer_resource);
+  wl_shm_buffer* buffer = wl_shm_buffer_get(buffer_resource);
+  ASSERT_TRUE(buffer);
+  EXPECT_EQ(wl_shm_buffer_get_width(buffer), 80);
+  EXPECT_EQ(wl_shm_buffer_get_height(buffer), 60);
+
+  // TODO(forney): We could check that the contents match something drawn to the
+  // SkSurface above.
+}
+
+TEST_F(WaylandSurfaceFactoryTest, CanvasResize) {
+  auto canvas = surface_factory.CreateCanvasForWidget(window.GetWidget());
+  ASSERT_TRUE(canvas);
+
+  canvas->GetSurface();
+  canvas->ResizeCanvas(gfx::Size(100, 50));
+  canvas->GetSurface();
+  canvas->PresentCanvas(gfx::Rect(0, 0, 100, 50));
+
+  Expectation damage = EXPECT_CALL(*surface, Damage(0, 0, 100, 50));
+  wl_resource* buffer_resource = nullptr;
+  Expectation attach = EXPECT_CALL(*surface, Attach(_, 0, 0))
+                           .WillOnce(SaveArg<0>(&buffer_resource));
+  EXPECT_CALL(*surface, Commit()).After(damage, attach);
+
+  Sync();
+
+  ASSERT_TRUE(buffer_resource);
+  wl_shm_buffer* buffer = wl_shm_buffer_get(buffer_resource);
+  ASSERT_TRUE(buffer);
+  EXPECT_EQ(wl_shm_buffer_get_width(buffer), 100);
+  EXPECT_EQ(wl_shm_buffer_get_height(buffer), 50);
+}
+
+}  // namespace ui
diff --git a/ui/ozone/platform/wayland/wayland_window.h b/ui/ozone/platform/wayland/wayland_window.h
index 8b8d5a20..f1e9e95 100644
--- a/ui/ozone/platform/wayland/wayland_window.h
+++ b/ui/ozone/platform/wayland/wayland_window.h
@@ -7,6 +7,7 @@
 
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/native_widget_types.h"
+#include "ui/ozone/ozone_export.h"
 #include "ui/ozone/platform/wayland/wayland_object.h"
 #include "ui/platform_window/platform_window.h"
 
@@ -14,7 +15,7 @@
 
 class WaylandDisplay;
 
-class WaylandWindow : public PlatformWindow {
+class OZONE_EXPORT WaylandWindow : public PlatformWindow {
  public:
   WaylandWindow(PlatformWindowDelegate* delegate,
                 WaylandDisplay* display,
diff --git a/ui/ozone/platform/wayland/wayland_window_unittest.cc b/ui/ozone/platform/wayland/wayland_window_unittest.cc
new file mode 100644
index 0000000..4a1364f
--- /dev/null
+++ b/ui/ozone/platform/wayland/wayland_window_unittest.cc
@@ -0,0 +1,129 @@
+// Copyright 2016 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 <wayland-server-core.h>
+#include <xdg-shell-unstable-v5-server-protocol.h>
+
+#include "base/strings/utf_string_conversions.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/ozone/platform/wayland/fake_server.h"
+#include "ui/ozone/platform/wayland/mock_platform_window_delegate.h"
+#include "ui/ozone/platform/wayland/wayland_display.h"
+#include "ui/ozone/platform/wayland/wayland_window.h"
+
+using ::testing::Eq;
+using ::testing::Mock;
+using ::testing::SaveArg;
+using ::testing::StrEq;
+using ::testing::_;
+
+namespace ui {
+
+TEST(WaylandWindowInitializeTest, Initialize) {
+  wl::FakeServer server;
+  ASSERT_TRUE(server.Start());
+  WaylandDisplay display;
+  ASSERT_TRUE(display.Initialize());
+  MockPlatformWindowDelegate delegate;
+  gfx::AcceleratedWidget widget = gfx::kNullAcceleratedWidget;
+  EXPECT_CALL(delegate, OnAcceleratedWidgetAvailable(_, _))
+      .WillOnce(SaveArg<0>(&widget));
+  WaylandWindow window(&delegate, &display, gfx::Rect(0, 0, 800, 600));
+  ASSERT_TRUE(window.Initialize());
+  EXPECT_EQ(widget, window.GetWidget());
+  wl_display_roundtrip(display.display());
+
+  server.Pause();
+
+  EXPECT_TRUE(server.GetObject<wl::MockSurface>(window.GetWidget()));
+  server.Resume();
+}
+
+class WaylandWindowTest : public testing::Test {
+ public:
+  WaylandWindowTest()
+      : window(&delegate, &display, gfx::Rect(0, 0, 800, 600)) {}
+
+  void SetUp() override {
+    ASSERT_TRUE(server.Start());
+    ASSERT_TRUE(display.Initialize());
+    ASSERT_TRUE(window.Initialize());
+    wl_display_roundtrip(display.display());
+
+    server.Pause();
+
+    auto surface = server.GetObject<wl::MockSurface>(window.GetWidget());
+    ASSERT_TRUE(surface);
+    xdg_surface = surface->xdg_surface.get();
+    ASSERT_TRUE(xdg_surface);
+    initialized = true;
+  }
+
+  void TearDown() override {
+    server.Resume();
+    if (initialized)
+      wl_display_roundtrip(display.display());
+  }
+
+  void Sync() {
+    server.Resume();
+    wl_display_roundtrip(display.display());
+    server.Pause();
+  }
+
+ private:
+  wl::FakeServer server;
+  bool initialized = false;
+
+ protected:
+  WaylandDisplay display;
+
+  MockPlatformWindowDelegate delegate;
+  WaylandWindow window;
+
+  wl::MockXdgSurface* xdg_surface;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(WaylandWindowTest);
+};
+
+TEST_F(WaylandWindowTest, SetTitle) {
+  EXPECT_CALL(*xdg_surface, SetTitle(StrEq("hello")));
+  window.SetTitle(base::ASCIIToUTF16("hello"));
+}
+
+TEST_F(WaylandWindowTest, Maximize) {
+  EXPECT_CALL(*xdg_surface, SetMaximized());
+  window.Maximize();
+}
+
+TEST_F(WaylandWindowTest, Minimize) {
+  EXPECT_CALL(*xdg_surface, SetMinimized());
+  window.Minimize();
+}
+
+TEST_F(WaylandWindowTest, Restore) {
+  EXPECT_CALL(*xdg_surface, UnsetMaximized());
+  window.Restore();
+}
+
+TEST_F(WaylandWindowTest, ConfigureEvent) {
+  wl_array states;
+  wl_array_init(&states);
+  xdg_surface_send_configure(xdg_surface->resource(), 1000, 1000, &states, 12);
+  xdg_surface_send_configure(xdg_surface->resource(), 1500, 1000, &states, 13);
+
+  // Make sure that the implementation does not call OnBoundsChanged for each
+  // configure event if it receives multiple in a row.
+  EXPECT_CALL(delegate, OnBoundsChanged(_)).Times(0);
+  Sync();
+  Mock::VerifyAndClearExpectations(&delegate);
+
+  EXPECT_CALL(delegate, OnBoundsChanged(Eq(gfx::Rect(0, 0, 1500, 1000))));
+  EXPECT_CALL(*xdg_surface, AckConfigure(13));
+  window.ApplyPendingBounds();
+}
+
+}  // namespace ui