diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-10-09 13:44:12 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-10-09 13:44:12 +0000 |
commit | c8edcbeb3add928e37705ec51c8739d953f0d540 (patch) | |
tree | fd2bff9b14767a059828dc8460f14b94a98c58cd /tests | |
parent | 7eaeb6486f681391b5d5b9a3d15ceeedc4313244 (diff) | |
parent | 94ba0a4147052dec53e2ba818ec3d03141e8f26b (diff) | |
download | ayatana-indicator-display-c8edcbeb3add928e37705ec51c8739d953f0d540.tar.gz ayatana-indicator-display-c8edcbeb3add928e37705ec51c8739d953f0d540.tar.bz2 ayatana-indicator-display-c8edcbeb3add928e37705ec51c8739d953f0d540.zip |
Use com.ubuntu.touch.system's "rotation-lock" boolean for the rotation lock indicator. Fixes: 1378078
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'tests')
-rw-r--r-- | tests/glib-fixture.h | 13 | ||||
-rw-r--r-- | tests/gtestdbus-fixture.h | 10 | ||||
-rw-r--r-- | tests/manual | 8 |
3 files changed, 22 insertions, 9 deletions
diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h index a8f3a76..65d2921 100644 --- a/tests/glib-fixture.h +++ b/tests/glib-fixture.h @@ -17,6 +17,9 @@ * Charles Kerr <charles.kerr@canonical.com> */ +#ifndef INDICATOR_TESTS_GLIB_FIXTURE_H +#define INDICATOR_TESTS_GLIB_FIXTURE_H + #include <map> #include <glib.h> @@ -52,7 +55,7 @@ class GlibFixture : public ::testing::Test if (expected_log[level] != n) for (size_t i=0; i<n; ++i) - g_message("%d %s", (n+1), v[i].c_str()); + g_print("%d %s\n", (n+1), v[i].c_str()); } expected_log.clear(); @@ -64,7 +67,7 @@ class GlibFixture : public ::testing::Test const gchar * message, gpointer self) { - auto tmp = g_strdup_printf ("%s:%d \"%s\"", log_domain, (int)log_level, message); + char* tmp = g_strdup_printf ("%s:%d \"%s\"", log_domain, (int)log_level, message); static_cast<GlibFixture*>(self)->log[log_level].push_back(tmp); g_free(tmp); } @@ -140,4 +143,10 @@ class GlibFixture : public ::testing::Test } GMainLoop * loop; + + public: + + virtual ~GlibFixture() =default; }; + +#endif /* INDICATOR_TESTS_GLIB_FIXTURE_H */ diff --git a/tests/gtestdbus-fixture.h b/tests/gtestdbus-fixture.h index 541050e..c592033 100644 --- a/tests/gtestdbus-fixture.h +++ b/tests/gtestdbus-fixture.h @@ -17,6 +17,9 @@ * Charles Kerr <charles.kerr@canonical.com> */ +#ifndef INDICATOR_TESTS_GTESTDBUS_FIXTURE_H +#define INDICATOR_TESTS_GTESTDBUS_FIXTURE_H + #include "glib-fixture.h" /*** @@ -27,9 +30,10 @@ class GTestDBusFixture: public GlibFixture { public: - GTestDBusFixture() {} + GTestDBusFixture() =default; + virtual ~GTestDBusFixture() =default; - GTestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {} + explicit GTestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {} private: @@ -100,3 +104,5 @@ class GTestDBusFixture: public GlibFixture super::TearDown(); } }; + +#endif /* INDICATOR_TESTS_GTESTDBUS_FIXTURE_H */ diff --git a/tests/manual b/tests/manual index ff283cb..2de2d89 100644 --- a/tests/manual +++ b/tests/manual @@ -1,14 +1,12 @@ Test-case indicator-display/rotation-indicator <dl> - <dt>On the phone, enable the orientation lock in ubuntu-system-settings.</dt> + <dt>On the phone, enable the rotation lock in ubuntu-system-settings.</dt> <dd>The rotation lock indicator should appear, and its switch menuitem should be set to 'true'.</dd> - <dd>NOTE: Current builds this is broken, until it is fixed in system settings you can set it with: <tt>gsettings set com.ubuntu.touch.system orientation-lock 'LandscapeOrientation'</tt></dd> - <dt>With the orientation locked, click on the indicator's switch menuitem to toggle from locked to unlocked.</dd> + <dt>With the rotation locked, click on the indicator's switch menuitem to toggle from locked to unlocked.</dd> <dd>The rotation lock indicator should disappear</dd> - <dd>In ubuntu-system-settings, the orientation lock control should change to 'none'.</dd> - <dd>NOTE: Current builds this is broken, until it is fixed in system settings you can get it with: <tt>gsettings get com.ubuntu.touch.system orientation-lock</tt></dd> + <dd>In ubuntu-system-settings, the rotation lock control should change to 'none'.</dd> </dl> |