New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 749981 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment

Add EG test for ContentSuggestions

Project Member Reported by gambard@chromium.org, Jul 28 2017

Issue description

See description
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 1 2017

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

commit df8939d535afb97ece580492f6e8632f077721d7
Author: gambard <gambard@chromium.org>
Date: Tue Aug 01 09:45:12 2017

Add Earl Grey tests for ContentSuggestions

In order to be able to add Earl Grey test for Content Suggestions
working without internet connection, the test must be able to set the
providers of the service. It allows the test to registers fake providers
to have control on event which are normally triggered by server
responses.

Bug:  749981 
Change-Id: I2952630e3e4ff59da42aae21454e95a4b23ac674
Reviewed-on: https://chromium-review.googlesource.com/591449
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Mike Baxley <baxley@chromium.org>
Reviewed-by: Jean-François Geyelin <jif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490928}
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ntp_snippets/BUILD.gn
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
[add] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory_util.cc
[add] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory_util.h
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ui/content_suggestions/BUILD.gn
[add] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/chrome/test/earl_grey/BUILD.gn
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/showcase/content_suggestions/BUILD.gn
[modify] https://crrev.com/df8939d535afb97ece580492f6e8632f077721d7/ios/showcase/content_suggestions/sc_content_suggestions_egtest.mm

Labels: zine-triaged
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 9 2017

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

commit f93141ec0cd47cab72bbece1fcb55f39f503399b
Author: gambard <gambard@chromium.org>
Date: Wed Aug 09 09:25:50 2017

Add Earl Grey tests for ContentSuggestions

Adds a test for checking that the privacy settings for
ContentSuggestions is available.
Also add a test to check that the section titles are displayed only
when there are two sections.

Bug:  749981 
Change-Id: I4b6289b57c26dadb2db5ae7a540ac3adf01ce58a
Reviewed-on: https://chromium-review.googlesource.com/605807
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Jean-François Geyelin <jif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492917}
[modify] https://crrev.com/f93141ec0cd47cab72bbece1fcb55f39f503399b/ios/chrome/browser/ui/content_suggestions/BUILD.gn
[modify] https://crrev.com/f93141ec0cd47cab72bbece1fcb55f39f503399b/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 18 2017

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

commit f6b370eeac0cc0d76f2e7ef624f6973d792a1d34
Author: Gauthier Ambard <gambard@chromium.org>
Date: Fri Aug 18 15:39:24 2017

Add ContentSuggestions EG tests for ReadingList

This CL adds tests to the ContentSuggestions test suite to test the
behavior of the "Reading List" section of Content Suggestions.

Bug:  749981 
Change-Id: I4083c9504e61476962f6fd589643c15d3492adc7
Reviewed-on: https://chromium-review.googlesource.com/619088
Reviewed-by: Jean-François Geyelin <jif@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495554}
[modify] https://crrev.com/f6b370eeac0cc0d76f2e7ef624f6973d792a1d34/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm
[modify] https://crrev.com/f6b370eeac0cc0d76f2e7ef624f6973d792a1d34/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 18 2017

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

commit b674a6d9e1c8d0bb906163223eea585bdbab74c5
Author: Gauthier Ambard <gambard@chromium.org>
Date: Fri Aug 18 15:50:36 2017

Add EG test for ContentSuggestions context menu

This CL adds EG tests for the context menu shown when long pressing
a Reading List item in Content Suggestions.

Bug:  749981 
Change-Id: I2815e32ede73c7ba3d9fd114cae2cfd50a58aa87
Reviewed-on: https://chromium-review.googlesource.com/619151
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495555}
[modify] https://crrev.com/b674a6d9e1c8d0bb906163223eea585bdbab74c5/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 18 2017

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

commit 2da357d03d7ea0cc3831a67fdc22f5ffd04f2b4e
Author: Gauthier Ambard <gambard@chromium.org>
Date: Fri Aug 18 15:57:48 2017

Add EG test for Most Visited context menu

This CL adds EG tests for the context menu shown when long pressing
a Most Visited item in Content Suggestions.

Bug:  749981 
Change-Id: If6fc45f67b6e2362110cfd8e045a972662478ac2
Reviewed-on: https://chromium-review.googlesource.com/620656
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495558}
[modify] https://crrev.com/2da357d03d7ea0cc3831a67fdc22f5ffd04f2b4e/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 18 2017

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

commit a3bfe9504e5e2c76638366c8c9440e99bf4d42e0
Author: Chris Mumford <cmumford@chromium.org>
Date: Fri Aug 18 17:08:50 2017

Revert "Add EG test for Most Visited context menu"

This reverts commit 2da357d03d7ea0cc3831a67fdc22f5ffd04f2b4e.

Reason for revert: It looks like https://chromium-review.googlesource.com/620656 is causing
iOS builds to fail:

https://uberchromegw.corp.google.com/i/chromium.mac/builders/ios-device-xcode-clang/builds/34002

  ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm:80:10: error: no viable conversion from returned value of type 'unique_ptr<net::test_server::BasicHttpResponse>' to function return type 'unique_ptr<net::test_server::HttpResponse>'
  return http_response;

To avoid conflicts two commits will be reverted:

1) 2da357d03d7e
2) b674a6d9e1c8

Original change's description:
> Add EG test for Most Visited context menu
> 
> This CL adds EG tests for the context menu shown when long pressing
> a Most Visited item in Content Suggestions.
> 
> Bug:  749981 
> Change-Id: If6fc45f67b6e2362110cfd8e045a972662478ac2
> Reviewed-on: https://chromium-review.googlesource.com/620656
> Commit-Queue: Gauthier Ambard <gambard@chromium.org>
> Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#495558}

