New issue
Advanced search Search tips

Issue 665591 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Remove test dependencies on ChromeBrowserProviderImpl

Project Member Reported by rohitrao@chromium.org, Nov 15 2016

Issue description

Unittests should not need to instantiate a full ChromeBrowserProviderImpl in order to pass without crashing.

For some tests, we will be able to install a fake provider that feeds dummy data into the test.

For other tests, we may need to instantiate a real sub-provider.  These tests should be rare, however, and they should only require a specific sub-provider, not a full ChromeBrowserProviderImpl.

Once this is done, the only include of chrome_browser_provider_impl.h will be from the file that installs it at startup.
 
Description: Show this description
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a51b0d005ed8905f6f92b526094abd3fb4fbdd35

commit a51b0d005ed8905f6f92b526094abd3fb4fbdd35
Author: rohitrao <rohitrao@chromium.org>
Date: Wed Nov 16 22:40:20 2016

[ios] Adds test provider implementations.

Adds test implementations for the following providers:
  InfobarViewProtocol
  LiveTabContextProvider
  SyncedWindowDelegatesGetter

This keeps with the rule that sub-providers must always exist, to prevent
production code from having to check for NULL everywhere.

BUG= 665591 

Review-Url: https://codereview.chromium.org/2505953002
Cr-Commit-Position: refs/heads/master@{#432651}

[modify] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/BUILD.gn
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/sessions/test_live_tab_context_provider.cc
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/sessions/test_live_tab_context_provider.h
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/sessions/test_synced_window_delegates_getter.cc
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/sessions/test_synced_window_delegates_getter.h
[modify] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/test_chrome_browser_provider.h
[modify] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/test_chrome_browser_provider.mm
[modify] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/ui/infobar_view_protocol.h
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/ui/test_infobar_view.h
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/ui/test_infobar_view.mm
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/ui/test_styled_text_field.h
[add] https://crrev.com/a51b0d005ed8905f6f92b526094abd3fb4fbdd35/ios/public/provider/chrome/browser/ui/test_styled_text_field.mm

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 18 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/ff95b52315744d59efe520cd09fb00b4d1557814

commit ff95b52315744d59efe520cd09fb00b4d1557814
Author: rohitrao <rohitrao@google.com>
Date: Fri Nov 18 12:42:37 2016

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 25 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/3d49d8c020a8583e2a619cd60a86007656f1c1fa

commit 3d49d8c020a8583e2a619cd60a86007656f1c1fa
Author: rohitrao <rohitrao@google.com>
Date: Fri Nov 25 01:58:20 2016

Cc: sdefresne@chromium.org rohitrao@chromium.org
Owner: sczs@chromium.org
Over to sczs for the rest -- tab_unittest.mm and native_app_navigation_controller_unittest.mm.
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 30 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/8741e061d0a24d14be9ff638f7b04f4bfeb3fec3

commit 8741e061d0a24d14be9ff638f7b04f4bfeb3fec3
Author: sczs <sczs@google.com>
Date: Wed Nov 30 04:05:56 2016

Comment 8 by sczs@chromium.org, Dec 1 2016

Status: Fixed (was: Started)

Sign in to add a comment