Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: components/open_from_clipboard/clipboard_recent_content_ios.h

Issue 961673004: Add unittest to Open from Clipboard component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added error to check that the test is ran. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/open_from_clipboard/clipboard_recent_content_ios.h
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.h b/components/open_from_clipboard/clipboard_recent_content_ios.h
index 062d0f1b6917b668851f0d9bd9bedec5adfbff6d..b59ae4f67d3513323b3162b7ea0da57df57abc77 100644
--- a/components/open_from_clipboard/clipboard_recent_content_ios.h
+++ b/components/open_from_clipboard/clipboard_recent_content_ios.h
@@ -11,6 +11,9 @@
@class NSDate;
@class PasteboardNotificationListenerBridge;
+namespace test {
sdefresne 2015/02/26 16:36:00 nit: blank line before
jif 2015/03/03 14:37:59 Done.
+class ClipboardRecentContentIOSTestHelper;
+}
template <typename T>
struct DefaultSingletonTraits;
@@ -25,11 +28,15 @@ class ClipboardRecentContentIOS : public ClipboardRecentContent {
// ClipboardRecentContent implementation.
bool GetRecentURLFromClipboard(GURL* url) const override;
+ protected:
+ // Protected for testing.
+ ClipboardRecentContentIOS();
+ ~ClipboardRecentContentIOS() override;
+
private:
friend struct DefaultSingletonTraits<ClipboardRecentContentIOS>;
+ friend class test::ClipboardRecentContentIOSTestHelper;
- ClipboardRecentContentIOS();
- ~ClipboardRecentContentIOS() override;
// Loads information from the user defaults about the latest pasteboard entry.
void LoadFromUserDefaults();
// Saves information to the user defaults about the latest pasteboard entry.

Powered by Google App Engine
This is Rietveld 408576698