TBR=stkhapugin@chromium.org,gambard@chromium.org

Change-Id: I47dc8a4070414b47943b585410249322adfca927
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  749981 
Reviewed-on: https://chromium-review.googlesource.com/621586
Reviewed-by: Chris Mumford <cmumford@chromium.org>
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495590}
[modify] https://crrev.com/a3bfe9504e5e2c76638366c8c9440e99bf4d42e0/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 18 2017

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

commit fc9f74b941603a96d466e533bd52fbcbbfb0bcb0
Author: Chris Mumford <cmumford@chromium.org>
Date: Fri Aug 18 17:10:58 2017

Revert "Add EG test for ContentSuggestions context menu"

This reverts commit b674a6d9e1c8d0bb906163223eea585bdbab74c5.

Reason for revert: Failing on iOS builds (to compile)

https://uberchromegw.corp.google.com/i/chromium.mac/builders/ios-device-xcode-clang/builds/34002

ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm:80:10: error: no viable conversion from returned value of type 'unique_ptr<net::test_server::BasicHttpResponse>' to function return type 'unique_ptr<net::test_server::HttpResponse>'
  return http_response;

Original change's description:
> Add EG test for ContentSuggestions context menu
> 
> This CL adds EG tests for the context menu shown when long pressing
> a Reading List item in Content Suggestions.
> 
> Bug:  749981 
> Change-Id: I2815e32ede73c7ba3d9fd114cae2cfd50a58aa87
> Reviewed-on: https://chromium-review.googlesource.com/619151
> Commit-Queue: Gauthier Ambard <gambard@chromium.org>
> Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#495555}

TBR=olivierrobin@chromium.org,gambard@chromium.org

Change-Id: I27512965e07eed71287319a2fe550cad7da34c81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  749981 
Reviewed-on: https://chromium-review.googlesource.com/621286
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Reviewed-by: Chris Mumford <cmumford@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495592}
[modify] https://crrev.com/fc9f74b941603a96d466e533bd52fbcbbfb0bcb0/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 21 2017

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

commit 48b152c9556d398a4cd6113b8ba286c7021ca116
Author: Gauthier Ambard <gambard@chromium.org>
Date: Mon Aug 21 09:41:03 2017

Reland of "Add EG test for ContentSuggestions context menu"

This CL adds EG tests for the context menu shown when long pressing
a Reading List item in Content Suggestions.
The original CL was reverted because the compilation on iOS was failing
on the StandardResponse. This is because a std::move is needed when
returning a subclass of a class contained in a unique_ptr.

Bug:  749981 
Change-Id: I1c9776c2e2f97de297585d3453bee48d2ebd5ca6
Reviewed-on: https://chromium-review.googlesource.com/623067
Reviewed-by: Elodie Banel <lod@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495893}
[modify] https://crrev.com/48b152c9556d398a4cd6113b8ba286c7021ca116/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 21 2017

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

commit bf0e24a46072e45ae496335f90a88869d0351b1c
Author: Gauthier Ambard <gambard@chromium.org>
Date: Mon Aug 21 11:14:24 2017

Reland of "Add EG test for Most Visited context menu"

This CL adds EG tests for the context menu shown when long pressing
a Most Visited item in Content Suggestions.

Bug:  749981 
Change-Id: I6881b85dbc84dbea2832061f8fee0e112d9f91f6
Reviewed-on: https://chromium-review.googlesource.com/622869
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Elodie Banel <lod@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495912}
[modify] https://crrev.com/bf0e24a46072e45ae496335f90a88869d0351b1c/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 4 2017

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

commit 6c143cff422710413b2ff7b13da6e17175806352
Author: Gauthier Ambard <gambard@chromium.org>
Date: Mon Sep 04 11:10:47 2017

Test ContentSuggestions opening and back

Add an EG test to ContentSuggestions to test the behavior of the
collection when loading more items, scrolling down, opening an item,
going back.
It tests that the position of the collection is correct and that the
omnibox is correctly displayed, to prevent the  bug 760439 .

Bug:  760439 ,  749981 
Change-Id: I20efb3c0ecb6799059eab359c47dd5ae763b1965
Reviewed-on: https://chromium-review.googlesource.com/645970
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Jean-François Geyelin <jif@chromium.org>
Reviewed-by: Jan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499477}
[modify] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/components/ntp_snippets/mock_content_suggestions_provider.cc
[modify] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/components/ntp_snippets/mock_content_suggestions_provider.h
[modify] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/ios/chrome/browser/ui/content_suggestions/BUILD.gn
[modify] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm
[modify] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm
[modify] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/ios/chrome/browser/ui/content_suggestions/ntp_home_provider_test_singleton.mm
[add] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/ios/chrome/browser/ui/content_suggestions/ntp_home_test_utils.h
[add] https://crrev.com/6c143cff422710413b2ff7b13da6e17175806352/ios/chrome/browser/ui/content_suggestions/ntp_home_test_utils.mm

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 4 2017

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

commit 50e28850ec39a34de16740608220c1486ac49bb7
Author: Gauthier Ambard <gambard@chromium.org>
Date: Mon Sep 04 12:23:33 2017

Test that items are kept when switching tabs

Additional items (displayed when pressing more), must be kept when there
is a tab switch.

Bug:  760090 ,  749981 
Change-Id: I5fcf5b50c87c6cd9b4bba80f2b9047abdefc150d
Reviewed-on: https://chromium-review.googlesource.com/646328
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499485}
[modify] https://crrev.com/50e28850ec39a34de16740608220c1486ac49bb7/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm

Status: Fixed (was: Assigned)
Closing this. Tests will now be added when fixing bugs.

Sign in to add a comment